Mike’s Linux Desktop Experiences

February 21, 2008

lazy umount

Filed under: Uncategorized — Mr. Mike @ 9:06 pm

NFS has some capabilities which are really quite slick. One of these features is that if you mount a drive by NFS, it doesn’t matter if the server is unavailable, your kernel will continue to wait for it to become available.

Nautilus has been causing me some grief the past few days. Freezing and requiring me to force it to quit through the GUI. I first thought it was my digital camera. Plugging it in seemed to cause this.

Today the camera wasn’t hooked up and I realized it was still freezing.

One of the pains of NFS is that if the server is unavailable, your kernel will continue to wait for an NFS mount to become available.  When this happens, something as simple as an “ls /mnt/lotd” will cause the prompt to sit idle, immune to ctrl-c, ctrl-z, or similar interruptions.

root@whitetower:~# umount -f /mnt/lotd
umount2: Device or resource busy
umount: /mnt/lotd: device is busy
root@whitetower:~# man umount
root@whitetower:~# umount -l /mnt/lotd

It’s working again. I guess I can’t hold it against Linux because honestly, it’s a pretty neat feature, it would just be nice if there were a GUI timeout on a resource so that it wouldn’t foul up everything unrelated to the mount point.

Can’t have everything I guess.

I used take advantage of this to reboot NFS servers that were serving active thin clients. Even a 5 minute reboot of their root filesystem wouldn’t phase the clients. Despite the PITA that NFS is for firewalls and security, I don’t know of any other mount method that’s quite so robust.

The “force” (-f) is usually enough, but if a process is holding a handle in the filesystem, it won’t allow for the umount. “force” just avoids contacting the remote (down) NFS server. This “lazy” (-l) tells it to break the mount point for all new connections, but existing handles remain open. Now when Nautilus tries to get info for my mounted filesystems, it won’t try to access the dead NFS share.

Rebooting would have fixed this too. Now how do I restart the Nautilus desktop?


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: