From owner-freebsd-scsi Mon Sep 18 7: 8:43 2000 Delivered-To: freebsd-scsi@freebsd.org Received: from gidora.zeta.org.au (gidora.zeta.org.au [203.26.10.25]) by hub.freebsd.org (Postfix) with SMTP id 08DF337B424 for ; Mon, 18 Sep 2000 07:08:35 -0700 (PDT) Received: (qmail 12798 invoked from network); 18 Sep 2000 14:08:30 -0000 Received: from unknown (HELO bde.zeta.org.au) (203.2.228.102) by gidora.zeta.org.au with SMTP; 18 Sep 2000 14:08:30 -0000 Date: Tue, 19 Sep 2000 01:08:26 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Jim Weeks Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: umount -f question In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sun, 17 Sep 2000, Jim Weeks wrote: > I am not sure if this is the right forum for this question but I haven't > had a lot of help with this problem elsewhere. > > I have a Seagate Barracuda drive on a BT958 controller that dies during > heavy writes. I have pretty much narrowed it down to outdated firm ware, > but I have not been able to upgrade it yet. > > Right now it is down. I can stop, start, and tur it with camcontrol, but > am unable to umount, mount, fsck, fdisk, or disklabel. I get device not > configured errors. > > My question is why I cannot remove the mount point as listed in # df with > the # umount -f /dev/da1s1e command. umount -f doesn't try hard enough to force the unmount, at least for ffs. ffs_unmount() uses the -f flag only for flushing files. Then, if the filesystems mounted rw, it always attempts to update the superblock, and this should always fail if the drive has died. I ignore errors from this in my version of ffs_vfsops.c (I should only ignore them in the -f case). If the superblock update succeeds, then ffs_unmount() is committed to the mount succeeding, but the unmount can still fail if closing the device fails, as probably happens if the device has died. This may cause memory leaks or worse because dounmount() doesn't understand half successful unmounts. Failure of the other commands is correct because they involve opens and the driver shouldn't allow opening dead devices. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message