Home > HowTo, Linux > How to add a disk to lvm

How to add a disk to lvm

November 11th, 2013 Leave a comment Go to comments
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
Categories: HowTo, Linux Tags: , ,
  1. November 12th, 2013 at 01:39 | #1

    I’m really glad to find such a professional article. Thanks a lot.

  1. No trackbacks yet.

VAMOVE *

*