... | ... | @@ -563,7 +563,7 @@ Device Boot Start End Sectors Size Id Type |
|
|
|
|
|
Command (m for help): w
|
|
|
The partition table has been altered.
|
|
|
Syncing disks.
|
|
|
Syncine disks.
|
|
|
```
|
|
|
|
|
|
Now we check the partitions:
|
... | ... | @@ -598,6 +598,96 @@ The filesystem on /dev/sda1 is now 5242624 (4k) blocks long. |
|
|
|
|
|
The resize is now complete.
|
|
|
|
|
|
#### Resizing an iSCSI LUN
|
|
|
|
|
|
Growing a disk hosted on a iSCSI SAN like the Dell PowerVault MD3200i involves
|
|
|
several steps beginning with resizing the LUN itself.
|
|
|
|
|
|
First, we identify how much space is available on the virtual disks' diskGroup:
|
|
|
|
|
|
# SMcli -n chi-san-01 -c "show allVirtualDisks summary;"
|
|
|
|
|
|
STANDARD VIRTUAL DISKS SUMMARY
|
|
|
Number of standard virtual disks: 5
|
|
|
|
|
|
Name Thin Provisioned Status Capacity Accessible by Source
|
|
|
example-01-srv No Optimal 700.000 GB Host Group gnt-chi Disk Group 5
|
|
|
|
|
|
This shows that `tb-build-03-srv` is hosted on Disk Group "5":
|
|
|
|
|
|
# SMcli -n chi-san-01 -c "show diskGroup [5];"
|
|
|
|
|
|
DETAILS
|
|
|
|
|
|
Name: 5
|
|
|
|
|
|
Status: Optimal
|
|
|
Capacity: 1,852.026 GB
|
|
|
Current owner: RAID Controller Module in slot 1
|
|
|
|
|
|
Data Service (DS) Attributes
|
|
|
|
|
|
RAID level: 5
|
|
|
Physical Disk media type: Physical Disk
|
|
|
Physical Disk interface type: Serial Attached SCSI (SAS)
|
|
|
Enclosure loss protection: No
|
|
|
Secure Capable: No
|
|
|
Secure: No
|
|
|
|
|
|
|
|
|
Total Virtual Disks: 1
|
|
|
Standard virtual disks: 1
|
|
|
Repository virtual disks: 0
|
|
|
Free Capacity: 1,152.026 GB
|
|
|
|
|
|
Associated physical disks - present (in piece order)
|
|
|
Total physical disks present: 3
|
|
|
|
|
|
Enclosure Slot
|
|
|
0 6
|
|
|
1 11
|
|
|
0 7
|
|
|
|
|
|
`Free Capacity` indicates about 1,5 TB of free space available. So we can go
|
|
|
ahead with the actual resize:
|
|
|
|
|
|
# SMcli -n chi-san-01 -p $PASSWORD -c "set virtualdisk [\"example-01-srv\"] addCapacity=100GB;"
|
|
|
|
|
|
Next, on the instance's primary node we need to tell `iscsiadm` to rescan the
|
|
|
LUN. To do this we first need to learn the iSCSI `targetname` we need to run the
|
|
|
rescan command against.
|
|
|
|
|
|
# multipath -ll
|
|
|
|
|
|
This shows which device nodes (eg. `sdw`) are associated with the volume we need
|
|
|
to resize. There are usually six such nodes for each iSCSI LUN, and they will be
|
|
|
listed under the same "Target:" header in the output of the next command:
|
|
|
|
|
|
# iscsiadm -m session -P 3 | grep -e ^Target -e 'Attached scsi disk' -e 'Current Portal'
|
|
|
|
|
|
To trigger the iSCSI rescan:
|
|
|
|
|
|
# iscsiadm -m node --targetname iqn.foo.org.example -R
|
|
|
|
|
|
The success of this step can be validated by looking at the output of `lsblk`:
|
|
|
the device nodes associated with the LUN should now display the new size.
|
|
|
|
|
|
Next, we need to also *kick* `multipathd` to make it rescan the iSCSI LUN. The
|
|
|
volume name used here must correspond to the volume name in the output of
|
|
|
`multipath -ll`.
|
|
|
|
|
|
# multipathd -v3 -k"resize map example-01-srv"
|
|
|
|
|
|
Another look at the output of `multipath -ll` should confirm the volume now
|
|
|
reflects the new size of the underlying iSCSI LUN.
|
|
|
|
|
|
In order for ganeti/qemu to make this extra space available to the instance, a
|
|
|
reboot must be performed from outside the instance.
|
|
|
|
|
|
Depending on whether LVM volumes or partitions are used within the VM, there
|
|
|
could be extra steps required before running the `resize2fs` command. See the
|
|
|
instructions above for details on how to resize those bits.
|
|
|
|
|
|
### Adding disks
|
|
|
|
|
|
A disk can be added to an instance with the `modify` command as
|
... | ... | |