Welcome to Halil Demirezen's Tips Page

LinuxNetworkComputer VisionDatabasesProgrammingvmware

LVM2: Extending a logical volume 2019-04-04 07:42:22

If we are working in a virtual environment, add a disk to the system via virtual environment tools.

a) Initialize the disk to the linux system without restart

echo "- - -" > /sys/class/scsi_host/host0/scan

b) Create LVM partition with fdisk

fdisk /dev/sdd

type "n" for new partition
type "t" for LVM type, which is "8e"

c) Create physical volume on the parititon

pvcreate /dev/sdd1

d) Extend the volume group first

vgextend vg00 /dev/sdd1

e) Extend the logical volume, then.

lvextend /dev/vg00/lv00 /dev/sdd1

f) Resize the filesystem size

resize2fs /dev/vg00/lv00