- Make a backup of the contents of the volume.
- You need to unmount the volume, so:
- Stop all the guests with an image in that volume.
Stop the flexvdi-agent service in all the hosts that share the volume. Otherwise, they will remount it as soon as they detect it is not mounted:
# systemctl stop flexvdi-agent
- Unmount the volume in all the hosts.
In one host, perform a filesystem check. Assuming it is in partition
# fsck.ocfs2 -f /dev/sdb1
- Resize the underlying device to the desired capacity. This may be a logical volume in a shared storage cluster, for instance. How you do this is out of the scope of this guide.
Rescan the underlying device in all your hosts. Assuming the device is
/dev/sdb, run in all the hosts:
# echo 1 > /sys/block/sdb/device/rescan
If your device is part of a multipath device, rescan all the devices (sdb, sdc, ...). Then, assuming it is called
mpatha, run in all the hosts:
# multipathd resize map mpatha
Resize the underlying device partition. Assuming the device is
/dev/sdb, run in one host only:
# parted -s /dev/sdb resizepart 1 100%
resizepartcommand needs the
parted-3.1-29.el7package, install it if needed.
Now, refresh the partition sizes in all your hosts. Specify all the devices that must be probed if you have multipath. Do not just run "partprobe" as there can be problems with multipath devices being busy.
# partprobe /dev/sdb [/dev/sdc... /dev/mapper/mpatha]
Resize the OCFS2 filesystem in one host only and check it again:
# tunefs.ocfs2 -S /dev/sdb1 # fsck.ocfs2 -f /dev/sdb1
- Finally, restart the flexvdi-agent service again in all your hosts, and they will mount the volume again in the right place.