We need to make a partition table on the new drives.
First we need to check the status of the storage pool before the procedure.
~# zpool status pool: NETSTOR state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM NETSTOR ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 NETSTOR1 ONLINE 0 0 0 NETSTOR2 ONLINE 0 0 0errors: No known data errors
In the example above, we have 2 disks in the mirror pool NETSTOR.
We can see one mirror configuration from existing disks (mirror-0).
Now we need to find out which block the device name system has been assigned to the new disks.
Use the following command:
NorthAmericaN ~ # ls -lah /dev/disk/by-id
total 0
drwxr-xr-x 2 root root 520 Srp 25 07:12 .
drwxr-xr-x 7 root root 140 Srp 25 07:03 ..
lrwxrwxrwx 1 root root 9 Srp 25 07:03 ata-INTEL_SSDSC2CW060A3_CVCV308402M3060AGN -> ../../sdc
lrwxrwxrwx 1 root root 10 Srp 25 07:03 ata-INTEL_SSDSC2CW060A3_CVCV308402M3060AGN-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Srp 25 07:03 ata-INTEL_SSDSC2CW060A3_CVCV308402M3060AGN-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Srp 25 07:03 ata-INTEL_SSDSC2CW060A3_CVCV308402M3060AGN-part9 -> ../../sdc9
lrwxrwxrwx 1 root root 9 Srp 25 07:12 ata-ST31000520AS_5VX0BZN0 -> ../../sdelrwxrwxrwx 1 root root 9 Srp 25 07:03 ata-WDC_WD10JFCX-68N6GN0_WD-WX61A465TH1Y -> ../../sda
lrwxrwxrwx 1 root root 10 Srp 25 07:03 ata-WDC_WD10JFCX-68N6GN0_WD-WX61A465TH1Y-part1 -> ../../sda1
lrwxrwxrwx 1 root root 9 Srp 25 07:03 ata-WDC_WD10JFCX-68N6GN0_WD-WX81EC512Y4H -> ../../sdb
lrwxrwxrwx 1 root root 10 Srp 25 07:03 ata-WDC_WD10JFCX-68N6GN0_WD-WX81EC512Y4H-part1 -> ../../sdb1lrwxrwxrwx 1 root root 9 Srp 25 07:12 ata-WDC_WD10JFCX-68N6GN0_WD-WXK1E6458WKX -> ../../sddlrwxrwxrwx 1 root root 9 Srp 25 07:03 wwn-0x10076999618641940481x -> ../../sdb
lrwxrwxrwx 1 root root 10 Srp 25 07:03 wwn-0x10076999618641940481x-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Srp 25 07:03 wwn-0x11689569317835657217x -> ../../sda
lrwxrwxrwx 1 root root 10 Srp 25 07:03 wwn-0x11689569317835657217x-part1 -> ../../sda1
lrwxrwxrwx 1 root root 9 Srp 25 07:12 wwn-0x11769037186453098497x -> ../../sdd
lrwxrwxrwx 1 root root 10 Srp 25 07:12 wwn-0x11769037186453098497x-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 9 Srp 25 07:03 wwn-0x12757853320186451405x -> ../../sdc
lrwxrwxrwx 1 root root 10 Srp 25 07:03 wwn-0x12757853320186451405x-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Srp 25 07:03 wwn-0x12757853320186451405x-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Srp 25 07:03 wwn-0x12757853320186451405x-part9 -> ../../sdc9
lrwxrwxrwx 1 root root 9 Srp 25 07:12 wwn-0x7847552951345238016x -> ../../sde
lrwxrwxrwx 1 root root 10 Srp 25 07:12 wwn-0x7847552951345238016x-part1 -> ../../sde1
Now when we have a block device name, we can make a table, partition, and prepare the drive for usage.
Use '''parted''' to make partition table for a new logical drives.
~# parted /dev/sde --script -- mktable gpt
~# parted /dev/sdd --script -- mktable gpt
Create a new label.
IMPORTANT: label must be named in the following format: NETSTORx.~# parted /dev/sde --script -- mkpart "NETSTOR3" 1 -1
and same for the second drive.
~# parted /dev/sdd --script -- mkpart "NETSTOR4" 1 -1
Now we need to expand our pool with new logical drives.
You need to be careful with this command. Check the names of logical drives to make sure you got the right name.
~# zpool add NETSTOR mirror /dev/disk/by-partlabel/NETSTOR3 /dev/disk/by-partlabel/NETSTOR4 -f
Now in the zpool, we should see newly added logical volume:
Now restart swhspared deamon to update GUI information.~# zpool status pool: NETSTOR state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM NETSTOR ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 NETSTOR1 ONLINE 0 0 0 NETSTOR2 ONLINE 0 0 0 mirror-1 ONLINE 0 0 0 NETSTOR3 ONLINE 0 0 0 NETSTOR4 ONLINE 0 0 0errors: No known data errors
This is the end of our storage expansion procedure.~# /etc/init.d/swhspared restart