This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| docu:csheet:sysadm:disks:grow_partition [2020/06/04 08:03] – created admin | docu:csheet:sysadm:disks:grow_partition [2021/05/05 07:12] (current) – admin | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| <code bash> | <code bash> | ||
| # in my case, i had a non-used swap partition at the end of /dev/vda, | # in my case, i had a non-used swap partition at the end of /dev/vda, | ||
| - | # so i deleted | + | # so i swap it off and delete it using fdisk |
| swapoff -a | swapoff -a | ||
| fdisk /dev/vda | fdisk /dev/vda | ||
| Line 26: | Line 26: | ||
| growpart /dev/vda 1 | growpart /dev/vda 1 | ||
| - | # need reboot | + | # it MIGHT need reboot, but maybe not |
| shutdown -r now | shutdown -r now | ||
| - | # resize2fs on the root ext4 partition, and done! | + | # if you HAVE AN LVM ext4 you must |
| + | pvs # PFree must show new space | ||
| + | pvresize /dev/vda1 | ||
| + | vgs # same as pvs | ||
| + | lvs # you must see new available space here too | ||
| + | lvextend -l +100%FREE / | ||
| + | |||
| + | # resize2fs on the partition | ||
| resize2fs /dev/vda1 | resize2fs /dev/vda1 | ||
| </ | </ | ||