F15: ugly behavior of "df"
Karel Zak
kzak at redhat.com
Fri Jul 22 08:24:25 UTC 2011
On Fri, Jul 22, 2011 at 12:55:54AM +0200, Reindl Harald wrote:
> Am 22.07.2011 00:39, schrieb Karel Zak:
>
> > * bind mounts are represented as /A -> /B dependence, reality is
> > /A -> device, /B -> device (and /A could be umounted, moved, ...)
>
> this is not generally true
# mount /dev/sdb1 /mnt/A
# mount --bind /mnt/A /mnt/B
# findmnt /dev/sdb1
TARGET SOURCE FSTYPE OPTIONS
/mnt/A /dev/sdb1 ext4 rw,relatime,barrier=1,stripe=32,data=ordered
/mnt/B /dev/sdb1 ext4 rw,relatime,barrier=1,stripe=32,data=ordered
# umount /mnt/A
# findmnt /dev/sdb1
TARGET SOURCE FSTYPE OPTIONS
/mnt/B /dev/sdb1 ext4 rw,relatime,barrier=1,stripe=32,data=ordered
> [root at srv-rhsoft:~]$ umount /Volumes/dune/www-servers
> umount: /Volumes/dune/www-servers: device is busy.
> (In some cases useful info about processes that use
> the device is found by lsof(8) or fuser(1))
> [root at srv-rhsoft:~]$ umount /Volumes/dune/www-servers/phpincludes
> [root at srv-rhsoft:~]$ umount /Volumes/dune/www-servers
> [root at srv-rhsoft:~]$ mount /Volumes/dune/www-servers/phpincludes
> mount: Einhängepunkt /Volumes/dune/www-servers/phpincludes existiert nicht
> [root at srv-rhsoft:~]$ mount /Volumes/dune/www-servers
> [root at srv-rhsoft:~]$ mount /Volumes/dune/www-servers/phpincludes
>
> [root at srv-rhsoft:~]$ cat /etc/fstab | grep www-servers
> /mnt/data/www/thelounge.net /Volumes/dune/www-servers none bind
> /mnt/data/www/phpincludes /Volumes/dune/www-servers/phpincludes none bind
>
> so something, somewhere knows that one bind-mount is inside another
Oh... this is generic thing, you cannot umount any part of VFS if
there is active submount. This is not related to bind mounts.
# mount /dev/sdb1 /mnt/A
# mkdir /mnt/A/subdir
# mount /dev/sda1 /mnt/A/subdir
# umount /mnt/A
umount: /mnt/A: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
I hope that umount(8) in Fedora-17 will support --recursive option.
Karel
--
Karel Zak <kzak at redhat.com>
http://karelzak.blogspot.com
More information about the devel
mailing list