Archive for the 'Linux' Category

When exportfs -arv takes forever

Saturday, March 11th, 2006

I had the strangest problem with my server for the last months. Starting nfsd on my Archlinux machine took forever and I couldn’t figure out why. Stracing `exportfs -arv` showed a lot of DNS queries were done; which is strange since my nfs server is only available to machines on the internal network (and those are all listed in /etc/hosts as well). I quickly found out that removing the nameservers from /etc/resolv.conf would somehow fix this problem; nfsd would start instantly. A lot of strange IP addresses showed up while tracing, but I couldn’t quickly find out where they came from. When I was ready to modify my nfsd startup script to empty the resolv.conf before starting; I started a last serie of Google queries. And guess what. I found it.

Searching for ‘exporting “to kernel” exportfs’ (the message exportfs gave while running, and which contained the strange IP addresses) pointed me to [nSLUG] Re: Help with NFS, plz?. This thread mentioned a file `/var/lib/nfs/rmtab`; which, when I viewed it, actually contained those strange IP addresses. Somehow nfsd had stored all the hosts that made nfs-requests; including many old and dead ones. It seemed a reverse DNS lookup was done for each IP address in there; resulting in a lot of lookups that were never satisfied. The problem was solved by emptying the rmtab file.

Y - When a good alternative dies

Sunday, December 25th, 2005

The open-source community being dynamic, popping up new alternatives all the time, doesn’t mean there automatically is a wide choice of software available. It just means a lot of ideas get worked out to a website, some sample code an maybe even a working application. Take Y-Windows for example. Y was created as a from-scratch implementation of X which is bloated, old and started to suck-and-scare more people. A mailinglist was set up, a wiki appeared, and although the idea was good and there were some very interesting discussions; things died with the main developers saying they were working really hard on some ‘very-good’ ideas which never seemed to make it to the actual CVS tree. Fortunately there are also people working on improving X instead of rewriting it, thereby avoiding major compability issues. I assume new projects don’t just need to be hyped, they need people open to new developers and ofcourse: Release early. Release often. And listen to your customers.

Maildir, number of unread e-mails

Wednesday, December 7th, 2005

After finding this useful document about the Maildir format I was finally able to complete my ‘How many mails do I have’ oneliner:

expr `find /home/username/Maildir/cur -maxdepth 1 -type f -regex '.*,[^S]*$'|wc
-l` + `find /home/username/Maildir/new -maxdepth 1 -type f|wc -l`

Might be useful for some people who think this kind of functionality belongs in a webmail client ;-)