Beagle mess & Evolution error.

February 26th, 2008 by amatesi

Ubuntu Linux aims at being a good OS solution for the desktop. The fact that it aims doesn’t necessarily means it is already…I heard 2008 will have more to say about this.
Form me, I think it is good enough, and I enjoy using it everyday, yet sometimes I encounter “strange” & “correlated” errors that I haven’t saw into a “more” commercial OS couterpart combo (XP+Office+Live Search in that case).
And that’s the great effort were I think Canonical is fully committed to: integration between “bazaar” software.

My actual OS is an upgraded Feisty 7.04 -> Gutsy 7.10.
I’m not saying everything went perfect the first time, but with some sanity, I tried to keep things working correctly as they were. And at 99% I made it behave just fine (without buying anything).

A (bad) reminiscence of Feisty was a little sniffy guardian Beagle (dog).

Beagle is an indexing tool that scans your HD for metadata and indexes it for faster searches (like Google Desktop Search).
In Gutsy, Beagle was (reasonably) replaced by Tracker, another, perhaps more stable, indexing solution.

The error I expected was related to a remnant of beagle that I forgot to remove; so, I had this process in memory, automatically booted everyday, that insanely tracked and Indexed every file inside my PC (maybe more than once).
I ended up locked and with no space left (I have a WD 250Gb HD).
My routine is made of daily emails, browsing (I never delete its cache), and I/O ( I always keep my recycle bin full), etc… well…ordinary stuff as everyone else, but not so much to fill a 250Gb HD with stuff (ex. my Home folder actually is almost 5 Gb).

The (mad) beagle-related process, day after day, filled my home folder (and consequently my HDD), with tons of indexed CRAP. What it was, exactly, I simply ignore it.
So recently I ended up having with a full (99.9%) /.

I figured it after the other (open) programs started complaining,and popped strange errors, especially my email client, Evolution.

The error message received from Evolution was stating: “Error while storing folder ‘inbox’ Summary and folder mismatch even after a sync”. WTF???
So I started to digg and figure what the problem was.

First thing:

  • rm -r /home/andy/.beagle

…to free up some space.

Next, Synaptic and (complete) removal of beagle and beagle-evolution.

Then a fast close/open Send/Receive with Evolution: error message still there :(

Some more research, some more infos: I had to close all Evolution processes, this way:

  • evolution –force-shutdown

…from a terminal.

Next thing: I cd to “.evolution” inside my home folder and searched for the main Inbox folder.

  • cd .evolution/mail/local

There I found a file called Inbox.ibex.index;
I renamed this file with something else, then restarted Evolution.

Everything clean and fixed.

Note: if you like me, never delete something, unless 100% sure, you can now safely rm the previously renamed file.

Back to work, now :-P

Posted in GNU Linux, System Administrator | No Comments »

my rsync fav options

January 30th, 2008 by amatesi

Today I’ll post my rsync fav options;
rsync is a lil program that automates syncronization between two folders, FS or partitions, even remotely by using ssh credentials (better used with keys…).
Its main use is to move every kind of data inside the network, keeping it synchronized. That mean that he check all the files that are on one side and confront them withe the files that are on the other side, transferring efficiently only the stuff that change!
Every standard Linux System Administrator should know it (man rsync), but I understand there is too much options.

At its basic it is used so:
rsync $SOURCE $DESTINATION

were $SOURCE and $DESTINATION can be a local folder or a remote folder accessed via ssh (ex.: andy@192.168.1.1:/home/andy/backup)

But if you tweak it a bit you can gain some more functions/performance.
I usually play with it through bash scripts but occasionally I use it directly from the console. When I use it from console, I need to remember the various settings I like, that I’m gonna share here for convenience.

Generally, for a basic rsync between two places, and with no deletion, I use this:
rsync -aHvzh –progress SRC DST

-a is synonym to using -rlptgoD, “a” does stand for archive; the included “a” options will be analized next.
-H stand for preservation of Hard Links (a synonymous name for an inode, ex. “DATA” is the real, meaningful, data and A.txt and B.txt is a pointer to that data).
-v is for verbose; I like talkative programs.
-z is for gzip compression during transfer (not where it puts the files, it is real time) — Best with powerful processors.
-h is for human readable sizes (in place of telling me: “transfered 10737418240 bytes”, he would say: “Hey mate, your 10Gb it’s already there!”).
–progress does show progress in real time with ASCII gfx.

Now let’s check what does -rlptgoD mean (they are simpler…):

-r is for recursive, essentially I need this to move entire directories, not only files.
-l keeps the symbolic links so.
-p keeps the same file permissions on the receiving side (r,w & x).
-t keeps the same date and time modification (better keep it for efficiency purposes, rsync this way know if the file changed or else).
-g similar as g, keep the same group on the receiving side.
-o similar as o, keep the same owner (the user) on the receiving side.
-D mean that it preserves character devices and block devices (ls /dev to see what these are) on the receiving side.

A very useful option I used in the past was -n

-n does stand for DRY RUN, it means that you are still not sure about wich option to use, and wanna still just try and experiment with the thousand options how the transfer will be, but without making it happen for real…very useful!

Then there are the various –delete-when? They are useful when you are sure that the transfer is ONE WAY (if not sure, don’t use it!) only.
You can use:
–delete-before
–delete-after &
–delere-during
Wich all do DELETE the transfered files at the specified time.

Then we have the exclude-from=files, a good option that allow rsync NOT to transfer the specified directories & files following the “=”. After the “=” can be used also a file containing all the files/dirs not needed during the transfer (say /sys, /dev, /tmp & all).
Example:
Let’s say I do not want to transfer the following folders: tmp, dev, proc, sys, floppy, cdrom, rsync, mnt, media ;
I create a file wich contain, for every line, the name of a folder I don’t need:
echo -e “/tmp\n/dev\n/proc\n/sys\n/floppy\n/cdrom\n/rsync\n/mnt\n/media\n” > /tmp/excluded.txt

…then I recall my rsync with the option exclude-from=/tmp/excluded.txt and the joke is done!

Posted in GNU Linux, System Administrator | No Comments »

change debian hostname.

January 18th, 2008 by amatesi

I stuck into a little problem related to a hostname change; basically I needed to change hostname for a basic debian install.

I then powered up my fav browser with my fav search engine (FF + Google), then searched for that stuff.

Easy as that! You change Hostname by simply doing

vi /etc/hostname (and put your new hostname inside this file, in place of the old one)

and that’s all. NOT!!!

Now launch

vi /etc/hosts

…and change also the other stuff were you see the old name.

Now you can safely reboot (or simply logoff/logon) to see changes take effect immediately.

Posted in GNU Linux, System Administrator | No Comments »

Do you Active FTP through Firewall+NAT ?

November 23rd, 2007 by amatesi

Here’s my experience on actively contributing in the resolution of a problem related to Active FTP & gnu-linux/ip-tables based firewall solution.

First, make sure your firewall has loaded the following modules:

ip_conntrack_ftp
ip_nat_ftp

Then check that the right Forwarding rules apply:

iptables -I FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

being “RELATED” the important part.

Hope it saves the day to someone…mines already got lost :(

Posted in GNU Linux, System Administrator | 3 Comments »

Boot Debian Installer from USB flash drive.

November 20th, 2007 by amatesi

My primary objective is to make a pc boot from usb flash drive and make him launch the standard debian installer.

Make sure BIOS is set to boot from USB (also called Removable Device).

Get boot.img.gz (here stable):

wget http://ftp.be.debian.org/debian/dists/etch/main/installer-i386/current/images/hd-media/boot.img.gz

unzip & put raw content inside the UNMOUNTED flash drive:

zcat boot.img.gz > /dev/sdc (assuming sdc is yours).

Get current netinst iso image (here etch-netinst):

wget http://cdimage.debian.org/debian-cd/4.0_r1/i386/iso-cd/debian-40r1-i386-netinst.iso

then copy image inside flash drive as is.

Now plug flash drive inside the pc to boot then start it up: if it works, it will boot a kernel and find the iso image for the install process.

Notes: if you see @ partitioning time your flash drive listed before your HDDs, then check BIOS option “Boot Removable Devices First” and put it to “disabled”.

Original Reference: http://www.debian.org/releases/sarge/i386/ch04s04.html.en

Posted in GNU Linux, System Administrator | No Comments »