Setting up Local Disk on a Server

Some Dell's and HPs come with a bunch of local disks which can be managed via their on board RAID controllers. In this case here's just a note of the commands I used to delete the factory shipped 6 disk RAID10 logical drive, and replace it with a 6 disk RAID5 logical drive on a Dell R720.

# config local disk on Dell R702, MegaCli64 is in /opt/MegaRAID/MegaCli
# List current logical drives
./MegaCli64 -LDInfo -Lall -aALL

# make sure you single in on the one you want to zap
./MegaCli64 -LDInfo -L1 -a0

# delete logical drive 1 on adapter 0
./MegaCli64 -CfgLdDel -L1 -a0

# list all physical disks - assigned and unassigned
./MegaCli64 -pdlist -a0

# list logical disks, and the physical disks associated with it
./MegaCli64 -ldpdinfo -a0

# create new RAID 5 disk in slot 2 to 7 - no hot spare. The 32 is the enclosure ID number, which you can get from ./MegaCli64 -CfgDsply -a0
./MegaCli64 -CfgLdAdd -r5 [32:2,32:3,32:4,32:5,32:6,32:7] -a0

# should you want to create a RAID 10 then this seems to be the magic
./MegaCli64 -CfgSpanAdd -r10 -Array0[32:2,32:3] -Array1[32:4,32:5] -Array2[32:6,32:7] -a0
# I tried with two arrays of 3 disks and it wouldn't take that. So this (and Google) seem to say the above is the correct way.

# Do the usual echo "- - -" > /sys/class/scsi_host/.... stuff and look in dmesg or lsscsi -k to determine the new drive thats appeared
# Partition, usually via parted. I replace any default DOS partition table with a GPT one.
# Use uuidgen -t or -r to generate a UUID
# and then make the file system eg

 /sbin/mke2fs -v -j -Lraid5p1 -U e5c0f1ec-6355-11e3-b6fd-90b11c56116b /dev/sdb1

# alternatively you can have tune2fs create the UUID

 /sbin/tune2fs -c0 -i0 -U time /dev/sdn1

# You can now use the path /dev/disk/by-uuid/e5c0f1ec-6355-11e3-b6fd-90b11c56116b in fstab to mount as /vicepX or whatever.

See also http://tools.rapidsoft.de/perc/perc-cheat-sheet.html

-- NeilBrown - 13 Dec 2013

Topic revision: r4 - 09 Nov 2016 - 14:35:29 - NeilBrown
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies