LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Checking consistency of journaling filesystems (https://www.linuxquestions.org/questions/linux-hardware-18/checking-consistency-of-journaling-filesystems-215014/)

Darktyco 08-08-2004 12:16 PM

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

phase9 08-08-2004 02:43 PM

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.

Electro 08-08-2004 03:41 PM

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.

Darktyco 08-08-2004 05:46 PM

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?

RHELL 08-09-2004 06:44 PM

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

J.W. 08-09-2004 08:18 PM

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.


All times are GMT -5. The time now is 12:53 PM.