You are not logged in.

#1 2005-08-03 16:03:21

thorstenhirsch
Member
Registered: 2005-08-03
Posts: 127

no automatic fsck when fs corrupt?

Hi,

it's probably an issue concerning JFS only, because I haven't tried other filesystems with arch linux: whenever my system did not shutdown well (most time the umount hangs, it's probably a problem regarding ntfs - but this is not the issue here), my root fs is staying mounted read-only during the next boot. So I get a lot of errors and have to run fsck.jfs manually and reboot again.
Why?
Can't this be done by arch automatically? Other distros do that. In fact, they don't reboot after fsck-ing, but remount the fs writable.

Thorsten

Offline

#2 2005-08-03 18:04:00

paranoos
Member
From: thornhill.on.ca
Registered: 2004-07-22
Posts: 442

Re: no automatic fsck when fs corrupt?

that's one of the benefits of using journaled filesystems like jfs, xfs, and reiser. journaling means that the filesystem makes a log of all the writes being made to disk.

i was about to explain further details, but i think i've always been confused about the issue smile go read up about it.

anyway, ext2 should be the only filesystem that runs fsck on bootup.

Offline

#3 2005-08-03 18:13:51

thorstenhirsch
Member
Registered: 2005-08-03
Posts: 127

Re: no automatic fsck when fs corrupt?

I know about the benefits of journaled fs and yes, I know that fsck is not needed normally, BUT it is needed to replay the journal when my laptop suddenly runs out of power. ...or the umount of the ntfs partition leads to a lock of the whole system, ...or - think of whatever you like, the point is, that I don't see any benefit in not running fsck automatically when it's needed - and this is the case when the root fs is mounted read-only and not being remounted rw during bootup.

Offline

#4 2005-08-04 18:56:16

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: no automatic fsck when fs corrupt?

I noticed JFS doesn't want to be mounted after an unclean umount. Pretty annoying. The mount command just throws a strange error.

BUT, here's how to fix it: edit your /etc/fstab and in the last column (<pass>) replace 0 with 1 for your / and with 2 for any other mount.

/dev/hda5       /                       reiserfs defaults       0       1
/dev/hda7       /home                   reiserfs defaults       0       2
/dev/hda8       /stuff                  jfs     defaults        0       2

A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#5 2005-08-04 22:26:19

thorstenhirsch
Member
Registered: 2005-08-03
Posts: 127

Re: no automatic fsck when fs corrupt?

Thanks, FUBAR!

Yes, this works indeed for unclean umounts....but fsck is now being called always. Well, I don't know if I understand what Gentoo is doing, but to me it looks like, that it is using some kind of flag file which indicates that the umount was not clean and therefore fsck must be called. Is this the way arch would also do it if JFS wouldn't bring up this strange error, you're talking about?

However, thanks again, this is a good solution.

Offline

#6 2005-08-10 10:01:54

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: no automatic fsck when fs corrupt?

thorstenhirsch wrote:

Thanks, FUBAR!

Yes, this works indeed for unclean umounts....but fsck is now being called always. Well, I don't know if I understand what Gentoo is doing, but to me it looks like, that it is using some kind of flag file which indicates that the umount was not clean and therefore fsck must be called. Is this the way arch would also do it if JFS wouldn't bring up this strange error, you're talking about?

However, thanks again, this is a good solution.

Yeah I know, fsck is called every boot. But I don't think it's completely run every time, only after unclean shutdowns. It doesn't take as long anyway, it just outputs some info.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

#7 2005-08-11 10:38:12

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 674
Website

Re: no automatic fsck when fs corrupt?

FUBAR wrote:

I noticed JFS doesn't want to be mounted after an unclean umount. Pretty annoying. The mount command just throws a strange error.

BUT, here's how to fix it: edit your /etc/fstab and in the last column (<pass>) replace 0 with 1 for your / and with 2 for any other mount.

How does that become for a system with separated /boot & / partitions : 0 1 & 0 2 ? or 0 1 & 0 1 ?

Here is what I have :

/dev/discs/disc0/part1  /boot ext  defaults 0 1
/dev/discs/disc0/part2  swap swap  defaults 0 0
/dev/discs/disc0/part5  / ext3  defaults 0 1
/dev/discs/disc0/part6  /var jfs  defaults 0 1
/dev/discs/disc0/part7  /home ext3  defaults 0 1
/dev/discs/disc1/part2  /mnt/sda2 jfs  defaults 0 0

Note that I use jfs (journalized + faster with big files) on /var since /var/www will host a zope/plone CMS web server that store all data in a single huge (NNN MB) file.


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#8 2005-08-15 13:30:51

FUBAR
Member
From: Belgium
Registered: 2004-12-08
Posts: 1,029
Website

Re: no automatic fsck when fs corrupt?

kozaki wrote:

How does that become for a system with separated /boot & / partitions : 0 1 & 0 2 ? or 0 1 & 0 1 ?

Well, for / you use "0 1" and for every other partition it's "0 2". I don't know why, but that's what it says in "man fstab":

man fstab
The sixth field, (fs_passno), is used by the fsck(8) program to  deter-
       mine the order in which filesystem checks are done at reboot time. The
       root filesystem should be specified with a fs_passno of  1,  and  other
       filesystems  should  have a fs_passno of 2.
  Filesystems within a drive
       will be checked sequentially, but filesystems on different drives  will
       be  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 fsck will assume that the filesystem does not need to
       be checked.


A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.

Offline

Board footer

Powered by FluxBB