I am looking for some help on expanding my LVM partitions. I have two disks I want to expand (10GB to 50GB and 40GB to 150GB).
I added the extra space in VMWare and the expanded disk is being picked up.
root@server:/home/admin# lvs
LV VG Attr LSize
chat_history chat_history_vg -wi-ao 50.00g
file_store file_store_vg -wi-ao 150.00g
They are on sdb and sdc. This is all new to me but from what I can see there is still more to do to make them accessible based on the Alloc PE/Size value shown below.
root@server:/home/admin# vgdisplay
--- Volume group ---
VG Name file_store_vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 55
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 150.00 GiB
PE Size 4.00 MiB
Total PE 38399
Alloc PE / Size 38399 / 150.00 GiB
Free PE / Size 0 / 0
VG UUID H4tar2-QUt0-xCd1-iC2T-kQb3-TBZR-aVGk9O
--- Volume group ---
VG Name chat_history_vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 55
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 50.00 GiB
PE Size 4.00 MiB
Total PE 12799
Alloc PE / Size 12799 / 50.00 GiB
Free PE / Size 0 / 0
VG UUID CHnhT1-UBNw-wFQe-AA1D-4z8N-Cx3M-EX6zvo
I have been reading up numerous sites on using fdisk. My first question relates is when I run fdisk on one of these partitions I get this warning about the lack of a partition table. Is this benign?
root@server:/home/admin# 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 0x2b40ee91.
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)
Command (m for help): m
Command action
From what I understand, even though I have existing data on the disk I wish to expand I should still choose to 'n' to create a new partition?
One last question the RedHat site starts with the step to unmount the disk before working on it. Other sites don't mention this. Am I ok leaving /dev/sdb mounted during the expansion?
Thanks,
Michael