Monday, July 9, 2007

Configuring Beagle

Install Beagle
sudo apt-get install kerry beagle acl # acl is required to manually reset user_xattr later

Setup Inotify
inotify already supported in Feisty Fawn, however it needs to be activated in the /etc/fstab, add user_xattr in the mount option, below is my example (I want to index some folders inside my /home/thartono/data) :

thartono@thartono-linux:~$ cat /etc/fstab|grep user_xattr
UUID=6e889e0a-44d4-46ab-9134-109f4212d61a /home/thartono/data ext3 defaults,errors=remount-ro,user_xattr 0 1

Check if the user_xattr already active :

thartono@thartono-linux:~$ mount|grep user_xattr
/dev/sdb5 on /home/thartono/data type ext3 (rw,errors=remount-ro,user_xattr)

Otherwise you need to remount the /home/thartono/data

Beagle Force Indexing
I often force my Beagle to reindex (every several days if I have made a lot of changes in my folders), so I created the following script to force Beagle Index :

#!/bin/bash
echo Shutdown Beagle
beagle-shutdown
echo Removing old indexes
rm -rf /home/thartono/.beagle
beagle-config indexing AddRoot /home/thartono/data/products
beagle-config indexing AddRoot /home/thartono/data/customers
echo Reset Extended Attributes
setfacl -R -b /home/thartono/data/products
setfacl -R -b /home/thartono/data/customers
echo Indexing Beagle
export BEAGLE_EXERCISE_THE_DOG=1
beagled
beagle-status

NOTE
Don't forget to export BEAGLE_EXERCISE_THE_DOG=0 once Beagle finish indexing, otherwise your CPU utilization will all be eaten by Beagle.....

No comments: