From owner-freebsd-questions Tue Apr 9 11:21:46 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id LAA00766 for questions-outgoing; Tue, 9 Apr 1996 11:21:46 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id LAA00760 for ; Tue, 9 Apr 1996 11:21:44 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id LAA05438; Tue, 9 Apr 1996 11:15:08 -0700 From: Terry Lambert Message-Id: <199604091815.LAA05438@phaeton.artisoft.com> Subject: Re: "Clean flag is wrong" with fsck To: Eric.Berenguier@sycomore.fr (Eric Berenguier) Date: Tue, 9 Apr 1996 11:15:08 -0700 (MST) Cc: questions@freebsd.com In-Reply-To: <199604091311.PAA05612@sycgate.sycomore.fr> from "Eric Berenguier" at Apr 9, 96 03:11:50 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > when i use the command fsck i get the following message: > > CLEAN FLAG IS WRONG IN SUPERBLOCK > > the command i've typed in is: fsck -n > and the filesystem is mounted. > > What's the problem ? and how can i suppress this message (or it's cause) When a file system is mounted for read/write it is marked dirty. When it is unmounted, the last operation is to mark it clean. This is how the system knows the difference between normal and abnormal shutdowns. The problem is that you are running fsck on a mounted file system and expecting it to not complain. 8-). You can "suppress the cause" by unmounting the file system before running fsck. 8-) 8-) 8-). Alternately, there are two sets of kernel patches you could apply to the sync procedure. The first set marks the FS clean after a sync and no dirty buffers to be written exist after a certain amount of idle time (this is what Windows95 does with VFAT as well). Once these patches are integrated, it is safe to simply power the system off after a certain amount of time inactive. The second set is required to marke the FS dirty before allowing a buffer referring to the FS to be marked dirty. This causes some delay for a system which has been idle for two sync periods (which is when you would mark the FS clean -- sync periods should be reduced to several seconds -- maybe even one -- by the first patch). The patches are more useful for nomadic computing and removable media than anything else. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.