LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 08-08-2004, 12:16 PM   #1
Darktyco
Member
 
Registered: Aug 2003
Location: michigan
Distribution: slackware
Posts: 59

Rep: Reputation: 15
Checking consistency of journaling filesystems


How important is it to check the consistency of an ext3 drive? I have a drive that notifys me to check it everytime it gets mounted. The computer this drive is in is frequently & abrubtly powered on and off by its users, so is it a good idea to always check it when it says so? If it is a good idea, is there some way to enable the check during system startup? I'm running a small distro I put together myself so it isn't enabled by default like it is in the popular distros I've used.

Thanks
 
Old 08-08-2004, 02:43 PM   #2
phase9
Member
 
Registered: Mar 2004
Location: austria, vienna
Distribution: slackware-10.2
Posts: 89

Rep: Reputation: 15
Hi!

Quote:
The computer this drive is in is frequently & abrubtly powered on and off by its users
Doing this, data loss is only a matter of time.
Each time an ext2 or ext3 FS isn't shut down probably, during the next reboot a FS check should be done (most distros do this automatically).
Or try tune2fs -c<n> <dev> to check the FS after <n> mounts (man tune2fs).

The best solution is to "educate" your users to shut down the box in a proper way.
 
Old 08-08-2004, 03:41 PM   #3
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
You can set the partitions in read-only state and use a file server to store user files. The way that phase9 gave is the correct way to customize the filesystem to check its integrity on every boot.
 
Old 08-08-2004, 05:46 PM   #4
Darktyco
Member
 
Registered: Aug 2003
Location: michigan
Distribution: slackware
Posts: 59

Original Poster
Rep: Reputation: 15
I believe I could get away with mounting the drive read-only: it runs a specific app all day. It doesn't have tune2fs on it (as far as I'm aware- unless it is a part of BusyBox) so I'll give it a shot first. If it is mounted as read-only, nothing will happen to the consistency of the drive when it is not umounted cleanly, correct?
 
Old 08-09-2004, 06:44 PM   #5
RHELL
Member
 
Registered: Feb 2004
Location: Outermost mingetty
Distribution: RHEL3,RH4U4,Sol9, Sol10
Posts: 321

Rep: Reputation: 31
For ext3 you'd probably want e2fsck, which will check to see if the journal is clean and then exit quickly unless something needs to be done.

http://www.die.net/doc/linux/man/man8/e2fsck.8.html
 
Old 08-09-2004, 08:18 PM   #6
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
To reiterate phase9's point: I think it would be time very well spent to talk to the user(s) who are abruptly shutting down the PC improperly. Apart from data loss, it's possible that you could crash the entire disk or otherwise knock that box out of commission, and that you'd need to buy a new machine. Those kinds of foreseeable hassles should be avoided at all costs, so I would suggest considering either putting the machine in a locked room and leave it running all the time, or have the users sign a document indicating they will take full financial responsibilty for any machines damaged by their abuse. Just my 2 cents -- J.W.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
system crashes, checking filesystems error iclinux Linux - Newbie 1 01-21-2005 02:42 AM
Where is the Consistency ToeShot General 2 11-08-2004 12:09 PM
windows filesystems vs. linux filesystems irfanhab General 8 05-25-2004 07:21 AM
check tar consistency Vyeperman Linux - General 1 05-01-2004 06:26 PM
Journaling Filesystems for Linux jeremy Linux - General 3 12-04-2003 06:12 PM


All times are GMT -5. The time now is 06:55 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration