[email protected] (Tinker), 2016.02.20 (Sat) 15:29 (CET): > This email is an attempt to get some knowledge on how softraid works.
So many of your questions are answered if you start with bioctl(8)[1], and continue with softraid(4)[2]. Maybe bio(4)[3] helps, too. What's there is usually documented. What's not documented is usually not there. Or was it the other way around? ;-) [1]http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man8/bioctl.8 [2]http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man4/softraid.4 [3]http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man4/bio.4 Happy reading, Marcus > There's basically zero docs on these topics out here (all docs are > about how to set it up first & subsequent times in non-failure cases). > > If you would be able to respond in "HOWTO form" would be awesome, then > at least this will be the Ultimate Softraid Reference :D > > Q1: > Can softraid do > > a) Scrub (as in read all the underlying media and check they're in check, > e.g. "raid fsck"), > > b) Hotspare (as in have one or more pre-designated physical disks that the > softraid would switch into use if one of the physical disks in use already > breaks), > > c) Hotswap (as in I could unplug one of the physical disks in a raid live, > and presuming my HBA allows it, the OpenBSD kernel + softraid will be happy > to plug in and plug out disks live - and I guess perhaps that needs to play > together with the rebuild then)? > > > Q2: > And, how do you use the rebuild + these three things? Specifically: > > a) How do I check the status of a rebuild from the console? (E.g. disk > blablaX rebuilding 12.3% done, get report if the rebuild failed, etc.) > b) How do I plug in a physical disk live into my RAID1 softraid? > > c) How do I plug out a physical disk live from my RAID1 softraid? > > d) How do I initiate a rebuild on a RAID1 softraid, such as plugging in the > brand new disk sdX into my RAID1 softraid or sdX was used previously or > suffered a power outage or whatever - how do I rebuild it? > > e) How do I get a listing of all my softraids and of all the physical disks > plugged into them, from the console? > > f) How do I tell softraid to "scrub" i.e. intregrity-check all the physical > disks running in the softraid, including every sector so actually all of > their surfaces are read (presuming that the RAID takes up all the disks)? > > g) How do I tell my RAID1 softraid that if sdX dies, then sdY should be > plugged in (i.e. hot spare)? > > Also, how do I get a printout of that configuration from the console, > and how do I remove a hotspare? > > h) After I plug out a physical disk from my softraid ( c) above), what > should I generally need to do before unplugging it also physically - just > wait 60 seconds or do some magic "SATA power off" command or the like? > (Given an ultra nice SATA or HW RAID controller such as LSI HBA or LSI > Megaraid.) > > i) When I plug in a physical disk on my SAS/SATA HBA (be it an LSI HBA or > LSI HW RAID), will OpenBSD autodetect it and assign a device name for it > just like it does for USB devices so it's complete hotswap/plug and play? > > j) When I plug in a softraid that worked before, what kind of trouble could > happen - if it won't get going at all, should I just reset from backup, or > is there some kind of "rescue rebuild" I could attempt? > > k) Do I need to know anything about DUID vs. device name use within the > softraid? > > > Looking forward to your explanation, thanks!! :DD > Tinker > > > !DSPAM:56c879bd171961725512869!

