92
edits
No edit summary |
(→Step 3) |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 7: | Line 7: | ||
Before making any changes, you can confirm the current size of your disk. | Before making any changes, you can confirm the current size of your disk. | ||
running `fdisk -l /dev/sda`, this lists partition table details of /dev/sda, showing its total size and partitions. | running `fdisk -l /dev/sda`, this lists partition table details of /dev/sda, showing its total size and partitions. | ||
output should look something like this: | |||
[[File:Screenshot 2025-03-19 at 15.29.14.png|thumb|center|`fdisk -l /dev/sda`]] | |||
Next, to increase the disk 'physical' size: | Next, to increase the disk 'physical' size: | ||
| Line 20: | Line 23: | ||
== Step 2 == | == Step 2 == | ||
Resize the Partition to Use the Extra Space: | |||
* Resize using 'parted': | * Resize using 'parted': | ||
* parted /dev/sda | This is assuming that you need to resize /dev/sda2 (which the 'print' command will help you determine) | ||
* print | * `parted /dev/sda`, opens the partition table editor for /dev/sda | ||
* resizepart 2 100% | * `print`, double-checks the disk layout | ||
* quit | * `resizepart 2 100%`, choose partition you want to resize, here partition 2 is resized to use all available space | ||
* `quit`, exit parted | |||
You can verify the updated partition table running `lsblk`, this lists all storage devices, showing partitions and their sizes. | |||
[[File:Screenshot 2025-03-19 at 15.49.02.png|thumb|center|`lsblk`]] | |||
== Step 3 == | == Step 3 == | ||
To increase file system's size: | To increase file system's size: | ||
* 'resize2fs /dev/sda2' (Assuming you need to increase /dev/sda2) | * 'resize2fs /dev/sda2' (Assuming you need to increase /dev/sda2), this expands the filesystem on /dev/sda2 to use the full partition | ||
[[File:Screenshot 2025-03-19 at 15.53.12.png|thumb|center|`resize2fs /dev/sda2`]] | |||
Verify available space running `df -h`, displays disk usage in a human-readable format | |||
[[File:Screenshot 2025-03-19 at 15.55.56.png|thumb|center|`df -h`]] | |||
As a final check you can also check Zabbix for Latest Data > Total Space for your vm | |||
edits