Reconstructing RAID-0 to RAID-10 using omconfig

Larsen, Peter PLarsen at CIBER.com
Sun Jun 10 19:12:26 CDT 2007


First of, mirroring a Raid 0 doesn't make raid 10 -it makes raid 0+1. Probably the worst of all combinations (lose one disk, and *all* the disks in the stripe has to be restored).

Second, it's pretty "easy" to rescan the SCSI bus on a live Linux system. Linux allows you to add and remove SCSI devices without rebooting by using the echo "scsi add-single-device H C I L" > /proc/scsi/scsi command (H = host, C = channel, I = SCSI ID, L = SCSI LUN). The remove-single-device command works similarily.

Once the raid controller knows about the device, the above will "find" it. There are also the good old "rescan-scsi-bus.sh" that'll do methodically through all luns/ids and "probe". 

Personally, I would dump everything out to tape or a network drive, rebuild the RAID 10 from scratch and move things back. Raid 10 is a a strip of mirrored pairs. So the procedure to make Raid 10 would be to add mirror on each of the stripped drives, and have the mirror become part of the stripe. To my understanding of RAID10 and LSI/Dell this isn't possible on running disks as you basically have to build the strip on the mirror ID, instead of the disk ID. And you cannot "hot" in a disk group because it's RAID0 and you can't loose a single disk. 

The good news is, that mirror rarely requires special formats of the disk. So you *may* be able to do an nvram "pretend" setup without doing an init. .. add the new disks as mirror pair on each of the existing drives; do not initialize them. Mark the new disk as "failed". Once all disks have been paired up, add the stripe. Do NOT initialize. This should - in theory - allow you to access your stripe again, in degraded form. Then you need to access each of the mirror-pairs and do a rebuild of the new disk. Once complete, you'll be at Raid 10.

Best Regards
  Peter Larsen
  Principal Oracle Consultant
  Ciber Inc

-----Original Message-----
From: linux-poweredge-bounces at dell.com on behalf of Harald_Jensas at dell.com
Sent: Sun 6/10/2007 10:11
To: fermbraga at gmail.com
Cc: linux-poweredge at lists.us.dell.com
Subject: RE: Reconstructing RAID-0 to RAID-10 using omconfig
 
> -----Original Message-----
> From: Fernando Braga [mailto:fermbraga at gmail.com]
> Sent: 09 June 2007 15:07
> To: Jensas, Harald
> Cc: johnb+linuxpoweredge at academicsuperstore.com; linux-poweredge-Lists
> Subject: Re: Reconstructing RAID-0 to RAID-10 using omconfig
> 
> On 6/9/07, Harald_Jensas at dell.com <Harald_Jensas at dell.com> wrote:
> > I would sooo opt for the command you suggested yourself in the
> beginning, mind changing the size parameter:
> >
> > omconfig storage vdisk action=reconfigure controller=0 vdisk=0
> raid=r10 size=264g adisk=0:0,0:1,0:2,0:3
> >
> (snip)
> > This will, change the RAID Volume from your RADI 0 to a RAID 10 live.
> No downtime, except a reboot once it is done to get Linux to recognize
> the new drive size once you are done.
> 
> I guess you could do it without a reboot. Just fdisk it and create a
> new partition. After that, do a partprobe -s on the disk, and linux
> kernel will recognize the new partition. You now can use that
> immediately.
> 
> Kind regards,
> 
> --
> Fernando M. Braga
> +55 82 8802-9559

The problem is that fdisk does not know that the disk became larger and thus will not allow you to create a new, or extend the existing, partition.

AFAIK you will have to dynamically remove and add the drive back to the OS before fdisk will see the new size of the disk. And if you do that to a disk with mounted filesystems who knows what will happen...

Have a look at step 5 of this article for more details.
http://www.dell.com/content/topics/global.aspx/power/en/ps1q03_michael



Best regards
Harald Jensås

_______________________________________________
Linux-PowerEdge mailing list
Linux-PowerEdge at dell.com
http://lists.us.dell.com/mailman/listinfo/linux-poweredge
Please read the FAQ at http://lists.us.dell.com/faq




More information about the Linux-PowerEdge mailing list