Expanding the Disk on a FileWave Appliance - Debian
This article provides steps for extending the root partition residing in a logical volume created with Logical Volume Manager (LVM) in a virtual machine running on Debian.
Step-by-step guide for Debian
The commands to expand the disk on Debian are as follows. Perform the commands as root or use sudo before each command and know that these are meant for the FileWave Appliance images. If you use your own Debian install you can still expand your partitions but the names of the disks and partitions will differ so you'll need to adjust the commands used.
# Make sure the tools are present
sudo apt update
sudo apt install -y cloud-guest-utils
# Extend the partitions
sudo growpart /dev/sda 2 || true
# Older Appliances will use the next 2 lines
# If you get an error for them then you should
# try the next 2 lines.
sudo growpart /dev/sda 5 || true
sudo pvresize /dev/sda5
# Newer Appliances will use the next 2 lines
# Do these if the prior 2 lines showed an error
# There is no harm in running the prior lines and these
sudo growpart /dev/sda 3 || true
sudo pvresize /dev/sda3
# Next lines are for all appliances
sudo lvextend -l +100%FREE /dev/mapper/filewave--vg-root
sudo resize2fs /dev/mapper/filewave--vg-root
sudo reboot
2 Comments
Debian instructions don't seem to work. Had to change
growpart /dev/sda 5 || true
pvresize /dev/sda5
to
growpart /dev/sda 3 || true
pvresize /dev/sda3
In reply to #1
Thanks Sam. I realized why. At least in the 15.5.0 HyperV Gen2 images but maybe the Gen1 and OVA changed too the partition names and disk names changed. I think so that this works in all cases I'll update the script to have both in there and note that some versions will error for the lines but the errors can be ignored since I'll have it for both. Then as a longer term update I'll look at what partitions there are and have the script account for it.