Skip to contentSkip to conversation

Get "device is busy" when umounting nfsv4 file

DISCUSSION Kinglong Mee 1 participant 3 messages May 23, 2014 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

When using NFSv4 on Fedora 20 with latest kernel (3.15.0-rc6+), I can't umount the mountpoint after only an 'ls' operation.

[root@localhost ~]# cat /etc/exports
/nfstest *(rw,no_root_squash,no_subtree_check,insecure)
[root@localhost ~]# mount -t nfs 127.0.0.1:/ /mnt/ [root@localhost ~]# ls /mnt/
nfstest
[root@localhost ~]# umount /mnt/ umount.nfs4: /mnt: device is busy

#2 lore raw
In reply to a message not in the archive
Quoted 14 lines · Trond Myklebust
Quoted 11 lines · On May 22, 2014 10:14 PM, "Kinglong Mee" <[email protected]…

When using NFSv4 on Fedora 20 with latest kernel (3.15.0-rc6+), I can't umount the mountpoint after only an 'ls' operation.

[root@localhost ~]# cat /etc/exports
/nfstest *(rw,no_root_squash,no_subtree_check,insecure)
[root@localhost ~]# mount -t nfs 127.0.0.1:/ /mnt/ [root@localhost ~]# ls /mnt/
nfstest
[root@localhost ~]# umount /mnt/ umount.nfs4: /mnt: device is busy

Quoted 3 lines

Hi Kinglong

Nothing springs out to me. Could you please bisect?

Trying it on rhel7 with 3.10.0-121.el7.x86_64,
also got "device is busy".
[root@localhost ~]# umount /mnt/
umount.nfs4: /mnt: device is busy

Maybe this problem has exist a long time.

thanks,
Kinglong Mee

#3 lore raw
Quoted 17 lines · Kinglong Mee
Quoted 16 lines · Trond Myklebust
Quoted 11 lines · On May 22, 2014 10:14 PM, "Kinglong Mee" <[email protected]…

When using NFSv4 on Fedora 20 with latest kernel (3.15.0-rc6+), I can't umount the mountpoint after only an 'ls' operation.

[root@localhost ~]# cat /etc/exports
/nfstest *(rw,no_root_squash,no_subtree_check,insecure)
[root@localhost ~]# mount -t nfs 127.0.0.1:/ /mnt/ [root@localhost ~]# ls /mnt/
nfstest
[root@localhost ~]# umount /mnt/ umount.nfs4: /mnt: device is busy

Hi Kinglong

Quoted 8 lines
Quoted 1 line

Nothing springs out to me. Could you please bisect?

Trying it on rhel7 with 3.10.0-121.el7.x86_64,
also got "device is busy".
[root@localhost ~]# umount /mnt/
umount.nfs4: /mnt: device is busy

Maybe this problem has exist a long time.

I find thant -EBUSY errno is return at,

"fs/namespace.c"
1284 static int do_umount(struct mount *mnt, int flags) 1285 {
1286 struct super_block *sb = mnt->mnt.mnt_sb;
......
1358 if (flags & MNT_DETACH) {
1359 if (!list_empty(&mnt->mnt_list))
1360 umount_tree(mnt, 2);
1361 retval = 0;
1362 } else {

1363                 shrink_submounts(mnt);
1364                 retval = -EBUSY;
1365                 if (!propagate_mount_busy(mnt, 2)) {

propagate_mount_busy return 1 for mnt's refcnt is 3 (bigger than 2).

1366 if (!list_empty(&mnt->mnt_list))
1367 umount_tree(mnt, 1);
1368 retval = 0;
1369 }
1370 }

thanks,
Kinglong Mee