From owner-freebsd-current Sat Apr 22 20:31:09 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id UAA12390 for current-outgoing; Sat, 22 Apr 1995 20:31:09 -0700 Received: from cs.weber.edu (cs.weber.edu [137.190.16.16]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id UAA12384 for ; Sat, 22 Apr 1995 20:31:08 -0700 Received: by cs.weber.edu (4.1/SMI-4.1.1) id AA10199; Sat, 22 Apr 95 21:24:30 MDT From: terry@cs.weber.edu (Terry Lambert) Message-Id: <9504230324.AA10199@cs.weber.edu> Subject: Re: Fixing /dev entries (was Re: wcarchive down ) To: gpalmer@freefall.cdrom.com (Gary Palmer) Date: Sat, 22 Apr 95 21:24:30 MDT Cc: taob@gate.sinica.edu.tw, freebsd-current@FreeBSD.org In-Reply-To: <24560.798562685@freefall.cdrom.com> from "Gary Palmer" at Apr 22, 95 07:58:05 am X-Mailer: ELM [version 2.4dev PL52] Sender: current-owner@FreeBSD.org Precedence: bulk > > If someone had physical access, would the solution be as simple as > >mounting the drive with the root filesystem on another FreeBSD > >machine, re-doing the /dev entries and then replacing the drive? I'm > >thinking ahead in case it ever happens to any of the machines here. > > If the /dev/*sd* entries were the only things affected, then yes. But when > we ran fsck on the drive a lot of the files normally considered non-optional > for a root filesystem bit the dust. It's either a complete re-install or > a upgrade to 2.x > > I'm not sure if anyone has fgured out what exactly happened yet, I'm > not at all sure and I was there watching this happen :-( There is still a nice hole for all you truck-drivers. The bdwrite for ffs_update() probably ought to be a bwrite if the inode being updated is a directory. I think it's possible that "current directories" for apps can ge corrupted by virtue of the inode being dirty for the access times. An explicit reading of POSIX allows you to treat a directory as if it were not a file, and only (synchronously!) update times on getdents (VOP_READDIR). I fixed this problem on UnixWare about a year ago, and was hard pressed to cause unreferenced files while flipping the power off during stress testing (before the fix, this would inevitably end up with crap in the lost+found directory). Terry Lambert terry@cs.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.