You are not logged in.

#1 2007-10-20 08:26:53

TPJ
Member
From: Gliwice, Poland
Registered: 2005-12-21
Posts: 33

How can I change filesystem check bahaviour in /etc/rc.sysinit?

Every time I boot my system, my filesystem is checked. Since it takes some time, I decided to change the /etc/rc.sysinit script so the filesystem check is performed every 100 boots (or once a month). I wanted to save the needed data ("boots counter" and the last filesystem check date) to a file placed in /var, but I got some error message saying that the / filesystem has been mounted read-only.

Where can I store such information?

Offline

#2 2007-10-20 09:57:47

wuischke
Member
From: Suisse Romande
Registered: 2007-01-06
Posts: 630

Re: How can I change filesystem check bahaviour in /etc/rc.sysinit?

Hi,

I assume you are using ext2/3. Use tune2fs to set the number of mounts before the file system will be fully checked. (tune2fs -c 100 /dev/sda1 is the syntax, iirc, I use jfs nowadays)

Offline

#3 2007-10-21 19:23:54

heller
Member
Registered: 2005-02-14
Posts: 2

Re: How can I change filesystem check bahaviour in /etc/rc.sysinit?

you can also change the filesystem checking behavior in /etc/fstab. The last two numbers control that ...

Offline

#4 2007-10-22 13:59:46

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: How can I change filesystem check bahaviour in /etc/rc.sysinit?

actually, the last number in fstab controls that.

0 - no checks performed
1 - checked in first round (use for root)
2 - checked in second round (use for other partitions)

linux fstab manpage wrote:

The sixth field, (fs_passno), is used by the fsck(8) program to determine 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.


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#5 2007-10-22 18:55:14

retsaw
Member
From: London, UK
Registered: 2005-03-22
Posts: 132

Re: How can I change filesystem check bahaviour in /etc/rc.sysinit?

If you are using ext2/3 then that data is already stored in the filesystem and you can view it using "dumpe2fs"

Offline

Board footer

Powered by FluxBB