LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-03-2006, 10:03 AM   #1
Clemente
Member
 
Registered: Aug 2003
Distribution: Debian, Ubuntu
Posts: 188

Rep: Reputation: 30
e2fsck: root partitions and ro mounted partitions


Hi all,

I am running a server with an ext3 filesystem as root partition and I really don't like to boot the machine with any rescue cd's everytime that e2fsck finds someting to fix.
On the other hand, I cannot find any information about how safe it is to do e2fsck on a read only mounted file system.

Does anyone know anything about this? Or can point me somewhere fpr further reading!

Thanks a lot!!!
Clemente
 
Old 11-03-2006, 12:46 PM   #2
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
You shouldn't be running fsck on a mounted filesystem, whether it's ro or not. The kernel should check all file systems periodically on boot, before the partitions are mounted. If file system corruption is occurring regularly, you have a problem, which should be fixed as soon as possible!
 
Old 11-04-2006, 06:48 AM   #3
Clemente
Member
 
Registered: Aug 2003
Distribution: Debian, Ubuntu
Posts: 188

Original Poster
Rep: Reputation: 30
Hi Gethyn,

no good news... But thanks anyway
To summarize: If I use any ext3 filesystem on a sevrer, I have to periodically reboot the machine. No safe way out.

What could I do, if I want to establish a 24/7 server. I cannot reboot periodically in this szenario.

Thanks for any (even bad ) news,
Clemens
 
Old 11-06-2006, 04:37 AM   #4
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
Unless you have hardware problems, there shouldn't be any filesystem corruption occurring in a system that's always on. The usual cause of filesystem corruption is improper shutdown of a machine.

My advice would be to (a) invest in an uninterruptible power supply, so if there is a power cut you can shut the machine down properly, and (b) make regular backups. If this is for a production server, you should already have these measures in place.
 
Old 11-06-2006, 09:32 PM   #5
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Gethyn, I've run fsck on read only mounted file systems on numerous occasions without incident. In fact, given that the e2fsck program itself lives on the root filesystem, the kernel pretty much has to mount it read only to run fsck (unless it's on some sort of RAM disk or network mountable filesystem that the kernel can get access to early in the boot process, which is usually not the case as usually automatic fscks are handled by init after / has been mounted ro).

That being said, you must never ever run fsck on a writeable filesystem. That would be bad.

If the OP is seeing constant file corruption, that generally means bad RAM (corrupting disk buffers and such) or (more likely) a hard drive on the way out, assuming that the power is reasonable stable. The advice about having back-ups is spot on -- they've saved my rear on many an occasion.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I cannot access the partitions I mounted unless I am root AndrewZorn Linux - General 8 04-09-2006 01:24 AM
How to give non-root users access to mounted partitions? black hole sun Linux - Software 5 10-28-2004 05:52 PM
How many NFS partitions can be mounted? ksingh Linux - Software 1 09-10-2004 03:29 AM
can only access mounted partitions as root true_atlantis Linux - Newbie 2 12-25-2003 08:46 AM
Mounted partitions in slack 9.0 ?! bynaar Slackware 4 03-30-2003 07:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:30 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration