Skip to content

gaankdoank/extend-root-disk-on-running-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

extend-root-disk-on-running-system

Extend Root partition LVM space on running system

Type lsblk and see where your partition attached on same disk or not. If you have at least 1 partition not used on same disk go following to number 1 step. And if you adding physichal disk, run this : a. fdisk /dev/sdb b. n (new partition) c. p (primary) (Press ENTER) (Use default partition number) (Press ENTER) (Use default first sector) (Press ENTER) (Use default last sector) d. t (change the partition type) e. 8e (Linux LVM) f. w (write) Continue to number 1 step.

  1. Create new partition (ex: /dev/sda3) from unallocated space. I am use “cfdisk” and type LVM / 8E
  2. Check partition applied or not > “cat /proc/partitions”, if /dev/sda3 not shown, apply first > “partprobe /dev/sda” then check it again
  3. Create psychal volume > “pvcreate /dev/sda3”
  4. Extend volume group > “vgextend centos /dev/sda3”
  5. Extend root partition > “lvextend -l +100%FREE /dev/mapper/centos-root”
  6. Apply via resize2fs > “resize2fs /dev/mapper/centos-root”
  7. Apply via xfs > “xfs_growfs /dev/mapper/centos-root”

About

Extend Root partition LVM space on running system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published