Growing a Volume
flexblock update --device-size makes a volume larger. On Linux 6.16 or newer it grows the device while the daemon is serving and the filesystem is mounted; on older kernels you stop the daemon first.
Size arguments
Section titled “Size arguments”--device-size accepts an absolute size, a delta, or max:
sudo flexblock update /dev/nvme1n1p1 --device-size +1T # grow by a deltasudo flexblock update /dev/nvme1n1p1 --device-size 4T # or to an absolute sizesudo flexblock update /dev/nvme1n1p1 --device-size max # or to the licensed sizeAdd --dry-run to print the old and new values without changing anything.
Live grow (Linux 6.16 or newer)
Section titled “Live grow (Linux 6.16 or newer)”With the daemon serving, update passes the new size to the daemon over its control socket. The daemon records the new size in object storage, then on the cache device, then resizes the live block device. Then you grow the filesystem while it stays mounted.
Live resizing needs Linux 6.16 (UBLK_U_CMD_UPDATE_SIZE). The online resize row in the start banner says whether the host has it.
-
Grow the volume.
Terminal window sudo flexblock update /dev/nvme1n1p1 --device-size +1T -
Grow the filesystem.
Terminal window sudo xfs_growfs /mnt/analytics # XFSsudo resize2fs /dev/ublkb0 # ext4
Offline grow
Section titled “Offline grow”On an older kernel, or with no daemon running, the same command works offline.
-
Stop cleanly: unmount, then stop the daemon (or
sudo systemctl stop flexblock@nvme1n1p1.service). See Stopping Cleanly. -
Grow the volume.
Terminal window sudo flexblock update /dev/nvme1n1p1 --device-size 4T -
Start the daemon again and mount the filesystem.
-
Grow the filesystem with
xfs_growfs /mnt/analytics(XFS) orresize2fs /dev/ublkb0(ext4).
If something goes wrong
Section titled “If something goes wrong”- A failed write to object storage changes nothing locally. Run the command again.
- A crash between the steps leaves object storage recording the larger size.
startreports it, and running the sameupdateagain finishes the job. - If
updatereports the device was only partly resized (exit code 4), follow the step the message names: runupdate --device-sizeagain, or restart the daemon. - If
updatereports the kernel cannot resize a live device (exit code 10), or exits busy because the daemon did not answer on its control socket, grow offline instead.