LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-19-2014, 01:39 PM   #1
dorlack
Member
 
Registered: Oct 2009
Location: Cambridge MA
Distribution: Any Linux
Posts: 122

Rep: Reputation: 2
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.

Last edited by dorlack; 12-19-2014 at 01:41 PM.
 
Old 12-19-2014, 02:09 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,579

Rep: Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565
Quote:
Originally Posted by dorlack View Post
/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.
It sure looks like you forgot the "+" sign in "+100%FREE" and lvextend tried to set the size to the current free space instead of extending it by the free space amount.
 
Old 12-19-2014, 02:21 PM   #3
dorlack
Member
 
Registered: Oct 2009
Location: Cambridge MA
Distribution: Any Linux
Posts: 122

Original Poster
Rep: Reputation: 2
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.

Last edited by dorlack; 12-19-2014 at 02:26 PM.
 
Old 12-19-2014, 03:17 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,579

Rep: Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565
Quote:
Originally Posted by dorlack View Post
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
That looks to me like you have the LV striped over the two existing PVs. The output from lvdisplay would confirm that. I suspect that you need to add PVs in pairs to continue that structure, but this is something I do not have much experience with.
Quote:
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.
Here you again forgetting the "+" sign.
 
Old 12-21-2014, 01:19 AM   #5
dorlack
Member
 
Registered: Oct 2009
Location: Cambridge MA
Distribution: Any Linux
Posts: 122

Original Poster
Rep: Reputation: 2
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
 
Old 12-21-2014, 01:23 AM   #6
dorlack
Member
 
Registered: Oct 2009
Location: Cambridge MA
Distribution: Any Linux
Posts: 122

Original Poster
Rep: Reputation: 2
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.
 
Old 12-21-2014, 01:26 AM   #7
dorlack
Member
 
Registered: Oct 2009
Location: Cambridge MA
Distribution: Any Linux
Posts: 122

Original Poster
Rep: Reputation: 2
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
 
Old 12-21-2014, 01:34 AM   #8
dorlack
Member
 
Registered: Oct 2009
Location: Cambridge MA
Distribution: Any Linux
Posts: 122

Original Poster
Rep: Reputation: 2
root@storm5:/# lvchange /dev/vgebs/lvebs --alloc inherit
Allocation policy of logical volume "lvebs" is already inherit
 
Old 12-21-2014, 01:52 AM   #9
dorlack
Member
 
Registered: Oct 2009
Location: Cambridge MA
Distribution: Any Linux
Posts: 122

Original Poster
Rep: Reputation: 2
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
 
Old 12-21-2014, 02:41 AM   #10
dorlack
Member
 
Registered: Oct 2009
Location: Cambridge MA
Distribution: Any Linux
Posts: 122

Original Poster
Rep: Reputation: 2
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.
 
Old 12-21-2014, 03:08 AM   #11
dorlack
Member
 
Registered: Oct 2009
Location: Cambridge MA
Distribution: Any Linux
Posts: 122

Original Poster
Rep: Reputation: 2
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
 
Old 12-21-2014, 12:56 PM   #12
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,579

Rep: Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565Reputation: 1565
Glad it worked out. It was a lucky guess -- I've never done anything with LVM stripes.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extending LVM samansniper Linux - Server 2 06-29-2013 03:26 AM
Error in extending LVM... cj_cheema Linux - Server 6 08-03-2009 01:21 PM
Extending LVM partition?? your_shadow03 Linux - Newbie 3 01-16-2009 03:43 AM
Extending home partition with LVM The_Outlander Slackware 2 01-03-2007 09:13 PM
extending ext3 lvm Kroenecker Linux - Newbie 2 12-31-2003 07:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration