LSI MegaRAID: How to convert between Dedicated Hot Space (DHS) to Global Hot Spare (GHS)?

/ 2019-05-07 10:25

storcli won’t let you change the state of the disk as long as it is “allocated” as hot spare. To deallocate the drive, you need to “delete” it:

storcli /c0/e252/s7 delete hotsparedrive   

This will make the disk 13 (in Slot 7) attached to enclosure 252 connected to controller 0 available:

EID:Slt DID State DG     Size Intf Med SED PI SeSz Model                Sp Type    --------------------------------------------------------------------------------   252:7    13 UGood  - 2.728 TB SATA HDD N   N  512B WDC WD30EFRX-68EUZN0 U  -       

The state is now “UGood”. That means you can add the disk to an existing array or convert it to a dedicated/global hot spare.

To make it a global hot spare, just add it without any extra options:

storcli /c0/e252/s7 add hotsparedrive   

To dedicate it to a drive group, also specify the drive groups:

storcli /c0/e252/s7 add hotsparedrive dgs=0,1   

This command would assign the disk as hot spare to the disk groups 0 and 1.

To extend an existing RAID 5 array, use this command:

storcli /c0/v0 start migrate type=raid5 option=add drives=252:7   

/v0 is the volume to which to add the disk. drives gives the list of disks to add. The list is comma separated and each item is EID:Slt (enclosure ID and slot), i.e. the value in the first column.

Shared via Inoreader