From owner-freebsd-bugs Wed Dec 3 14:00:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA17138 for bugs-outgoing; Wed, 3 Dec 1997 14:00:04 -0800 (PST) (envelope-from owner-freebsd-bugs) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA17117; Wed, 3 Dec 1997 14:00:01 -0800 (PST) (envelope-from gnats) Resent-Date: Wed, 3 Dec 1997 14:00:01 -0800 (PST) Resent-Message-Id: <199712032200.OAA17117@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, rjb@calyx.com Received: (from nobody@localhost) by hub.freebsd.org (8.8.7/8.8.7) id NAA16814; Wed, 3 Dec 1997 13:55:35 -0800 (PST) (envelope-from nobody) Message-Id: <199712032155.NAA16814@hub.freebsd.org> Date: Wed, 3 Dec 1997 13:55:35 -0800 (PST) From: rjb@calyx.com To: freebsd-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: www-1.0 Subject: misc/5208: umount fails when device is a symlink Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >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_cd9660 /dev/cdrom /mnt # mount /dev/wd0a on / (local) procfs on /proc (local) /dev/cdrom on /mnt (local, read-only) # umount /dev/cdrom umount: /dev/wcd0a: not currently mounted # umount /dev/wcd0a umount: /dev/wcd0a: not currently mounted # 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: