Koozali.org: home of the SME Server

Unclean shutdown, raid and fsck

Offline allsorts

  • *
  • 38
  • +0/-0
Unclean shutdown, raid and fsck
« on: November 24, 2008, 01:17:46 PM »
For some unknown reason my 7.3 server stopped serving DNS, ssh and I couldn't get in at the consol. It was still running, as you could browse a users directories from a windows workstation and the connected VFD status display was still changing and updating.

As I couldn't get in via the consol, ssh or server manager and ctl-alt-del at the consol didn't do anything either I was forced to depower the box. On coming back up I got the expected "Your system appears to have shut down uncleanly" and "Press Y within 5 seconds to force file system integrity check...". Trouble is 5 seconds is not long enough to read and decide what action to take, so I didn't get to pressing "Y"...

The server came back up fine and appears to be working normally again. It's running with software RAID across two physically identical 160G discs. Looking at the disc redundancy on the consol that reports "All RAID devices are in clean state" but the number of blocks on each disc are *very* different, 104320 on one and 156183808 on the other.

Should I manually run and fsck or a RAID resync of some sort?
Cheers
Dave.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Unclean shutdown, raid and fsck
« Reply #1 on: November 24, 2008, 03:15:04 PM »
hi

no.. your server and your raid are ok..

What you see in console are two md disk, one for /boot (the smaller) and the other for /

ciao
Stefano

Offline piran

  • *****
  • 502
  • +0/-0
Re: Unclean shutdown, raid and fsck
« Reply #2 on: November 24, 2008, 04:28:42 PM »
Trouble is 5 seconds is not long enough to read and decide what action to take, so I didn't get to pressing "Y"...

http://forums.contribs.org/index.php/topic,32802.msg139277.html#msg139277
The autofsck contrib still appears to work its magic
although it may look out of date and is not specifically
documented in the wiki's contribs area. It reverses the
querying logic in that you have 5secs to say 'N' to cancel
the automatic check on the designated unclean condition.
Works for me. YMMV

Offline allsorts

  • *
  • 38
  • +0/-0
Re: Unclean shutdown, raid and fsck
« Reply #3 on: December 01, 2008, 04:12:31 PM »
Thanks guys.

But it does raise the question of should the default for checking the file system be changed such that it runs automagically if a unclean shutdown is detected and/or make the timeout a bit longer so it's possible to read and action as appropiate?
Cheers
Dave.

Offline m

  • *****
  • 276
  • +0/-0
  • Peet
Re: Unclean shutdown, raid and fsck
« Reply #4 on: December 01, 2008, 04:33:43 PM »
Dave,
you don't need to run a filesystem check on a journaling filesystem. Inconsistent filesystems are corrected at boot time in the journal log replay. Ignore the 5 sec prompt and let the system boot normally.

Offline allsorts

  • *
  • 38
  • +0/-0
Re: Unclean shutdown, raid and fsck
« Reply #5 on: December 05, 2008, 11:21:39 AM »
Ah right, thanks. That level of FS knowledge is beyond me.

Might be sensible to set the default to not offering the fschk choice in the first place, provided that the system knows at that stage of the boot sequence that it has a journalled FS...

Saves the worry for admins like me who don't have intimate knowledge of file systems.  B-)
Cheers
Dave.