Warning - this is an advanced topic. Always backup your data first. |
Preparation
Add a new disk to both machines of EXACTLY the same size and configuration in the virtual environment.
It is also possible to use a new partition on an existing disk whose size has been increased, but this is not covered here.
The commands below assume that /dev/sdc will be used to increase the size of the storage in a DRBD on top of LVM configuration.
Rescan the SCSI Bus to display the drive
Sometimes the system will not see the new disk immediately. To achieve this without a reboot, run the following command to rescan the SCSI bus.
# Check if the disk is there
ls /dev/sd*
# Expected output (includes /dev/sdc)
/dev/sda /dev/sda1 /dev/sda2 /dev/sdb /dev/sdc
# If not, rescan SCSI and repeat above
echo "- - -" > /sys/class/scsi_host/host0/scan |
|
Make one node Secondary
Determine which node is servicing the SMB share with pcs status, and then on the non sevicing node:
# Determine which node is servicing the share
pcs status
# Standby the server on which the resources are NOT running
pcs cluster standby acd-store2
# Run this command on the STANDBY machine
drbdadm secondary jtelshared |
|
Create LVM Physical Volume, Extend the Volume Group and the Logical Volume (Both Nodes)
# Create the phsyical volume - this is based on sdc assuming it is the third drive on the system
lvm pvcreate /dev/sdc
# Extend the volume group
lvm vgextend "vg_drbd_jtelshared" /dev/sdc
# Create the logical volume
lvm lvresize -l +100%FREE /dev/vg_drbd_jtelshared/lv_drbd_jtelshared |
|
Extend the DRBD Resource (Primary Node Only)
# Extend the DRBD resource
drbdadm -- --assume-clean resize jtelshared |
|
Resize the FileSystem (Primary Node Only)
# Resize File System
xfs_growfs /dev/drbd/by-res/jtelshared/0 |
|
Make Secondary Node Primary and Unstandby in Cluster (Secondary Node Only)
# Back to primary
drbdadm primary jtelshared
# Back to unstandby
pcs cluster unstandby acd-store2 |
|
Check the Results (Primary Node Only)