Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to extend a volume group across a second physical volume without success and am looking for a little help.
My hard drive layout is as follows:
hda1 ntfs - windows part. - irrelevant
hda2 bootmanager - irrelevant
hda3 linux boot
hda4 extended
----hda5 linux lvm <- partition that currently houses Volume00
----hda6 linux lvm <- partition that I'm trying to add to Volume00
output from parted print to confirm the above:
Using /dev/hda
Information: The operating system thinks the geometry on /dev/hda is
5168/240/63. Therefore, cylinder 1024 ends at 7559.999M.
(parted) print
Disk geometry for /dev/hda: 0.000-38154.375 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 18722.812 primary ntfs
3 18722.812 18826.171 primary ext3 boot
4 18826.172 38146.992 extended lba
5 18826.203 29066.132 logical lvm
6 29066.164 38146.992 logical lvm
2 38146.992 38154.375 primary
Given the partition type and everything else, I should be able to add hda6 to the volume group Volume00 by running:
vgextend -v Volume00 /dev/hda6
But when doing so I get the following:
[root@Q-redhat ~] $ vgextend -v Volume00 /dev/hda6
vgextend -- locking logical volume manager
vgextend -- checking volume group name "Volume00"
vgextend -- checking volume group "Volume00" existence
vgextend -- checking for inactivity of volume group
vgextend -- reading data of volume group "Volume00" from lvmtab
vgextend -- INFO: maximum logical volume size is 255.99 Gigabyte
vgextend -- reading data for all physical volumes from disk(s)
vgextend -- extending VGDA structures of volume group "Volume00"
vgextend -- ERROR: no physical volumes usable to extend volume group "Volume00"
Any ideas on why I might be getting this or have ideas on how to get more information?
Hey After adding space to VG, how to add space to lv?
I tried
#lvextend -L68G /dev/VolGroup00/LogVol00
New size given (2176 extents) not larger than existing size (2897 extents)
lvextend: Add space to a logical volume
My vgdisplay is as follows
#vgdisplay
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 4
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 4
Act PV 4
VG Size 158.91 GB
PE Size 32.00 MB
Total PE 5085
Alloc PE / Size 2897 / 90.53 GB
Free PE / Size 2188 / 68.38 GB
VG UUID lyafjT-dHEX-KtY3-j4WB-fspU-Ed0Q-XmmaIt
lvdisplay is as follows
#lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID cVS7VW-taUs-3DFg-KLuM-DoEm-qhHj-HO1New
LV Write Access read/write
LV Status available
# open 1
LV Size 90.53 GB
Current LE 2897
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 253:0
Now a partition /ds is mounted on this logical volume I need to extend its space as it is getting full
Is it necessary to take backup before I can do this (then it becomes simple)But without doing that can I increase the space???
lvextend -L68G ... will try to set the LV size to 68G. It's balking because the LV is already bigger than that ... 90Gb per your lvdisplay output.
I think you intended to ADD 68G to the existing LV, not resize it down to 68G. You need a plus sign after the L and before the 68G.
Like this: lvextend -L+68G ...
[edit]
Man, no sooner did I type that and submit the post, somebody else beat me to the punch by 3 minutes and our messages crossed paths. Guess I need to learn to type faster!
[/edit]
Also, adding to what WhatsHisName already said, you will probably need to run e2fsck on the lvextend'ed volume before your run resize2fs. resize2fs will probably advise you of this and refuse to do anything until you first comply with it's wishes!
Yes, good point. resize2fs requires the filesystem to be unmounted.
But even “man ext2online” comes with this warning:
“...WARNING
Note that resizing a mounted filesystem is inherently dangerous and may corrupt filesystems, although no errors resulting in data loss have ever been reported to the author. In theory online resizing should work fine with arbitrarily large filesystems, but it has not yet been tested by the author on a filesystem larger than 11GB. Use with caution. Backups are always a good idea, because your disk may fail at any time, you delete files by accident, or your computer is struck by a meteor...”
Do i have to umount this partition before doing this??????
No, it won't format.
Yes, you need to unmount first, since "resize2fs" implies you're using ext3 or ext2. Other filesystem types may or may not need to be mounted for resizing. I'm thinking that XFS must actually BE MOUNTED to resize, but don't quote me on that. Ditto for JFS.
hi friends i cont able to extend lv. i got the below error pd guide
:::VG details:::
VG Name ag01
System ID
Format lvm2
Metadata Areas 6
Metadata Sequence No 9
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 6
Open LV 1
Max PV 0
Cur PV 6
Act PV 6
VG Size 5.43 GB
PE Size 4.00 MB
Total PE 1389
Alloc PE / Size 857 / 3.35 GB
Free PE / Size 532 / 2.08 GB
VG UUID xFrpeI-imJm-LXg8-uXrD-CBQb-x2Hb-JzbXJ1
::lv details::
LV Name /dev/ag01/agvl
VG Name ag01
LV UUID aB8GJC-PBLG-LAmC-f2UK-Rxni-jb1c-UecxBS
LV Write Access read/write
LV Status available
# open 1
LV Size 1.00 GB
Current LE 256
Segments 2
Allocation inherit
Read ahead sectors 0
Block device 253:7
::Error i got while extending lv:
lvextend -L+1G /dev/ag01/agvl
Extending logical volume agvl to 2.00 GB
device-mapper: reload ioctl failed: Invalid argument
Failed to suspend agvl
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.