[CentOS] unattended fsck on reboot

Thu Feb 18 12:12:01 UTC 2010
Kai Schaetzl <maillists at conactive.com>

Rudi Ahlers wrote on Thu, 18 Feb 2010 10:54:11 +0200:

> The server booted up, ran fsck, then each VM, as it booted up ran fsck as
> well - which just slowed down the whole process since there's a 5 minute
> delay in starting each VM.

Why would you autostart a VM only every 5 minutes? Or did you mean the next 
one only started once the earlier one had finished fsck? As mine aren't doing 
this I haven't ever seen that.

But by the time most users could reconnect, 2+
> hours have lapsed. this particular server wasn't rebooted in 274 days,

Which means it ran without many kernel security updates for a long time.

> But, how does one get past this? I know we need to reboot from time to time,
> but more than often it's (preferably) not sooner than 6 - 10 months, so fsck
> will run.

You use tune2fs on the VM filesystems as Mogens explains. Then you don't have 
any extra downtime for the VMs. When I reboot servers it takes about ten extra 
ping losses for the dom0 fsck if it is time.
For the VMs you then run it twice a year manually (or by script) from dom0. 
Take the VM down, mount the LVM partitions, run fsck, unmount, start again. 
Should take less than 5 minutes per VM.

Kai

-- 
Get your web at Conactive Internet Services: http://www.conactive.com