LVM, Expanded the size of my physical volume, how do I expand the volume group?
Hi,
I have a raid5 system made up of three discs on which i have an LVM. This consists of one logical volume in one volume group made up out of one physical volume. I set up an LVM a few years ago as I learned that it would make it easier to resize my volumes in the future.
I have now replaced all my original discs in the raid by larger once and then want to use more space for my volume. The problem is that I started this operation without reading the manual, and now I ended up in a situation to which I can't find a solution.
As my disks were replaced I partitioned the entire disk as one partition. This means that the raid (/dev/md0) today is double the size it once was. (I have now understood that what I should have done was creating a second partition and a new raid configuration, create a new physical volume and add this to my volume group. Unfortunately I didn't) So now I have a physical volume (/dev/md0) that is 3.64 TB. But my volume group is just 1.82TB. I have not been able to find a way to expand the size of my volume group other than by adding new physical volumes. But what I need to expand it by size to include all the space available on the physical volume.
Can this be done?
As I have understood things vgextend only takes a new physical volume as argument and I don't have any new physical volume to add.
Here is the output from some commands that may help you to understand my problem:
# pvdisplay
--- Physical volume ---
PV Name /dev/md0
VG Name lvm-raid
PV Size 3.64 TB / not usable 1.82 TB
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 476933
Free PE 0
Allocated PE 476933
PV UUID D1gp7S-Oqb0-4yQq-BmyK-FNHf-51vz-rJRerl
# vgdisplay
--- Volume group ---
VG Name lvm-raid
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 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 1.82 TB
PE Size 4.00 MB
Total PE 476933
Alloc PE / Size 476933 / 1.82 TB
Free PE / Size 0 / 0
VG UUID Do3tKS-OYkc-P90J-bM80-5UQk-TvrN-t0oe3B
# lvdisplay
--- Logical volume ---
LV Name /dev/lvm-raid/lvm0
VG Name lvm-raid
LV UUID 23xwns-hGDJ-ClhC-ZVYi-A4Yc-R3xn-oJVskL
LV Write Access read/write
LV Status available
# open 0
LV Size 1.82 TB
Current LE 476933
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
Regards
Pyr
|