Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]fsck on boot question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Qubax
Guru
Guru


Joined: 19 Jul 2002
Posts: 451
Location: Tirol, Austria

PostPosted: Sun Oct 27, 2002 11:06 am    Post subject: [solved]fsck on boot question Reply with quote

gentoo is set up completely and working. then i hot a second hd, put it into my box, and now after same time i found out, that on boot my root-partition is checked after sometime or a number of reboots, but not the second hd, that i got.
where do i have to tell him, that also this hd should be checked from time to time?


Last edited by Qubax on Mon May 12, 2003 8:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
px
Guru
Guru


Joined: 26 Sep 2002
Posts: 497
Location: Metz, France

PostPosted: Sun Oct 27, 2002 11:18 am    Post subject: Reply with quote

you can change the number of mount needed for a check with tune2fs (use -j if it's journalised fs, ext3)
_________________
Nous autres, mordus d'informatique, préférons par-dessus tout passer notre temps à bidouiller nos ordinateurs, plutôt que les utiliser pour faire quelque chose de productif. [Dave Barry]
Back to top
View user's profile Send private message
Qubax
Guru
Guru


Joined: 19 Jul 2002
Posts: 451
Location: Tirol, Austria

PostPosted: Sun Oct 27, 2002 6:23 pm    Post subject: Reply with quote

i don't want to change the number of mount until it checks, i want to tell him that he should also check the second hd in the box
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Sun Oct 27, 2002 7:07 pm    Post subject: Reply with quote

This is done in /etc/fstab on a per filesystem basis.
man fstab 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.
So, where your / fs entry may look like
Code:
/dev/hda4               /               ext3            noatime                0 1
You might have something like this for your fs on the 2nd HD
Code:
/dev/hdb1               /some/path               ext3            noatime                0 2

_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
qeldroma
Guru
Guru


Joined: 17 Oct 2002
Posts: 370

PostPosted: Tue Nov 22, 2005 1:31 pm    Post subject: HowTo configure filesystemchecks? Reply with quote

Hello again,

what is the "gentoo-way" of filesystem checks? And how do i have to tweak it? I didn't find any docu by now concerning this VERY important feature. Is there one?

Kind regards, Qeldroma
Back to top
View user's profile Send private message
nephros
Advocate
Advocate


Joined: 07 Feb 2003
Posts: 2139
Location: Graz, Austria (Europe - no kangaroos.)

PostPosted: Tue Nov 22, 2005 2:46 pm    Post subject: Reply with quote

Can you be more specific with your question?

Filesystems are automatically checked at boot if needed (which is seldom if you are using journaling filesystems and have a stable machine), except when this is turned off in /etc/fstab.

If you want to do regularly scheduled checks anyway, see the man pages on the fsck programs on how to check filesystems when they are mounted.

To repair errors, they have to be unmounted, so you could do that either from a livecd system, or by booting with init=/bin/bash or /bin/busybox and check from there.

HTH.
_________________
Please put [SOLVED] in your topic if you are a moron.
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Tue Nov 22, 2005 4:13 pm    Post subject: Reply with quote

man fstab should tell you what you want to know.
Code:
 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.

_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
qeldroma
Guru
Guru


Joined: 17 Oct 2002
Posts: 370

PostPosted: Tue Nov 22, 2005 4:36 pm    Post subject: Reply with quote

@nixnut: Thx! Didn't knew there is a fstab-variable ;)

@all: I've got a server running journalled, but it looses files?! Don't know how to recover, so i wanted to be sure, that gentoo in standard-installation DOES fixups on boot....

What i really wonder is, that this server has got SCSI-RAID10 and is nevertheless loosing data?!?!?!?

It's an IBM z205, afaik...

I just want to get my neck out of the rope on this fault... :cry:

Greetings, Qeldroma
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Tue Nov 22, 2005 5:37 pm    Post subject: Reply with quote

Moved from Installing Gentoo
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Thaidog
Veteran
Veteran


Joined: 19 May 2004
Posts: 1053

PostPosted: Wed Oct 22, 2008 7:19 pm    Post subject: skipping root filesystem check (fstab's passno == 0) Reply with quote

I keep getting this message at boot right before the system tries to mount the root xfs filesystem as read/write.

What does that mean? I can not get my system to boot up because of no read / write - it ask for root password for maintenace but xfs_check and xfs_repair do nothing... same thing every time I boot up.
_________________
Registered Linux User: 437619
"I'm a big believer in technology over politics" - Linus Torvalds
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Wed Oct 22, 2008 7:38 pm    Post subject: Reply with quote

Code:
# <fs>                  <mountpoint>    <type>          <opts>                          <dump/pass>
LABEL=Root    /             ext3         noatime,data=journal                            0 1

This is an excerpt from my /etc/fstab file. Yours most likely has a zero in the last column of the line that defines your root filesystem. Change it to a one so that it is checked on the first pass of the fsck. A zero value tells fsck to not check a filesystem, which is not a good thing for your root filesystem. :D
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Wed Oct 22, 2008 7:41 pm    Post subject: Reply with quote

merged above post here. please search (better) before posting.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Thaidog
Veteran
Veteran


Joined: 19 May 2004
Posts: 1053

PostPosted: Wed Oct 22, 2008 8:16 pm    Post subject: Reply with quote

nixnut wrote:
merged above post here. please search (better) before posting.
I have tried that but I still get the same error:Skipping root filesystem check (fstab's passno == 0)Remounting root filesystem read/write ...Root filesysten coud not be mounted read/write ;{Give root password for maintenance(or type Contro - D continue):I've tried xfs_repair in knoppix (and that's after a xfs_check)I've tried doing an xfsdump of the fifesystem, repartitioning the /dev/hda2 partition and then doing a xfsrestore... still no luck.I have no idea what is causing this error... flat out!
_________________
Registered Linux User: 437619
"I'm a big believer in technology over politics" - Linus Torvalds
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Wed Oct 22, 2008 8:26 pm    Post subject: Reply with quote

Post the contents of your /etc/fstab file as well as the output of running "fdisk -l".
Back to top
View user's profile Send private message
Thaidog
Veteran
Veteran


Joined: 19 May 2004
Posts: 1053

PostPosted: Wed Oct 22, 2008 8:59 pm    Post subject: Reply with quote

yabbadabbadont wrote:
Post the contents of your /etc/fstab file as well as the output of running "fdisk -l".


Ok I'm offically burnt out... I has puttting the fstab in the /boot directory! I need some wine! :? Al is good... accept the headache!
_________________
Registered Linux User: 437619
"I'm a big believer in technology over politics" - Linus Torvalds
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum