Advanced Topic

Warning - this is an advanced topic. Always backup your data first.

Preparation

Increase the size of the existing disk on both machines by EXACTLY the same size in the virtual environment.

The commands below assume that DRBD is running on /dev/sdb.

Make sure parted is current

# Update parted
yum update parted

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.

Rescan SCSI Bus
# Check the size of the partition
fdisk -l /dev/sdb

# Expected output - should show the increased size of the disk in the first line
Disk /dev/sdb: 536.9 GB, 536870912000 bytes, 1048576000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000
 
# If not, rescan SCSI and repeat above
echo 1 > /sys/block/sdb/device/rescan

# If the above command does not work, rescan SCSI busses individually
echo "- - -" > /sys/class/scsi_host/host0/scan
echo "- - -" > /sys/class/scsi_host/host1/scan
echo "- - -" > /sys/class/scsi_host/host2/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

Increase Partition Size and verify - on the secondary node

# Increase partition size
# Enter "Fix" then "Fix" after entering the command below
parted /dev/sdb print 

# Make sure this has worked
parted /dev/sdb print free

################################################
# DO NOT CONTINUE UNLESS THE FREE SPACE IS SHOWN
################################################

# Increase the partition size
parted /dev/sdb resizepart 1 100%

# Check
parted /dev/sdb print free

Increase Partition Size and verify - on the primary node

Repeat all steps above on the primary node, to increase the partition on the primary node.

Resize DRBD

On the PRIMARY node:

# Resize DRBD
drbdadm resize jtelshared

Check, and speed up sync

# Make sure sync is happening
cat /proc/drbd
 
# Speed up sync
drbdadm disk-options --c-plan-ahead=0 --resync-rate=110M jtelshared

When sync finished, resize the file system

This assumes, the DRBD was created with XFS, and is mounted at /dev/drbd1

# Grow file system
xfs_growfs /dev/drbd1

Check the Results

df -h

Untune sync and make secondary primary again

# Untune sync
drbdadm adjust jtelshared

# Make secondary primary again
drbdadm primary jtelshared

# Unstandby the server on which the resources are NOT running in the PCS cluster
pcs cluster unstandby acd-store2
  • No labels