DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 22nd September 2009
sherekhan sherekhan is offline
New User
 
Join Date: May 2009
Location: Norway
Posts: 7
Thanked 0 Times in 0 Posts
Default Rebuilding RAIDframe mirror after crash/power failure

I am setting up a new computer with OpenBSD, and have decided to try RAIDframe on it. I have set up two identical 10 GB disks with minimal a-partitions containing a kernel with RAIDframe support and a boot.conf to enable serial console, and b-partitions set up as a RAIDframe mirror, which in turn contains my root, swap and everything else.

I am not running a UPS on this computer, and while power failures are rare in my home they may happen. There is also the slim possibility of a crash, although I think that in all the years I've been using OpenBSD (since 3.4) I can still count all the crash incidents without running out of fingers on my first hand. Still, I have forced a power failure on the computer to see how it coped with that, and I was less than impressed with the time it took to bring the computer back up. The initial mirroring of the drives when I first set them up (raidctl -vi) took like 10-15 minutes, but when rebooting with an out of sync mirror it takes closer to an hour to bring the mirror back up. And the computer is unusable in this time.

- Why does rebuilding take so long?
- Is there anything I can do to speed this process up?
- Is it possible to let the computer boot into multiuser with all services running even with a dirty mirror, and then let it rebuild in the background?
Reply With Quote
  #2   (View Single Post)  
Old 22nd September 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,873
Thanked 190 Times in 160 Posts
Default

Quote:
Originally Posted by sherekhan View Post
- Why does rebuilding take so long?
- Is there anything I can do to speed this process up?
- Is it possible to let the computer boot into multiuser with all services running even with a dirty mirror, and then let it rebuild in the background?
To be clear, I don't run RAIDFrame, however, the misc@ archives indicate that you are not the first to voice similar concerns:

http://marc.info/?l=openbsd-misc&w=2...frame+slow&q=b

My suggestion is to study the archives (including different search terms). You will see others' experiences & possibly find other ideas.
Reply With Quote
  #3   (View Single Post)  
Old 22nd September 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,610
Thanked 214 Times in 189 Posts
Default

The default parity rebuild occurs before fsck or mounting. You can ctrl-C, or modify /etc/rc, to have it run in the background.

The risk, as I understand it, for RAID1 is of a failure of one of the mirrors -during- the parity rebuild. If the array is not writeable during the failure, data integrity is assured. But, if the array is in active use, e.g. mounted r/w or in an fsck that is changing blocks -- you may be resorting to a backup for recovery.

I run RAIDframe,
Reply With Quote
  #4   (View Single Post)  
Old 22nd September 2009
sherekhan sherekhan is offline
New User
 
Join Date: May 2009
Location: Norway
Posts: 7
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by ocicat View Post
To be clear, I don't run RAIDFrame, however, the misc@ archives indicate that you are not the first to voice similar concerns:



My suggestion is to study the archives (including different search terms). You will see others' experiences & possibly find other ideas.
I did find several interesting posts. Several suggested hacking /etc/rc to do raidctl -p instead of raidctl -P, and then do the raidctl -P at the end of /etc/rc.local. I may try this and see if it improves the situation.
Reply With Quote
  #5   (View Single Post)  
Old 22nd September 2009
sherekhan sherekhan is offline
New User
 
Join Date: May 2009
Location: Norway
Posts: 7
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jggimi View Post
The default parity rebuild occurs before fsck or mounting. You can ctrl-C, or modify /etc/rc, to have it run in the background.
This behaviour is different from several other OSes with RAIDframe or other software RAID implementations, as far as I understand.

Ctrl-C is not really an option, this is a headless machine. I may modify the startup to let the machine run fsck and all services before starting resync, though.

Quote:
Originally Posted by jggimi View Post
The risk, as I understand it, for RAID1 is of a failure of one of the mirrors -during- the parity rebuild. If the array is not writeable during the failure, data integrity is assured. But, if the array is in active use, e.g. mounted r/w or in an fsck that is changing blocks -- you may be resorting to a backup for recovery.
That sounds like an acceptable risk to me.

I do have daily backups, so for me the main reason for running RAIDframe is reducing downtime in the event of a disk failure. But having an extra hour or more of downtime every single time the power fails or the computer crashes kind of defeats that purpose.
Reply With Quote
  #6   (View Single Post)  
Old 22nd September 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,610
Thanked 214 Times in 189 Posts
Default

Are both of your disks on the same IDE channel, by any chance? That would be a reason for your performance problem.

My RAIDframe system does a parity check of a RAID 1 pair of around 50GB in just over 10 minutes.
Reply With Quote
  #7   (View Single Post)  
Old 25th September 2009
sherekhan sherekhan is offline
New User
 
Join Date: May 2009
Location: Norway
Posts: 7
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jggimi View Post
Are both of your disks on the same IDE channel, by any chance? That would be a reason for your performance problem.

My RAIDframe system does a parity check of a RAID 1 pair of around 50GB in just over 10 minutes.
No, I put them on separate channels. And even then it would not explain why a resync after a hard boot takes so much longer than the initial sync.
Reply With Quote
  #8   (View Single Post)  
Old 25th September 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,610
Thanked 214 Times in 189 Posts
Default

Look at your dmesg and any warnings about your drives that might appear in /var/log/message -- perhaps your drives are running in a low end DMA or PIO mode?

Or, perhaps you have multiple raid* devices defined on this pair of drives? Because the as-shipped /etc/rc runs "raidctl -P all", the parity-rewrite will be run simultaneously on raid0, raid1, raid2, etc. If these are on the same physical devices ... that would explain your horror story.
Reply With Quote
Reply

Tags
raid, raidframe

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
init: can't exec getty after power failure mtx FreeBSD General 0 20th January 2009 10:14 AM
Updating FreeBSD Jails after rebuilding world on host anomie Guides 0 10th September 2008 03:23 AM
What's all this power for ? Snoop1990 FreeBSD General 20 9th July 2008 10:59 PM
mirror device detached on large file copy lil_elvis2000 FreeBSD General 24 27th June 2008 02:56 PM
Upgrading and rebuilding ALL packages/ports chill FreeBSD Ports and Packages 8 16th June 2008 04:55 AM


All times are GMT. The time now is 05:25 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick