1

I'm using a LSI MegaRAID SAS 9260-8i controller, firmware version 12.15.0-0189 with 8 physical drives. I currently have the main array running on RAID6 with 5 disks and second array on RAID1 with 2 disks. Last one disk slot is hot spare for RAID6. Now I need run third array RAID1. I'm looking for two vacant slots...

Is there a way to migrate my array from RAID6 to RAID5 with one disk remove without recreating and restore data from backup? After that I would turn it off hot spare and have released the second slot.

Regards.

2 Answers2

2

The latest storcli (Megaraid's successor) can do this. However, you will need to make sure to reduce the filesystems, physical volumes, and disk partitions before you reduce the underlying volume.

The steps would be along the lines of this. Say I have a raid6 with 6 disks (~7T of raw space) and I want to reduce it to a raid5 with 5 disks:

reduce PV

pvresize --setphysicalvolumesize 3T /dev/sda1

reduce partition

parted /dev/sda resize 1 FROM TO

migrate to raid5 and remove disk 5 from raid set

storcli /c0/v0 start migrate type=raid5 option=remove drives=e0:s5 storcli /c0 set migraterate=75 storcli /c0/v0 show migrate

wait til done...

increase partition and PV

parted /dev/sda resizepart 1 -1 pvresize /dev/sda2

Matt
  • 21
  • 2
1

In general, there's no RAID controller I'm aware of that can migrate volumes to a configuration with a lower drive count.

MegaRAID is no exception to this, you can either keep the drive number or increase it (i.e. when increasing redundancy level).

MegaRAID supports the following RLM paths with the above in mind:

  • RAID 0 to RAID 1
  • RAID 0 to RAID 5
  • RAID 0 to RAID 6
  • RAID 1 to RAID 0
  • RAID 1 to RAID 5
  • RAID 1 to RAID 6
  • RAID 5 to RAID 0
  • RAID 5 to RAID 6
  • RAID 6 to RAID 0
  • RAID 6 to RAID 5

On a side note, if you are about to RLM a sizable amount of data (few TB) the complete array reconstruction may be a better path performance-wise.

You still need to do a full backup beforehand regardless of the way you choose, but RLM itself would take ages with a huge performance impact and unpredictable outcome, especially if your drives are old and patrol read is not being run on schedule.

Peter Zhabin
  • 2,276
  • 8
  • 10