Skip to contentSkip to conversation

2.5: Can't unmount fs after using NFS

DISCUSSION Felipe Alfaro Solana 2 participants 3 messages Mar 30, 2003 – Apr 9, 2003 NFS server

lore
Share & tools
lore
#0 lore raw

Hi,

Since I started testing 2.5 on my NFS server, I'm having problems unmounting filesystems that were exported by NFS (of course, before trying to unmount, I stopped NFS):

glass:~# cat /etc/mtab
/dev/hda2 / ext3 rw,noatime 0 0
none /proc proc rw 0 0
usbdevfs /proc/bus/usb usbdevfs rw 0 0
/dev/hda3 /data ext3 rw,noatime 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
none /dev/shm tmpfs rw 0 0
/dev/hdb2 /media ext3 rw,noatime 0 0
glass:~# cat /etc/exports
/data   192.168.0.100(rw,no_root_squash) 192.168.0.0/24(ro)
/media  192.168.0.100(rw,no_root_squash)
glass:~# /etc/init.d/nfs stop
glass:~# umount /media
umount: /media: device is busy
glass:~# umount /data
umount: /data: device is busy
glass:~# dmesg|tail
hdb: drive_cmd: status=0x51 { DriveReady SeekComplete Error }
hdb: drive_cmd: error=0x04 { DriveStatusError }
kjournald starting.  Commit interval 5 seconds
EXT3-fs warning: maximal mount count reached, running e2fsck is
recommended
EXT3 FS 2.4-0.9.16, 02 Dec 2001 on ide0(3,66), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
nfsd: last server has exited
nfsd: unexporting all filesystems
nfsd: last server has exited
nfsd: unexporting all filesystems
glass:~# umount -f /media
umount2: Device or resource busy
umount: /media: device is busy
glass:~# fuser -vu /media

USER PID ACCESS COMMAND
/media root kernel mount /media

glass:~# fuser -vu /data

USER PID ACCESS COMMAND
/data root kernel mount /data

glass:~# cat /etc/fstab
/dev/hda3               /data                   ext3   
defaults,noatime     1 2
/dev/hda2               /                       ext3   
defaults,noatime     1 1
/dev/hda1               /boot                   ext3   
defaults,noauto      0 0
/dev/hdb2               /media                  ext3   
defaults,noauto,noatime 0 0
none                    /dev/pts                devpts 
gid=5,mode=620       0 0
none                    /proc                   proc   
defaults             0 0
none                    /dev/shm                tmpfs  
defaults             0 0
#/dev/hdb1               swap                    swap   
defaults             0 0
/dev/cdrw               /mnt/cdrw           udf,iso9660
noauto,owner,ro      0 0
/dev/hdc                /cdrom                  auto   
ro,noauto,user,exec  0 0
/dev/scd0               /cdrecorder             auto   
ro,noauto,user,exec  0 0

Is this a bug? This didn't happen with 2.4.

Thanks!

________________________________________________________________________
Felipe Alfaro Solana
Linux Registered User #287198
http://counter.li.org

#1 lore raw
Quoted 5 lines · On March 30, [email protected] wrote:

Hi,

Since I started testing 2.5 on my NFS server, I'm having problems unmounting filesystems that were exported by NFS (of course, before trying to unmount, I stopped NFS):

Thankyou for the bug report. After spending far too long looking in the wrong place, I looked in the right place and found it. This patch should fix it.

NeilBrown

fs/nfsd/export.c renamed from fs/nfsd/export.c~current~ +1 -1
diff ./fs/nfsd/export.c~current~ ./fs/nfsd/export.c
@@ -838,7 +836,7 @@ exp_rootfh(svc_client *clp, char *path, 
 		err = 0;
 	memcpy(f, &fh.fh_handle, sizeof(struct knfsd_fh));
 	fh_put(&fh);
-
+	exp_put(exp);
 out:
 	path_release(&nd);
 	return err;
#2 lore raw
Quoted 10 lines · Neil Brown
Quoted 5 lines · On March 30, [email protected] wrote:

Hi,

Since I started testing 2.5 on my NFS server, I'm having problems unmounting filesystems that were exported by NFS (of course, before trying to unmount, I stopped NFS):

Thankyou for the bug report. After spending far too long looking in the wrong place, I looked in the right place and found it. This patch should fix it.

I'm sorry to say the patch doesn't fix the problem. After sometime under normal usage of the NFS server, I can't still unmount the volume after stopping the NFS service.

Do you want me to do anything else?

________________________________________________________________________
Linux Registered User #287198