Strange NFS mount / umount problem .. ..or Bug?
On one of my systems, running Slackware 10.1 with a 2.6.14.5 Kernel, I
have been noticing the following problem with using NFS. I mount a Linux ext2 partition on a USB drive BOX1> mount /dev/sdb1 /usb1 I have the /usb1 directory listed in my /etc/exports file so it so other systems on my network can access the USB drive. So.. then.. from another system I will do .. BOX2> mount BOX1:/usb1 /usb1 OK.. Fine. Then from BOX2 I access the USB drive just fine as you would expect. When I am done with it I do : BOX2> umount /usb1 And as expected, the NFS filesystem is unmounted just fine .. on BOX2 Now from BOX1 I do: BOX1> umount /usb1 and I get.. umount: /usb1: device is busy umount: /usb1: device is busy .. yet nothing appears to be using it. There is no way to umount /usb1 unless I shutdown NFS by doing : BOX1> /etc/rc.d/rc.nfsd stop BOX1> /umount /usb1 ( it un mounts just fine now) BOX1> /etc/rc.d/rc.nfsd start This does not seem right to me. I can't imagine this being by design. Anyone else see it? Is it a [known] bug or limitation? If I mount the USB partition on BOX1 and *do not* access it via NFS from another system, then I can unmount it later. But it seems like once NFS gets ahold of it it does not want to let it go. |
Make sure you have no open files from box1 or box2, ie: still not in the usb directory on either box and/or other files are not open.
Hope it helps some. |
That is why I am asking this question. No files on the
USB filesystem *are* open. To repeat the question in another way... If I do the mount and then do the umount it will unmount just fine. If I do the mount and then do an NFS mount from another system.. then unmount NFS from the other system, then I can't do an umount unless I shutdown all NFS services, do the umount, and then restart NFS. USB has anything to do with it. Same thing happens with any file system. |
Try running
Code:
lsof /usb1 fires up and begins sharing that directory, it caches certain things in memory and treats the share as being 'open'. No matter if the remote box closed the connection. If 'lsof' doesn't reveal any open files in the mount point, try using the 'sync' command, which writes any changes to file systems, and then umount. NFS wasn't meant traditionally to share removable devices, so I would call this more of an 'oversight' than a bug. -- Shade |
All times are GMT -5. The time now is 09:45 PM. |