[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two hour parity check



[I originally was going to send this off-list, and decided it might be useful
to somebody else at some point (hopefully). Caveat: I am _not_ a RAID master;
the following merely outlines my experiences to date. -- sf]

On Wed, Jan 28, 2004 at 01:59:32PM -0800, vex555@gmx.net said:
> Hi All,
>
> As I type this I am waiting for my web server-to-be to do a parity check
> after an unclean shutdown. It takes over two hours before the machine
> boots up and can serve or run sshd.
[snip]

be glad it's only 2 hours. :) I set up a RAID5 of 4x160GB 5400RPM IDE disks a
while back (2 disks per promise PCI IDE card), and parity rebuild on that
takes _fourteen_ hours. Not fun. However ...

> While it is doing this it just displays...
>
> WARNING: / was not properly unmounted
> raid0: Parity status: DIRTY
> raid0: Initiating re-write of parity
[snip]

It's possible to have this run in background and continue normal bootup, and
even use the system in the meantime (obviously you can't use the RAID
filesystem until parity is rebuilt, but the rest of the system is useable).
Unfortunately, I can't remember what I did to make this happen. I _think_ I
just hit ctrl+c during boot when it stops to check parity, and boot continues
normally. After I logged in, I noticed that parity rebuild was continuing in
background. Not sure how you'd script all that, though.

> I'm running raidctl to give a raid1 mirror across two 200 gig IDE
> drives. Due to this being my first experience with BSD installation and
> software raid I set it up with just one large / partition. I know this
> is probably a bad idea (despite apache running in chroot environment)
> but I just wanted to get it up and running.

definitely you want multiple filesystems. At the minimum, / /tmp /var /home
/usr and /usr/local.

> Question is - if I change the partitioning to give separate partitions
> for lets say /, home, etc, usr, will it speed up the boot time after an
> unclean shutdown or will it still sit there checking every partition
> one after the other?

fsck will run on every filesystem not cleanly unmounted. However, that
probably won't be any slower than a single massive partition (and you may
find that it will be faster). You may also wish to use the soft updates mount
option on your RAID filesystem; I did that (450GB filesystem) and read/write
performance improved considerably.

2 hours is long, but when you're running software RAID on IDE disks, you have
to consider the time as being similar to, say, windows defrag on a disk of
the same size. Want more speed, gotta get hardware RAID and SCSI. I couldn't
afford it (assuming I could have even found SCSI disks large enough to give
me .5TB in a 2U box), and went with the cheap IDE solution. I avoid the
parity rebuild problem by being _very_ careful to cleanly unmount the
filesystem and the RAID set.
--
       Scott Francis | darkuncle(at)darkuncle(dot)net | 0x5537F527
"I gave you the chance of aiding me willingly, but you have elected the way
of pain!" -- Saruman, speaking for sysadmins everywhere

[demime 0.98d removed an attachment of type application/pgp-signature]