LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 04-16-2012, 03:12 AM   #1
anis123
Member
 
Registered: Mar 2012
Posts: 95

Rep: Reputation: Disabled
I have spce in volume group but it can not increase the size of logical volume


Dear All

I have almost 108 Gb space .but when i increase the size of logical volume .it can not increase the size of logical volume.
i use the following command
herer is my detail of vgdisplay
VG Name xen-vol
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 8
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 150.01 GiB
PE Size 4.00 MiB
Total PE 38402
Alloc PE / Size 10502 / 41.02 GiB
Free PE / Size 27900 / 108.98 GiB
VG UUID fbfxhr-x3l3-EJCj-gwVp-tgox-1POl-x1ScSt

Here is lvdisplay details

lvdisplay
--- Logical volume ---
LV Name /dev/xen-vol/lvmtest-swap
VG Name xen-vol
LV UUID ZTV6g3-YLGv-QgoY-U5bp-UAdc-fOxD-i22lK2
LV Write Access read/write
LV Status available
# open 1
LV Size 1.00 GiB
Current LE 256
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:0

--- Logical volume ---
LV Name /dev/xen-vol/lvmtest-disk
VG Name xen-vol
LV UUID uiaLoC-1Z4r-EW6S-NzxM-D4hM-4KVD-e00Ou4
LV Write Access read/write
LV Status available
# open 1
LV Size 40.02 GiB
Current LE 10246
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:1



lvextend -v -L +10G /dev/xen-vol/lvmtest-disk




after that i also use resize2fs /dev/xvda2

kindly help me in this regards

Thank you
 
Old 04-16-2012, 03:19 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Can we have your fdisk -l output as well? And can you edit your post to include the output from the commands in Code tags. its so frustrating to read through the output this way.
 
Old 04-16-2012, 03:27 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you said "it can not" but not said anything useful about what actually happens. Are you getting error message you're not sharing with us etc.?
 
Old 04-16-2012, 04:15 AM   #4
anis123
Member
 
Registered: Mar 2012
Posts: 95

Original Poster
Rep: Reputation: Disabled
i have volume group

Quote:
Originally Posted by linuxlover.chaitanya View Post
Can we have your fdisk -l output as well? And can you edit your post to include the output from the commands in Code tags. its so frustrating to read through the output this way.
Fdisk -l

Here is my fdisk -l output here attached 2 harddisk i use /dev/sdb which size is 200GB.i create LVM on this disk and i use debian squeez

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 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: 0x0002152b

Device Boot Start End Blocks Id System
/dev/sda1 1 499 4002816 82 Linux swap / Solaris
Partition 1 does not end on cylinder boundary.
/dev/sda2 499 30402 240193537 5 Extended
/dev/sda5 499 30402 240193536 83 Linux

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 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: 0x00029984

Device Boot Start End Blocks Id System
/dev/sdb1 1 13055 104864256 8e Linux LVM
/dev/sdb2 13056 19583 52436160 8e Linux LVM

Disk /dev/dm-0: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 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: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 43.0 GB, 42974838784 bytes
255 heads, 63 sectors/track, 5224 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: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table




hera is my clear output of Vgdisplay

Vgdisplay

VG Name xen-vol
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 8
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 150.01 GiB
PE Size 4.00 MiB
Total PE 38402
Alloc PE / Size 10502 / 41.02 GiB
Free PE / Size 27900 / 108.98 GiB
VG UUID fbfxhr-x3l3-EJCj-gwVp-tgox-1POl-x1ScSt

and here is my clear lvdisply out put
lvdisplay
--- Logical volume ---
LV Name /dev/xen-vol/lvmtest-swap
VG Name xen-vol
LV UUID ZTV6g3-YLGv-QgoY-U5bp-UAdc-fOxD-i22lK2
LV Write Access read/write
LV Status available
# open 1
LV Size 1.00 GiB
Current LE 256
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:0

--- Logical volume ---
LV Name /dev/xen-vol/lvmtest-disk
VG Name xen-vol
LV UUID uiaLoC-1Z4r-EW6S-NzxM-D4hM-4KVD-e00Ou4
LV Write Access read/write
LV Status available
# open 1
LV Size 40.02 GiB
Current LE 10246
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:1
 
Old 04-16-2012, 04:28 AM   #5
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
As I said before, please use Code tags so that it is easier for members to read the computer output.
 
Old 04-16-2012, 04:46 AM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
What was the output from lvextend -v -L +10G /dev/xen-vol/lvmtest-disk?

Is /dev/xvda2 in resize2fs /dev/xvda2 intended to be the same device? Why is it not also /dev/xen-vol/lvmtest-disk?
 
