Steve's Ramblings

Manually Updating/Removing RAID groups on a LSI RAID Controller

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: [code] root@linux # vgdisplay root@linux # vgremove data-store root@linux # vgdisplay [/code]

Then I needed to remove the phyical volume: [code] root@linux # vgdisplay root@linux # vgremove db-store root@linux # vgdisplay [/code]

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: [code] root@linux # storcli /c0 show [/code]

The Volume Group ID is listed as the DG/VD - be sure to pick the correct one. [code] root@linux # storcli /c0/v[ID] del root@linux # storcli /c0 show [/code]

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: [code] root@linux # storcli /c0 /e252 /s2 add hotsparedrive root@linux # storcli /c0 show all [/code]