Docker Swarm on Debian 12 (Bookworm)¶
Part 1: VM Setup¶
Partition layout¶
The VM is cloned from a template, which now includes:
- CPU: 2
- Memory: 4GB
- NIC: 1 (VMXNET3 with DirectPath I/O)
- Hard disk 1: 50GB
/boot: 1GB (ext4)/(root partition): 19GB (ext4, LVM mapped to/dev/vg0/lvroot)- The root partition will be extended to cover the remaining space
- Hard disk 2: 100GB
- Will be formatted by
cephadmfor CephFS usage
- Will be formatted by
Resize the root partition¶
Install the parted package
Use parted to resize the physical volume
Note
It is possible to use pvcreate to create another physical volume with the remaining space, and add it to the volume group. But in this example, we extend the existing physical volume instead.
sudo parted
# The print command checks for the current partition layout
print
# Use resizepart to resize the partition to 100%
resizepart
# Partition number: 2
# End? 100%
# Check the partition layout again with print
print
quit
Extend the physical volume
Extend the volume group
Extend the logical volume
Extend the root partition with resize2fs