Old 04-16-2012, 04:46 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Why do you care what fdisk says? The VG is 150GB regardless of the physical disk it's on.
 
Old 04-16-2012, 05:04 AM   #8
anis123
Member
 
Registered: Mar 2012
Posts: 95

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by linuxlover.chaitanya View Post
As I said before, please use Code tags so that it is easier for members to read the computer output.
Fdisk -l

Here is my fdisk -l output here attached 2 harddisk i use /dev/sdb which size is 200GB.i create LVM on this disk and i use debian squeez

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 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: 0x0002152b

Device Boot Start End Blocks Id System
/dev/sda1 1 499 4002816 82 Linux swap / Solaris
Partition 1 does not end on cylinder boundary.
/dev/sda2 499 30402 240193537 5 Extended
/dev/sda5 499 30402 240193536 83 Linux

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 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: 0x00029984

Device Boot Start End Blocks Id System
/dev/sdb1 1 13055 104864256 8e Linux LVM
/dev/sdb2 13056 19583 52436160 8e Linux LVM

Disk /dev/dm-0: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 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: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 43.0 GB, 42974838784 bytes
255 heads, 63 sectors/track, 5224 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: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table




hera is my clear output of Vgdisplay

Vgdisplay

VG Name "xen-vol"
System "ID"
Format "lvm2"
Metadata Areas 2
Metadata Sequence No 8
VG Access "read/write"
VG Status "resizable"
MAX LV "0"
Cur LV "2"
Open LV "2"
Max PV "0"
Cur PV "2"
Act PV "2"
VG Size "150.01 GiB"
PE Size "4.00 MiB"
Total PE "38402"
Alloc PE / Size "10502 / 41.02 GiB"
Free PE / Size "27900 / 108.98 GiB"
VG UUID fbfxhr-x3l3-EJCj-gwVp-tgox-1POl-x1ScSt

and here is my clear lvdisply out put
lvdisplay
--- Logical volume ---
LV Name "/dev/xen-vol/lvmtest-swap"
VG Name "xen-vol"
LV UUID "ZTV6g3-YLGv-QgoY-U5bp-UAdc-fOxD-i22lK2"
LV Write Access "read/write"
LV Status available
# open 1
LV Size "1.00 GiB"
Current LE "256"
Segments "1"
Allocation "inherit"
Read ahead sectors "auto"
- currently set to "256"
Block device "254:0"

--- Logical volume ---
LV Name "/dev/xen-vol/lvmtest-disk"
VG Name "xen-vol"
LV UUID "uiaLoC-1Z4r-EW6S-NzxM-D4hM-4KVD-e00Ou4"
LV Write Access "read/write"
LV Status "available"
# open "1"
LV Size "40.02 GiB"
Current LE "10246"
Segments "1"
Allocation "inherit"
Read ahead sectors "auto"
- currently set to "256"
Block device "254:1"



I use the following command for lvextend

lvextend -v -L +10GB -n /dev/xen-vol/lvmtest-disk
 
Old 04-16-2012, 05:06 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
OK, this stuff you're posting isn't useful, and you're just repeating yourself. Can you answer the other questions you've been asked please?
 
Old 04-16-2012, 05:15 AM   #10
anis123
Member
 
Registered: Mar 2012
Posts: 95

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by anis123 View Post
Fdisk -l

Here is my fdisk -l output here attached 2 harddisk i use /dev/sdb which size is 200GB.i create LVM on this disk and i use debian squeez

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 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: 0x0002152b

Device Boot Start End Blocks Id System
/dev/sda1 1 499 4002816 82 Linux swap / Solaris
Partition 1 does not end on cylinder boundary.
/dev/sda2 499 30402 240193537 5 Extended
/dev/sda5 499 30402 240193536 83 Linux

Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 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: 0x00029984

Device Boot Start End Blocks Id System
/dev/sdb1 1 13055 104864256 8e Linux LVM
/dev/sdb2 13056 19583 52436160 8e Linux LVM

Disk /dev/dm-0: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 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: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 43.0 GB, 42974838784 bytes
255 heads, 63 sectors/track, 5224 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: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table




hera is my clear output of Vgdisplay

Vgdisplay

VG Name "xen-vol"
System "ID"
Format "lvm2"
Metadata Areas 2
Metadata Sequence No 8
VG Access "read/write"
VG Status "resizable"
MAX LV "0"
Cur LV "2"
Open LV "2"
Max PV "0"
Cur PV "2"
Act PV "2"
VG Size "150.01 GiB"
PE Size "4.00 MiB"
Total PE "38402"
Alloc PE / Size "10502 / 41.02 GiB"
Free PE / Size "27900 / 108.98 GiB"
VG UUID fbfxhr-x3l3-EJCj-gwVp-tgox-1POl-x1ScSt

