We had a semi unique situation where we wanted to remove a bunch of unused hard drives from some LSI server.
Luckily there were two RAID groups (a RAID-1 for OS and a RAID-10 for data) and only wanted to remove the RAID-10 and associated drives.
First up, make sure there is nothing mounted or using those drives. We had a volume group on them so I needed to run commands like these:
root@linux # vgdisplay root@linux # vgremove data-store root@linux # vgdisplay
Then I needed to remove the phyical volume:
root@linux # vgdisplay root@linux # vgremove db-store root@linux # vgdisplay
Note – for all of my commands below, the controller number is “0” and the EID is “252”. Yours may vary, but this is a pretty common configuration.
Once I was sure nothing was using /dev/sdb – It is time to identify the RAID Volume Group to remove:
root@linux # storcli /c0 show
The Volume Group ID is listed as the DG/VD – be sure to pick the correct one.
root@linux # storcli /c0/v[ID] del root@linux # storcli /c0 show
Now you can physically remove all of the drives you no longer need. I removed drives 3 to 7 leaving the RAID-1 with drives 0 and 1 and a spare in drive 2.
Making drive 2 a Global Hot Spare is also pretty easy:
root@linux # storcli /c0 /e252 /s2 add hotsparedrive root@linux # storcli /c0 show all