How to extend physical volume using LVM
d.qureshi-7yFXA2EciJlaa/[email protected] Fri, 08 Jun 2007 16:26:45 +0100
| Newsgroups | gmane.linux.redhat.release.taroon.general |
|---|---|
| Message-ID | <[email protected]> |
I have a HP Proliant DL740 G1 server running RHEL AS 3 update 4. I created 10GB of disk space on a EVA3000 SAN and presented to the server. I then used fdisk to create a partition of 5GB out of the 10GB I presented to the server by the EVA3000. I then used LVM to create the physical volume, volume groups and logical volumes accordingly. But now I need to extend the physical size from 5Gb to 10Gb. Can I extend the physical size from 5Gb to 10Gb using LVM commands? See below the current set up of the partions, physical volume, volume group and logical volumes on the server. As you can see fdisk displays 10Gb space on /dev/sdb1. fdisk -l /dev/sdb Disk /dev/sdb: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 653 5245191 83 Linux See below pvdisplay shows 5GB of physical space allocated. # pvdisplay /dev/sdb1 --- Physical volume --- PV Name /dev/sdb1 VG Name vg_dba PV Size 5 GB [10490382 secs] / NOT usable 32.19 MB [LVM: 128 KB] PV# 1 PV Status NOT available Allocatable yes (but full) Cur LV 1 PE Size (KByte) 32768 Total PE 159 Free PE 0 Allocated PE 159 PV UUID ZWttEO-GbCt-Qaux-oGRK-vq7S-E8tq-70A4Mr See below pvscan shows /dev/sdb1 has 4.97 and zero free. # pvscan pvscan -- reading all physical volumes (this may take a while...) pvscan -- ACTIVE PV "/dev/sda1" of VG "vg_ora" [1023.94 GB / 32 MB free] pvscan -- ACTIVE PV "/dev/sdb1" of VG "vg_dba" [4.97 GB / 0 free] pvscan -- ACTIVE PV "/dev/cciss/c0d0p2" of VG "vg_os" [67.73 GB / 29.73 GB free] pvscan -- total: 3 [1.07 TB] / in use: 3 [1.07 TB] / in no VG: 0 [0] See below the lvmdiskscan command shows that 5GB has been allocated to /dev/sdb1. # lvmdiskscan lvmdiskscan -- reading all disks / partitions (this may take a while...) lvmdiskscan -- /dev/sda1 [ 1023.99 GB] USED LVM whole disk lvmdiskscan -- /dev/sdb1 [ 5 GB] USED LVM whole disk lvmdiskscan -- /dev/cciss/c0d0p1 [ 99.59 MB] free whole disk lvmdiskscan -- 3 disks lvmdiskscan -- 3 whole disks lvmdiskscan -- 0 loop devices lvmdiskscan -- 0 multiple devices lvmdiskscan -- 0 network block devices lvmdiskscan -- 4 partitions lvmdiskscan -- 0 LVM physical volume partitions -- Taroon-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/taroon-list