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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-03-2006, 11:03 AM
|
#1
|
Member
Registered: Aug 2003
Distribution: Debian, Ubuntu
Posts: 188
Rep:
|
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
|
|
|
11-03-2006, 01:46 PM
|
#2
|
Member
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900
Rep:
|
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!
|
|
|
11-04-2006, 07:48 AM
|
#3
|
Member
Registered: Aug 2003
Distribution: Debian, Ubuntu
Posts: 188
Original Poster
Rep:
|
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
|
|
|
11-06-2006, 05:37 AM
|
#4
|
Member
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900
Rep:
|
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.
|
|
|
11-06-2006, 10:32 PM
|
#5
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
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.
|
|
|
All times are GMT -5. The time now is 06:48 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|