From owner-freebsd-current Mon Apr 26 11:49:18 1999 Delivered-To: freebsd-current@freebsd.org Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.54]) by hub.freebsd.org (Postfix) with ESMTP id 8BF16155EE for ; Mon, 26 Apr 1999 11:49:01 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.9.3/8.9.1) id LAA82506; Mon, 26 Apr 1999 11:46:15 -0700 (PDT) (envelope-from sgk) From: Steve Kargl Message-Id: <199904261846.LAA82506@troutmask.apl.washington.edu> Subject: Re: file disappeared? In-Reply-To: from Doug White at "Apr 26, 1999 10:51:06 am" To: dwhite@resnet.uoregon.edu (Doug White) Date: Mon, 26 Apr 1999 11:46:15 -0700 (PDT) Cc: ayk1@ukc.ac.uk, freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Doug White wrote: > On Mon, 26 Apr 1999, Dean Lombardo wrote: > > > So I decided to run fsck, with -p at first: > > > > > > pcayk:/usr/home/ayk1# fsck -p -f /dev/wd0s1f > > /dev/rwd0s1f: UNREF FILE I=1111053 OWNER=ayk1 MODE=100644 > > /dev/rwd0s1f: SIZE=716247040 MTIME=Apr 22 20:36 1999 (CLEARED) > > /dev/rwd0s1f: SUMMARY INFORMATION BAD (SALVAGED) > > /dev/rwd0s1f: BLK(S) MISSING IN BIT MAPS (SALVAGED) > > /dev/rwd0s1f: FREE BLK COUNT(S) WRONG IN SUPERBLK (SALVAGED) > > /dev/rwd0s1f: 176217 files, 6275813 used, 1346031 free (39575 frags, > > 163307 blocks, 0.5% fragmentation) > > I assume this was in single user mode, otherwise you made a gigantic mess. > :-) > Doesn't the file system just need to be unmounted? Qualifier: I'm not a file system hacker. Can VFS_STATFS return a value that indicates whether a file system is mounted? If so, it would seem logical to have fsck check the status. status = VFS_STATFS(mp, sbp, p); if (status & MOUNTED) perror("file system mounted"); -- Steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message