Hi, when umount(8)ing by device, umount fetches the mountpoint via getmntinfo(3), because unmount(2) only supports unmounting via mountpoint. This means it is simply impossible to unmount a specific filesystem from an overloaded mountpoint. I think umount(8) should detect this case, warn the user and give up. Instead it plays roulette and calls unmount(2) on the mountpoint. This should be easy to fix, but it will require some restructuring of the code. That's because the current code cannot discriminate between the "unmount by special device" and "unmount by mountpoint" cases in the getmntname() function where the evaluation of the statfs(2) structures from getmntinfo(3) happens.
Regards, Christopher Here's an umount run in which it went wrong. $ mount /dev/wd0a on / type ffs (local) mfs:1701 on /tmp type mfs (asynchronous, local, nodev, nosuid, size=2096816 512-blocks) /dev/wd0d on /usr type ffs (local, nodev) /dev/wd0e on /usr/local type ffs (local, nodev) /dev/sd0d on /var type ffs (local, nodev, nosuid, softdep) /dev/sd0e on /home type ffs (local, nodev, nosuid, softdep) /dev/sd1i on /vol/sd1i type msdos (local, uid=0, gid=10, mask=0660, direxec) /dev/wd0i on /vol/sd1i type msdos (local, uid=0, gid=10, mask=0770) $ sudo umount /dev/sd1i $ mount /dev/wd0a on / type ffs (local) mfs:1701 on /tmp type mfs (asynchronous, local, nodev, nosuid, size=2096816 512-blocks) /dev/wd0d on /usr type ffs (local, nodev) /dev/wd0e on /usr/local type ffs (local, nodev) /dev/sd0d on /var type ffs (local, nodev, nosuid, softdep) /dev/sd0e on /home type ffs (local, nodev, nosuid, softdep) /dev/sd1i on /vol/sd1i type msdos (local, uid=0, gid=10, mask=0660, direxec) $