and here is my clear lvdisply out put
lvdisplay
--- Logical volume ---
LV Name "/dev/xen-vol/lvmtest-swap"
VG Name "xen-vol"
LV UUID "ZTV6g3-YLGv-QgoY-U5bp-UAdc-fOxD-i22lK2"
LV Write Access "read/write"
LV Status available
# open 1
LV Size "1.00 GiB"
Current LE "256"
Segments "1"
Allocation "inherit"
Read ahead sectors "auto"
- currently set to "256"
Block device "254:0"

--- Logical volume ---
LV Name "/dev/xen-vol/lvmtest-disk"
VG Name "xen-vol"
LV UUID "uiaLoC-1Z4r-EW6S-NzxM-D4hM-4KVD-e00Ou4"
LV Write Access "read/write"
LV Status "available"
# open "1"
LV Size "40.02 GiB"
Current LE "10246"
Segments "1"
Allocation "inherit"
Read ahead sectors "auto"
- currently set to "256"
Block device "254:1"



I use the following command for lvextend

lvextend -v -L +10GB -n /dev/xen-vol/lvmtest-disk
output of this command


Finding volume group xen-vol
Archiving volume group "xen-vol" metadata (seqno 8).
Extending logical volume lvmtest-disk to 50.02 GiB
Found volume group "xen-vol"
Found volume group "xen-vol"
Loading xen--vol-lvmtest--disk table (254:1)
Suspending xen--vol-lvmtest--disk (254:1) with device flush
Found volume group "xen-vol"
Resuming xen--vol-lvmtest--disk (254:1)
Creating volume group backup "/etc/lvm/backup/xen-vol" (seqno 9).
Logical volume lvmtest-disk successfully resized
But when i login to virtual machine it size not increase even i execute this command also

resize2fs /dev/xvda2

it also show me size has been increased
but when i check by df -h command

the size is old one.
 
Old 04-16-2012, 05:22 AM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
You asked how to make an LV larger. You mentioned nothign at all about virtual machines. Is the LV larger or not?
 
Old 04-16-2012, 05:49 AM   #12
anis123
Member
 
Registered: Mar 2012
Posts: 95

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
You asked how to make an LV larger. You mentioned nothign at all about virtual machines. Is the LV larger or not?
Yes i want to increase the size of xen vitual machine disk .using lvm command .i use xen to create virtual machine .on debian squeeze

when i run lvextend -v -L +10G -n /dev/xen-vol/lvmtest-disk on host machine it show me the following message


Finding volume group xen-vol
Archiving volume group "xen-vol" metadata (seqno 8).
Extending logical volume lvmtest-disk to 50.02 GiB
Found volume group "xen-vol"
Found volume group "xen-vol"
Loading xen--vol-lvmtest--disk table (254:1)
Suspending xen--vol-lvmtest--disk (254:1) with device flush
Found volume group "xen-vol"
Resuming xen--vol-lvmtest--disk (254:1)
Creating volume group backup "/etc/lvm/backup/xen-vol" (seqno 9).
Logical volume lvmtest-disk successfully resized
when i log in to the virtual machine by following command
xm console lvmtest

and run the following command

resize2f /dev/svda2

it also show block size has increased

when i check by df -h command

it show me the old hard disk size means changes not reflected on it.
 
Old 04-16-2012, 05:59 AM   #13
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
is the ***LV*** larger? Forget anything on it. One thing at a time.
 
Old 04-16-2012, 06:22 AM   #14
anis123
Member
 
Registered: Mar 2012
Posts: 95

Original Poster
Rep: Reputation: Disabled
i have volume group

Quote:
Originally Posted by acid_kewpie View Post
is the ***LV*** larger? Forget anything on it. One thing at a time.
Don't understand

i just want to increse the size to virtual machine disk
 
Old 04-16-2012, 06:23 AM   #15
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you've shown us the lvdisplay, you've shown us a command's output. did the lv get larger or not?
 
  


Reply



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
LVM Mount Physical Volume/Logical Volume without a working Volume Group mpivintis Linux - Newbie 10 01-11-2014 07:02 AM
[SOLVED] Increase the Total Size of LVM Volume Group ? The Unincorporated Man Linux - Server 2 11-06-2011 11:25 PM
[SOLVED] Redhat volume group,logical volume group dhairysheel Red Hat 3 08-02-2011 05:07 AM
How to increase the logical volume chethu.prakrithi Linux - Server 2 12-22-2009 12:03 AM
Can I increase the size of a physical volume in an lvm group? If so, how? MikeB23930 Fedora 2 07-21-2009 05:38 PM

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

All times are GMT -5. The time now is 05:17 AM.

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
Open Source Consulting | Domain Registration