User Tools

Site Tools


docu:csheet:sysadm:disks:grow_partition

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
docu:csheet:sysadm:disks:grow_partition [2020/06/04 08:03]
admin created
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 i swap it off and delete it using fdisk+# 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 i guess :-( (RIP uptime)+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 /dev/thelvm-vg/mapper-lv 
 + 
 +# resize2fs on the partition if NOT LVM
 resize2fs /dev/vda1 resize2fs /dev/vda1
  
 </code> </code>
docu/csheet/sysadm/disks/grow_partition.1591257836.txt.gz · Last modified: 2020/06/04 08:03 by admin