ProxMoX - Expand near full harddisk - Example 02_AD
About
This document describes how to resize a disk partition in one of the servers, Example02.
!! IMPORTANT !!
Do NOT just change the size BEFORE checking out the reason why the disc is full first!
Problem
The Jenkins “MacOS-Packages - Munki” refuses to finish, which is an indicator of no more disc space.
How to
1, Go toyour proxmox server and log in.
2, Click the arrow next to 'HV-TOGO' and choose server where the error is.
3, Click on ‘Hardware’ and look for the disc you want to expand.
!! IMPORTANT !!
Make a note of the size of the disk.
Here you can see it is ‘70G’.
4, Change the disc size to 80.
!! IMPORTANT !!
Do NOT type in the number that you want your disc size to be!
This window adds space to the already exciting disk!
So if you type in ‘80’ and the disc is already 70, then you will end up with a 150 instead of the wanted ‘80’.
So type in ‘10' instead, which will add up to '80’.
Terminal
1, Go to your terminal and type the command:
ssh root@yourcompany.no
and look for the disk that the ‘Monitoring Alert!' email you received describes. In our case, we are looking for 'Server03, /mnt/backup,' which is equal to 'Disk /dev/mapper/backup-backup.’
Type the command
df -h
And look for the munki-munki
Type in:
fdisk - l
and look for munki-munki.
The first 2, “Disk /dev/sdb" and “/dev/sda”, are physical discs, and the ones underneath are virtual discs. The resize can only be done on the physical discs.
2, Type in:
pvresize /dev/sda
because of the disc in ProxMos was resized to be 80G, the physical disc /dev/sdb has 80GiB. Use this to resize.
Write fdisk -l again to confirm the changes.
3, Then type in:
lvextend /dev/munki/munki -L 80G
Because the error message says you don't have enough room, change it to:
lvextend /dev/munki/munki -L 79G
Then type:
resize2fs /dev/munki/munki
Then type to confirm changes:
df -h
And run Jenkins again, and check space again, to check if you need to add more or not:
Then type to confirm changes:
df -h
And then you are done! 