LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-11-2011, 06:37 PM   #1
hohum
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Rep: Reputation: 0
Thumbs up fsck on mounted filesystems


kspice allows you to run your server in perpetuation - i.e. without a restart. So do lazy sysadmins that just never do. So how would you know if your file system has errors in it? If you do fsck -n <dev> then you'll get errors that you really need to know your stuff backwards to know if it's an actual problem or not (especially with xen and raw disk image files).

Another scenario: your server goes down (for whatever reason) and it's been up for a year. Your filesystem is set to check itself after a period of time. This means your time to reboot is 10-15 minutes instead of 1. Heart attack time. But it's necessary - you can't just tune2fs the checks out, for example.

I've never really come up with a satisfactory answer for this. The closest I've got is to take a snapshot of your lvm & run fsck over that instead however that's a pita to implement automatically (say as a cron job) and I do have some systems that aren't on lvm.

Is a disk check a little like quantum physics - i.e. observing it causes a state change? What's the deal? Anyone got any interesting fantastic manuals or articles to read? (rtfm/a?) Anyone else got this problem licked? How do you do it?


Cheers
 
Old 11-11-2011, 10:05 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Quote:
Originally Posted by hohum View Post
kspice allows you to run your server in perpetuation - i.e. without a restart. So do lazy sysadmins that just never do. So how would you know if your file system has errors in it? If you do fsck -n <dev> then you'll get errors that you really need to know your stuff backwards to know if it's an actual problem or not (especially with xen and raw disk image files).
You can't fsck a mounted filesystem; doing that would just corrupt it. You're not expected to know the filesystem details, just let fsck do its job correcting any corruption, and restore any deleted files from your backup. They were corrupted anyway, that's the point - fsck is just the messenger.

Quote:
Another scenario: your server goes down (for whatever reason) and it's been up for a year. Your filesystem is set to check itself after a period of time. This means your time to reboot is 10-15 minutes instead of 1. Heart attack time. But it's necessary - you can't just tune2fs the checks out, for example.
In the days before redundant load balanced servers, downtime was a problem. If you're still configured without redundancy, your uptime is a low priority, not "heart attack time".

Quote:
I've never really come up with a satisfactory answer for this. The closest I've got is to take a snapshot of your lvm & run fsck over that instead however that's a pita to implement automatically (say as a cron job) and I do have some systems that aren't on lvm.

Is a disk check a little like quantum physics - i.e. observing it causes a state change? What's the deal? Anyone got any interesting fantastic manuals or articles to read? (rtfm/a?) Anyone else got this problem licked? How do you do it?


Cheers
You schedule downtime, verify the health of the backup server, and switch over the backup to primary. Then take your server down for maintenance. Take your time, do it right, verify function, then put it back in service.
 
Old 11-12-2011, 01:50 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,595

Rep: Reputation: 3114Reputation: 3114Reputation: 3114Reputation: 3114Reputation: 3114Reputation: 3114Reputation: 3114Reputation: 3114Reputation: 3114Reputation: 3114Reputation: 3114
I concur.

I was reluctant to reply to this as I'm not responsible for (large) production environments.
However, I don't see the ksplice situation any different from the past where admins crowed about uptime measured in years. You want to fix (FSVO "fix") your filesystem, you take your system(s) down to do so. And use a modern f/s - ext4 is much quicker to fsck, as no doubt are others. There will be online fsck in the not too distant future, but may take a while to be accepted (and shipped) by the major distributors.
 
Old 11-12-2011, 08:40 AM   #4
hohum
LQ Newbie
 
Registered: Jul 2007
Posts: 11

Original Poster
Rep: Reputation: 0
but that's why I said fsck -n (see man):

Quote:
-n For some filesystem-specific checkers, the -n option will cause the fs-specific fsck to avoid attempting to repair any problems, but simply report such problems to std-
out. This is however not true for all filesystem-specific checkers. In particular, fsck.reiserfs(8) will not report any corruption if given this option. fsck.minix(8)
does not support the -n option at all.
You're absolutely right about redundancy. I have just taken on this role and their are some complexities surrounding that with these particular systems.

Thanks for your input though - I appreciate and value it.

It'd sure be nice to get an answer too, if anyone knows.

Last edited by hohum; 11-12-2011 at 08:42 AM.
 
  


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
Fsck and Manually mounted filesystems Panci Linux - General 3 11-12-2010 08:32 AM
Changing how filesystems are mounted kaplan71 SUSE / openSUSE 2 02-23-2009 04:48 PM
'Checking filesystems fsck.ext3: Unable to resolve UUID amadain Fedora - Installation 2 12-07-2008 07:41 AM
mounted devices/ filesystems ergo_sum Linux - Newbie 4 11-01-2003 05:43 AM
automounted filesystems should be mounted using nosuid ForumKid Linux - Security 2 01-09-2002 01:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:43 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration