Add disk and expand in a Logical Volume no reboot, but not for /root /(boot).
Tested in Linux CentOS/RedHat 5.7  /var
First add a disk in (VMWare)
Scan
 echo "- - -" > /sys/class/scsi_host/host0/scan
 fdisk -l
 fdisk /dev/sdb
 n,p,1,w
Format
 mkfs -t ext3 /dev/sdb1
Add to lvm
 pvcreate /dev/sdb1
Add to existing Volume Group
 vgextend VG_30 /dev/sdb1
Resize the Logical Volume
 lvresize -L +8GB /dev/mapper/VG_30-LV_VAR
Resize to the FS
 resize2fs -p /dev/mapper/VG_30-LV_VAR
Tags: , ,

1 thought on “How to add a disk to lvm

Leave a Reply

Your email address will not be published. Required fields are marked *