Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Shutdown uncleanly, how to force fs integrity check?
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
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Mon May 31, 2004 1:16 am    Post subject: Shutdown uncleanly, how to force fs integrity check? Reply with quote

hi all

I've switched from fedora to gentoo for several weeks, love it!
Then I found something a little bit different:

When my system goes down 'uncleanly' for some reason (power off
accidentally, etc.), the fedora/redhat will 'force filesystem integrity check'
automatically on next boot time while gentoo don't. (Instead, I find out that
gentoo checks after 'the filesystem has been mounted for 38(?) times').

Here is my question:

How to make gentoo to force fs integrity check on next boot time after system
uncleanly goes down?

I've beening searching the forum for quite a while with keywords like 'rc-update
add checkfs' 'auto check fs' 'force check fs'.... still no luck :(

Thanks ahead for the one who's gonna help me out (any grammar error?) :oops:
_________________
- http://nkbit.com
- http://twitter.com/xuyihua
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Mon May 31, 2004 2:27 am    Post subject: Reply with quote

touch /forcefsck will tell Gentoo to run a full fsck on next boot. However this is more a manual thing.

Otherwise /etc/init.d/checkfs will run "fsck -C -T -R -A -a" - see the fsck man page. Note this applies to non root filesystems only.

root is checked by /etc/init.d/checkroot; this will run "fsck -C -T -a".
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Mon May 31, 2004 6:30 am    Post subject: Reply with quote

ecatmur wrote:
touch /forcefsck will tell Gentoo to run a full fsck on next boot. However this is more a manual thing.

Otherwise /etc/init.d/checkfs will run "fsck -C -T -R -A -a" - see the fsck man page. Note this applies to non root filesystems only.

root is checked by /etc/init.d/checkroot; this will run "fsck -C -T -a".


Thanks, ecatmur!

I've read the fsck man page, and here's another question:

How does fedora know that my system shutdown uncleanly? Is there a daemon
running like... a database transaction? --

when the system boots, it write something like: BEGIN...
before the system totally goes down, it 'COMMIT' it??
then if the system accidentally shutdown uncleanly, the daemon finds out that
there is no 'COMMIT' matches the latest 'BEGIN', then the 'force fs integrity check' starts?

8O
_________________
- http://nkbit.com
- http://twitter.com/xuyihua
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: Mon May 31, 2004 12:17 pm    Post subject: Reply with quote

EricHsu wrote:

How does fedora know that my system shutdown uncleanly? Is there a daemon running like... a database transaction? --
No.
When you mout a filesystem like ext2, it is marked unclean. Only at a correct unmout will this mark be reset to clean. When the system crashes, it cannot do a clean unmount and therefore the fs wil stay marked unclean, until you run fsck on it.
_________________
Please put [SOLVED] in your topic if you are a moron.
Back to top
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Tue Jun 01, 2004 1:02 pm    Post subject: Reply with quote

nephros wrote:
EricHsu wrote:

How does fedora know that my system shutdown uncleanly? Is there a daemon running like... a database transaction? --
No.
When you mout a filesystem like ext2, it is marked unclean. Only at a correct unmout will this mark be reset to clean. When the system crashes, it cannot do a clean unmount and therefore the fs wil stay marked unclean, until you run fsck on it.


yeah~ I clearly understand now:)
and well, the 'mark unclean' still feels like database transaction but without any
'daemon', umm, simple and direct...

Thanks a lot!
_________________
- http://nkbit.com
- http://twitter.com/xuyihua
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