Date: Wed, 3 Dec 1997 13:55:35 -0800 (PST) From: rjb@calyx.com To: freebsd-gnats-submit@FreeBSD.ORG Subject: misc/5208: umount fails when device is a symlink Message-ID: <199712032155.NAA16814@hub.freebsd.org> Resent-Message-ID: <199712032200.OAA17117@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 5208 >Category: misc >Synopsis: umount fails when device is a symlink >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Dec 3 14:00:01 PST 1997 >Last-Modified: >Originator: Robert Brown >Organization: >Release: 2.2.5-STABLE >Environment: FreeBSD wopr.foo.bar.com 2.2.5-STABLE FreeBSD 2.2.5-STABLE #0: Wed Nov 19 10:12:01 PST 1997 root@wopr.foo.bar.com:/usr/src/sys.stable.11.18.97/compile/vmunix i386 >Description: Umount will not unmount a device that was mounted via a symlink. I link /dev/wcd0a to /dev/cdrom so it's easier to remember. When trying to umount it, it fails saying the device is not mounted. Check it out: < Link /dev/wcd0a to /dev/cdrom> # ln -s /dev/wcd0a /dev/cdrom # ls -l /dev/cdrom lrwxrwxrwx 1 root wheel 10 Nov 18 15:50 /dev/cdrom -> /dev/wcd0a <Mount /dev/cdrom with fstype cd9660> # mount_cd9660 /dev/cdrom /mnt # mount /dev/wd0a on / (local) procfs on /proc (local) /dev/cdrom on /mnt (local, read-only) <Try to unmount it> # umount /dev/cdrom umount: /dev/wcd0a: not currently mounted <But it IS mounted! Ok, let's try to unmount the actual device> # umount /dev/wcd0a umount: /dev/wcd0a: not currently mounted <Just to be sure we're not fooling ourselves, let's look at mount output again> # mount /dev/wd0a on / (local) procfs on /proc (local) /dev/cdrom on /mnt (local, read-only) So, we can't unmount the filesystem because mount doesn't think it is mounted. I think this is a bug. >How-To-Repeat: See above >Fix: Modify mount/umount to recognize and properly handle symlinks. >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712032155.NAA16814>