Re: [PATCH 29/53] Add spares to raid0 array using takeover

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 26 Nov 2010 09:07:38 +0100 Adam Kwolek <adam.kwolek@xxxxxxxxx> wrote:

> Spares are used by Online Capacity Expansion to expand array.
> To run expansion on raid0, spares have to be added to raid0 volume also.
> Raid0 cannot have spares (no mdmon runs for raid0 array).
> To do this, takeover to raid5 (and back) is used. mdmon runs temporary for raid5 and spare drives can be added to container.
> 
> Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx>

I don't like this patch at all.

There is a lot of code in here that is very specific to IMSM, that has been
placed directly in Manage.c.  That is bad.

I gather you want to support

  mdadm /dev/md/imsm  --add /dev/newdisk

on a RAID0 and have it convert to RAID5, do the restripe, and convert back.

The IMSM specific code goes through a container and converts every member
array to raid5.

The 
  mdadm /dev/md/imsm --add /dev/newdisk

should just add the device to the container as a spare.  This might require
updating the IMSM metadata in some way, but doesn't require changing anything
to RAID5 and back.

Then when you do

  mdadm -G /dev/imsm --raid-disks=4

it will work with the imsm code to update every member array and add parts of
the newdisk to each array.

The conversion to RAID5 needs to happen in Grow_reshape when raid-disks is
changed on a RAID0.  It needs to happen while the array is frozen.

Not in Manage.c

NeilBrown



> ---
> 
>  Manage.c |  154 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 153 insertions(+), 1 deletions(-)
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux