SUMMARY : Dirty file system

From: jean.schuller <schuller_at_sbgal4.in2p3.fr>
Date: Fri, 12 Dec 1997 09:39:01 +0100 (GMT+0100)

        Hi all,

        Ok, I know, It was a dummy question. Many many thanks for
        the fast and efficient answer, it works now. I forgot the
        damn good fsck and the line in fstab should be :
/dev/rz1b /scratch ufs rw 1 2
and not
/dev/rz1b /scratch ufs rw 0 0


        JEAN

Thanks to :
Gyula Szokoly ,
marianne.witkop
Dr. Tom Blinn
Burelbach, Jonathan
Gyula Szemenyei
Hitendra Patel
Ross Alexander
Alan Rollow
 Robert L. McMillin
Carlos A M dos Santos
Craig.T.Biggerstaff
Bernt Christandl

The answers :
'fsck' the damn thing. You have disabled the fsck during boot (the two
zeros in fstab). The file system was live when the system went down.
Now it wants to make sure the file system is consistent. Probably
fsck will fix errors (if any) without data loss (about 99% chance).
-----------------------------------------------------------------------------
It looks like you'll need to change the last 2 fields in your /etc/fstab
to
look
like this:

/dev/rz1b /scratch ufs rw 1 2

Here's a little more info on those fields:

 The sixth field, (fsck), is used by the fsck command to determine the
order in
which file system checks are done at reboot time. For the root file
  system, specify 1 in the fsck field, and for other file systems, specify
2 in
the fsck field. File systems that are on the same disk are checked
sequentially, but file systems on different disks are checked at the same
  time to utilize parallelism available in the hardware. If the sixth
field
  is not present or zero, a value of zero is returned and the fsck command
  assumes that the file system does not need to be checked. For AdvFS the
  sixth field is a pass number field that allows the quotacheck command to
perform all of the consistency checks needed for the file system. The
pass
  number must be 2.
-----------------------------------------------------------------------------
Did you newfs the file system to create it, or did you just edit the
disklabel manually?

Have you run fsck on the file system? That's what you normally would do
to
turn a dirty file system into a clean one.
-----------------------------------------------------------------------------
It's a UFS file system. Run 'fsck /dev/rz1b'
-----------------------------------------------------------------------------
Have you tried to run fsck program before you mount the file system
-----------------------------------------------------------------------------
We don't use ADVFs here but I recently had 'Dirty file system' when
mounting a local disk. I used fsck comand.

try the man pages for fsck

ie fsck -p /dev/rz1b should work, but not too sure about the ADVFs
-----------------------------------------------------------------------------
run fsck on it before mounting:

        fsck /dev/rz1b
-----------------------------------------------------------------------------
When a UFS is first mounted a field is written in the superblock
to indicate that the file system was mounted. This makes the
file system "dirty". When the file system is unmounted, the
field is cleared. This allows the system startup fsck pass
to quickly skip over file systems that are know to be consistent.

For whatever reason, it appears that your /scratch file system
wasn't unmounted and this the "dirty" field not cleared. If
it was a simple matter of the system not being shutdown cleanly
a pass with fsck will fix it. If there is a more serious
problem, the fsck pass may offer a clue what is wrong.
-----------------------------------------------------------------------------
> /dev/rz1b /scratch ufs rw 0 0
                                                                  ^ ^
should be 1 2
RTFM for fstab.
-----------------------------------------------------------------------------
Change

/dev/rz1b /scratch ufs rw 0 0

to

/dev/rz1b /scratch ufs rw 0 2
This will make fsck check your partition before mounting. Do this to clear
the dirty flag:

        # umount /scratch
        # fsck /dev/rz1b
        # mount /scratch

The fsck flag in /etc/fstab must be set to 0 in ADVFS, but must be set to
at least 1 in UFS filesystems.

Read the following documments:

        man fsck
        man fstab
        man mount
        man advfs
-----------------------------------------------------------------------------
The "Dirty file system" message happens when a file system can't be
mounted, usually because fsck needs to be run. Of course, if you never
actually created the filesystem using newfs, that could be the problem.
-----------------------------------------------------------------------------
may you have per hasard an existing /sbin/swapdefault that points to
this disk and partition b? We had problems with this once, because we did
forget about this...
-----------------------------------------------------------------------------


-----------------------------------------------------------------------------
jean.schuller_at_ires.in2p3.fr _/ _/_/_/ _/_/_/ _/_/_/_/
                                _/ _/ -/ _/ _/ _/
                               _/ _/_/_/-/ _/_/_/ _/_/_/_/
                              _/ _/ -/ _/ _/
                             _/ _/ _/ _/_/_/ _/_/_/_/
local call: 0388106630 Institut de Recherches Subatomiques
foreign call: (33)388106630 Boîte Postale 28
local fax : 0388106234 23, Rue du Loess
foreign fax : (33)388106234 F-67037 STRASBOURG CEDEX - France
-----------------------------------------------------------------------------
Received on Fri Dec 12 1997 - 09:39:22 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT