Resize ARTESCA+ VM Volumes¶
This procedure describes how to resize the volumes of a ARTESCA+ VM.
Check the Available Space in the Volume Group (VG)¶
Get the free space available of
vgartescaVolume Group (VG)[artesca-os@bootstrap ~]$sudo vgs /dev/vgartesca --unit g -o free
VFree 600.00g
Resize the Volume¶
Find the LVM logical volume name you want to resize.
[artesca-os@bootstrap ~]$sudo lvs --unit g /dev/vgartesca/vm-*-disk
Set the
LV_NAMEvariable.Note
Replace
<LV_NAME>by the name of the actual Logical Volume (LV) identified in the previous command output.[artesca-os@bootstrap ~]$export LV_NAME="<LV_NAME>"
Set the
LV_EXPANSION_SIZEvariable.[artesca-os@bootstrap ~]$export LV_EXPANSION_SIZE="10G"
Resize the Logical Volume (LV).
[artesca-os@bootstrap ~]$vol_fstype=$(lsblk -o FSTYPE -n /dev/vgartesca/$LV_NAME); \ if [ "$vol_fstype" == "ext4" ]; then \ sudo lvextend --size +$LV_EXPANSION_SIZE --resizefs /dev/vgartesca/$LV_NAME; \ vol_mnt=$(lsblk -o MOUNTPOINT -n /dev/vgartesca/$LV_NAME); \ sudo salt-call --local cmd.run "truncate -s +${LV_EXPANSION_SIZE} ${vol_mnt}/disk.img"; \ else \ sudo lvextend --size +$LV_EXPANSION_SIZE /dev/vgartesca/$LV_NAME; \ fi
Get the VM name.
[artesca-os@bootstrap ~]$sudo kubectl --kubeconfig=/etc/kubernetes/admin.conf get vm -n veeam
NAME AGE STATUS READY vbr-1234 63d Running True
Restart the VM to apply the changes (replace
<VM_NAME>by the actual VM name returned by the previous command).[artesca-os@bootstrap ~]$sudo virtctl --kubeconfig=/etc/kubernetes/admin.conf restart -n veeam <VM_NAME>
Important
Now the VM disk is resized. You can proceed with resizing the corresponding filesystem inside the VM.

