... | ... | @@ -600,6 +600,11 @@ The resize is now complete. |
|
|
|
|
|
#### Resizing an iSCSI LUN
|
|
|
|
|
|
All the above procedures detail the normal use case where disks are
|
|
|
hosted as "plain" files or with the DRBD backend. However, some
|
|
|
instances (most notably in the gnt-chi cluster) have their storage
|
|
|
backed by an iSCSI SAN.
|
|
|
|
|
|
Growing a disk hosted on a iSCSI SAN like the Dell PowerVault MD3200i involves
|
|
|
several steps beginning with resizing the LUN itself.
|
|
|
|
... | ... | @@ -653,9 +658,10 @@ 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.
|
|
|
Next, on the instance's primary node (in this case `chi-node-01`), 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
|
|
|
|
... | ... | @@ -665,7 +671,7 @@ 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:
|
|
|
Once you have found the target name, above, trigger the iSCSI rescan with:
|
|
|
|
|
|
# iscsiadm -m node --targetname iqn.foo.org.example -R
|
|
|
|
... | ... | @@ -674,7 +680,7 @@ 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`.
|
|
|
`multipath -ll`:
|
|
|
|
|
|
# multipathd -v3 -k"resize map example-01-srv"
|
|
|
|
... | ... | @@ -684,9 +690,10 @@ 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.
|
|
|
Then the normal resize procedure can happen inside the virtual
|
|
|
machine, see [resizing under LVM](#resizing-under-lvm), [resizing without LVM, no
|
|
|
partitions](#resizing-without-lvm-no-partitions), or [Resizing without LVM, with partitions](#resizing-without-lvm-with-partitions),
|
|
|
depending on the situation.
|
|
|
|
|
|
### Adding disks
|
|
|
|
... | ... | |