Skip to contentSkip to conversation

raid6 creation with mdadm

DISCUSSION Brad Campbell 2 participants 3 messages Apr 22, 2004 – May 4, 2004 MD RAID

lore
Share & tools
lore
#0 lore raw

G'day all,

I'm currently adding raid6 support to raidreconf, and as part of my testing I'm doing all sorts of nasty things to a 200GB usb2 hard disk.
What happens when I create a raid5 or raid6 with devices of differing sizes? ie the partition list below.
I can create a raid6 of /dev/sda[5-9] /dev/sda1[0-2] and it lets me do it, it runs and everyone is happy, except for raidreconf. When I get right to the end of the disk, what happens to the block calculations if the required blocks don't exist on one of the disks? Or does the md driver base the whole /dev/md size on the smallest device?

I'm just wondering how to go about assisting raidreconf in coping with this really odd case, as at the moment it converts everything and then dies painfully before it restores anything to a workable state. What Would The Kernel Do? (WWKD)

brad@tv:~$ fdisk -l /dev/sda

Disk /dev/sda: 199.9 GB, 199998918656 bytes
255 heads, 63 sectors/track, 24315 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1217     9775521    5  Extended
/dev/sda2            1218        1248      249007+  83  Linux
/dev/sda3            1249        1279      249007+  83  Linux
/dev/sda4            1280        1310      249007+  83  Linux
/dev/sda5               1          31      248944+  83  Linux
/dev/sda6              32          62      248976   83  Linux
/dev/sda7              63          93      248976   83  Linux
/dev/sda8              94         124      248976   83  Linux
/dev/sda9             125         155      248976   83  Linux
/dev/sda10            156         186      248976   83  Linux
/dev/sda11            187         217      248976   83  Linux
/dev/sda12            218         248      248976   83  Linux
/dev/sda13            249         279      248976   83  Linux
/dev/sda14            280         310      248976   83  Linux
/dev/sda15            311         341      248976   83  Linux

Regards,
Brad

#1 lore raw

raid6 raidreconf progress

Quoted 4 lines · Brad Campbell

G'day all,

I'm currently adding raid6 support to raidreconf, and as part of my testing I'm doing all sorts of nasty things to a 200GB usb2 hard disk.

Ok, false alarm (sort of, I'm still interested in what happens with odd device sizes), but it was a thinko in the raid6 parity block locator.

We have liftoff. It has now performed 2 raid5->raid6 and back again cycles.
I test it by using dd to dump 400mb of /dev/urandom to the device and then running md5sum on it, so far we have 4 complete cycles to differing devices in different orders and different sizes (As long as it stays above 400MB of course) and it's all good. Hope to have something cleaned up and presentable in the near future.

Brad

#2 lore raw

Re: raid6 raidreconf progress

Followup to:  <[email protected]>
By author:    Brad Campbell <[email protected]>
In newsgroup: linux.dev.raid
Quoted 10 lines
Quoted 5 lines · Brad Campbell

G'day all,

I'm currently adding raid6 support to raidreconf, and as part of my testing I'm doing all sorts of
nasty things to a 200GB usb2 hard disk.

Ok, false alarm (sort of, I'm still interested in what happens with odd device sizes), but it was a thinko in the raid6 parity block locator.

In the kernel or in raidreconf?

Quoted 5 lines

We have liftoff. It has now performed 2 raid5->raid6 and back again cycles.
I test it by using dd to dump 400mb of /dev/urandom to the device and then running md5sum on it, so far we have 4 complete cycles to differing devices in different orders and different sizes (As long as it stays above 400MB of course) and it's all good.
Hope to have something cleaned up and presentable in the near future.

Kick ass.

-hpa