ProxMoX - Expand near full harddisk - Example01_AD
About
This document describes how to resize a disk partition in one of the servers Example01.
!! IMPORTANT !!
Do NOT just change the size BEFORE checking out the reason why the disc is full first!
How to check
Use the tool NCDU (mellomrom).
So open the terminal, write ‘ncdu /’
(and click enter) use the arrows to move in the files and click q to quit.
The biggest volumes are at the top.
How to
1, Go to your proxmox server and sign in.
2, Click the arrow next to 'HV01' and choose server03, because that is what the ‘Monitoring Alert!' email you received, describes.
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 ‘500G’.
4, Change the disc size to 600.
!! 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 ‘500’ and the disc is already 500, then you will end up with a 1000 instead of the wanted ‘600’.
So type in ‘100' instead, witch will add up to '600’.
Terminal
1, Go to your terminal and type the command:
ssh root@server03
and look for the disk that the ‘Monitoring Alert!' email you received, describes. In our case we are looking for 'Server03, /mnt/backup' witch is equal to 'Disk /dev/mapper/backup-backup’.
- How do we know that we are looking for 'Disk /dev/mapper/backup-backup’?
Type the command
df -h
and look for the matching 'Server03, /mnt/backup' that you got in the ‘Monitoring Alert!' email you received.
2, Type in:
pvresize /dev/sde
Ignore the ‘Failed’ errors, as it is not relevant to what we are doing.
3, Then type in:
lvextend /dev/backup/backup -L 595G
and
resize2fs /dev/backup/backup
witch is a logic volume inside a physical partition, and click enter.
4, Then make sure that the disc’s size is bigger by the amount you added. (The 70% indicates the space you have used on the disc partition).
And then you are done! 