[olug] The "other" raid utility usage

Nick Walter waltern at iivip.com
Tue Apr 22 16:15:19 UTC 2003


Hmm, interesting.  Hot swapping with a hardware RAID controller is old
news, but I've never heard of doing it with software RAID on linux.  I'd
be scared to pull a drive out of a running array for fear of what
bizarre conniptions the SCSI driver would have.  Did you have to use a
special utility to deactivate the drive first?

Nick Walter


On Tue, 2003-04-22 at 11:28, Matthew G. Marsh wrote:
> OK - the posting on the software raid stuff done at the last meeting by
> Adam got me wondering. Last time I played with SoftRaid was back in
> 2.1.{something} and it was ok but not amazing.
> 
> LSS - raidtools would not compile (no surprise there as it is a rathead
> util) so I found one called mdadm.
> 
> http://www.cse.unsw.edu.au/~neilb/source/mdadm/
> 
> I am quite happy. This compiles static! and is only 854228 when compiled
> static. Tested it without libraries and it worked fine.
> 
> It also will do everything the raidtools will plus it has a daemonized
> monitor mode that sends email or gens SNMP traps for array messages...
> 
> Also found some scsi generic utils that enable spinup/spindown and a whole
> lot of other neat things (I run pretty much only SCSI on my servers) and
> so I figured maybe I would post what I played with FYI.
> 
> SG3 - http://www.torque.net/sg/u_index.html  (sg3_utils-1.03.tgz)
> 
> First off - array = (10) 18.3G UW drives in a hardware rack (IBM EXP15)
> 
> Using a SymBios UW controller (happened to have handy on the Compaq server
> and it was not even in use...)
> 
> 1. Created partitions (not needed actually - see docs on mdadm)
> 	1.1 (1) per drive - full size
> 2. Created RAID5 array
> 	mdadm --create /dev/md0 --level=5 --raid-devices=10 /dev/sd[a-j]1
> 3. Formatted as ext3
> 	mke2fs -b 1024 -j -v -L "DATA" /dev/md0
> 4. Mounted array
> 	mount /dev/md0 /data
> 
> Then decided to play with the system to see how to recover the array on
> failure (thanks paul...)
> 
> Pulled out a drive.
> OK - degraded array.
> Put back in the drive.
> Hmmm - no nothing happened.
> fdisk the drive - no such device - whoops.
> went and found sg3 utils
> used them to spin up drive  sg_start /dev/sg2 1
> fdisk works fine - partition still exists
> now used mdadm to fail, remove, and add back in drive
> 	mdadm /dev/md0 -f /dev/sdc1 -r /dev/sdc1 -a /dev/sdc1
> Adn the array starts to rebuild.
> 
> Cool!
> 
> HTH.
> 
> --------------------------------------------------
> Matthew G. Marsh,  President
> Paktronix Systems LLC
> 1506 North 59th Street
> Omaha  NE  68104
> Phone: (402) 553-2288
> Email: mgm at midwestlinux.com
> WWW:  http://www.midwestlinux.com
> --------------------------------------------------
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug



More information about the OLUG mailing list