having trouble extending with LVM
Here is my vgdisplay out put
vgdisplay --- Volume group --- VG Name vgebs System ID Format lvm2 Metadata Areas 3 Metadata Sequence No 3 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 3 Act PV 3 VG Size 2.49 TiB PE Size 4.00 MiB Total PE 652285 Alloc PE / Size 524286 / 2.00 TiB Free PE / Size 127999 / 500.00 GiB VG UUID CjRO0h-FeEO-sN7n-gE8G-hqBA-mIyD-X0sAD1 root@storm5:/dev/mapper# lvm lvm> exi No such command 'exi'. Try 'help'. lvm> exit Exiting. root@storm5:/dev/mapper# vgdisplay --- Volume group --- VG Name vgebs System ID Format lvm2 Metadata Areas 3 Metadata Sequence No 3 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 3 Act PV 3 VG Size 2.49 TiB PE Size 4.00 MiB Total PE 652285 Alloc PE / Size 524286 / 2.00 TiB Free PE / Size 127999 / 500.00 GiB VG UUID CjRO0h-FeEO-sN7n-gE8G-hqBA-mIyD-X0sAD1 Filesystem Size Used Avail Use% Mounted on /dev/xvda1 30G 2.5G 26G 9% / none 4.0K 0 4.0K 0% /sys/fs/cgroup udev 1.9G 12K 1.9G 1% /dev tmpfs 377M 396K 377M 1% /run none 5.0M 0 5.0M 0% /run/lock none 1.9G 0 1.9G 0% /run/shm none 100M 0 100M 0% /run/user /dev/mapper/vgebs-lvebs 2.0T 9.6G 1.9T 1% /data/datastore1 /dev/mapper/vgebs-lvebs currently has two volumes each 1TB. I am trying to add another 500GB volume. As you can see in the vgdisplay I already have the 500GB in the volume group. I am having trouble extending. lvextend –l +100%FREE does not seem to work. I get this error /dev/mapper# lvextend -l 100%FREE /dev/mapper/vgebs-lvebs /dev/xvdg1 Rounding size (127999 extents) up to stripe boundary size for segment (128000 extents) New size given (128000 extents) not larger than existing size (524286 extents) Run `lvextend --help' for more information. I may be running that wrong? The new volume is labeled: /dev/xvdg1 5:/dev/mapper# pvscan PV /dev/xvdf VG vgebs lvm2 [1024.00 GiB / 0 free] PV /dev/xvdh VG vgebs lvm2 [1024.00 GiB / 0 free] PV /dev/xvdg1 VG vgebs lvm2 [500.00 GiB / 500.00 GiB free] Total: 3 [2.49 TiB] / in use: 3 [2.49 TiB] / in no VG: 0 [0 ] Any help would be great. I have also tried this way /dev/mapper# lvextend -l 100%FREE /dev/mapper/vgebs-lvebs /dev/xvdg1 Rounding size (127999 extents) up to stripe boundary size for segment (128000 extents) New size given (128000 extents) not larger than existing size (524286 extents) Run `lvextend --help' for more information. |
Quote:
|
Good call on that. After fixing that it takes us to here
root@storm5:/dev/mapper# lvextend -l +100%FREE /dev/mapper/vgebs-lvebs /dev/xvdg1 Using stripesize of last segment 2.00 MiB Rounding size (652285 extents) down to stripe boundary size for segment (652284 extents) Extending logical volume lvebs to 2.49 TiB Insufficient suitable allocatable extents for logical volume lvebs: 127998 more required root@storm5:/dev/mapper# root@storm5:/dev/mapper# lvextend -L 500GB /dev/mapper/vgebs-lvebs /dev/xvdg1 New size given (128000 extents) not larger than existing size (524286 extents) Run `lvextend --help' for more information. root@storm5:/dev/mapper# lvextend -L 1GB /dev/mapper/vgebs-lvebs /dev/xvdg1 New size given (256 extents) not larger than existing size (524286 extents) Run `lvextend --help' for more information. |
Quote:
Quote:
|
Here is the output from LVdisplay, not sure where to find the stripe name I guess:
lvdisplay --- Logical volume --- LV Path /dev/vgebs/lvebs LV Name lvebs VG Name vgebs LV UUID mUcunA-qS0E-ZAiC-a6TS-WCHw-GrFD-lAo5te LV Write Access read/write LV Creation host, time storm5.domain.com, 2014-12-18 18:08:08 +0000 LV Status available # open 1 LV Size 2.00 TiB Current LE 524286 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 16384 Block device 252:0 |
I tried extending it this way:
root@storm5:~# lvextend vgebs/lvebs -L 500G New size given (128000 extents) not larger than existing size (524286 extents) Run `lvextend --help' for more information. |
This is interesting also
root@storm5:~# lvextend -l +100%FREE /dev/vgebs/lvebs Using stripesize of last segment 2.00 MiB Rounding size (652285 extents) down to stripe boundary size for segment (652284 extents) Extending logical volume lvebs to 2.49 TiB Insufficient suitable allocatable extents for logical volume lvebs: 127998 more required |
root@storm5:/# lvchange /dev/vgebs/lvebs --alloc inherit
Allocation policy of logical volume "lvebs" is already inherit |
this may help shed some light. Below is how I setup the first LV set:
:/mnt# pvcreate /dev/sdf /dev/sdh :/mnt# vgcreate vgebs /dev/sdf /dev/sdh :lvcreate -i 2 -I 2M -l 100%FREE -n lvebs vgebs :/mnt# mkfs.ext3 /dev/mapper/vgebs-lvebs :mount /dev/mapper/vgebs-lvebs /mnt/disk3 |
So here is where I am at now. Rather than using GB, I tried to grow it by the number of extents. However it still is ticked off.
root@storm5:/# lvextend -l652285 -n /dev/vgebs/lvebs Using stripesize of last segment 2.00 MiB Rounding size (652285 extents) up to stripe boundary size for segment (652286 extents) Extending logical volume lvebs to 2.49 TiB Insufficient free space: 128000 extents needed, but only 127999 available root@storm5:/# lvextend -l127999 -n /dev/vgebs/lvebs Rounding size (127999 extents) up to stripe boundary size for segment (128000 extents) New size given (128000 extents) not larger than existing size (524286 extents) Run `lvextend --help' for more information. |
Figure it out! You were right it had to be done in pairs!
root@storm5:/# lvextend -l +100%FREE /dev/mapper/vgebs-lvebs /dev/xvdg /dev/xvdi Using stripesize of last segment 2.00 MiB Extending logical volume lvebs to 4.00 TiB Logical volume lvebs successfully resized |
Glad it worked out. It was a lucky guess -- I've never done anything with LVM stripes.
|
All times are GMT -5. The time now is 08:22 PM. |