LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Increase LVM from expanded disk (https://www.linuxquestions.org/questions/linux-newbie-8/increase-lvm-from-expanded-disk-4175679104/)

bino25 07-21-2020 09:48 AM

Increase LVM from expanded disk
 
Hey all..

Our ESX admin increased the size of the disk presented to my server from 150Gb to 200Gb (I can see the increase in size with fdisk shown below). How do I get the LVM volume group to see the increased size so I can see free PE's to increase the size of the volume?

Output of fdisk (pre growth)

[root@xxxxxxx ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x02d7c537.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): p

Disk /dev/sdb: 161.1 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x02d7c537

Device Boot Start End Blocks Id System

Command (m for help): q

Output of fdisk after growth

[root@xxxxxxxx ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x3ddbba93.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): p

Disk /dev/sdb: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3ddbba93

Device Boot Start End Blocks Id System


vgdisplay output

[root@xxxxxxxxx ~]# vgdisplay -v data
Using volume group(s) on command line.
--- Volume group ---
VG Name data
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 149.97 GiB
PE Size 32.00 MiB
Total PE 4799
Alloc PE / Size 4799 / 149.97 GiB
Free PE / Size 0 / 0
VG UUID 01Z1M2-SLeR-4Vvh-t0QT-HuNd-hTaI-YFLsUE

berndbausch 07-21-2020 09:55 AM

Assuming /dev/sdb is a physical volume in volume group data, pvresize /dev/sdb should do the trick.

bino25 07-21-2020 10:39 AM

Thanks berndbausch. That did it.


All times are GMT -5. The time now is 02:07 PM.