* [linux-lvm] extend lv fails: invalid argument and failed to suspend
@ 2009-09-21 22:03 David Timms
2009-09-21 22:24 ` Alasdair G Kergon
0 siblings, 1 reply; 2+ messages in thread
From: David Timms @ 2009-09-21 22:03 UTC (permalink / raw)
To: LVM general discussion and development
Hi,
I have an lvm root, which I am trying to expand into pv free space:
=====pvs -v
Scanning for physical volume names
PV VG Fmt Attr PSize PFree DevSize PV UUID
/dev/sda2 vg2 lvm2 a- 49.28G 0 49.29G
yKlt1o-0aKd-fO8M-Gy4p-4bGg-46Ww-BHotg2
/dev/sda3 vg2 lvm2 a- 49.28G 0 49.29G
o8fVEA-PilV-Pwum-WDtH-O2lF-XOTW-2XPeWu
/dev/sda4 vg2 lvm2 a- 49.28G 0 49.29G
yiiiWw-1jXz-QvEm-wj46-GrFm-nuTR-PlNrl8
/dev/sdb2 vg2 lvm2 a- 229.03G 0 229.05G
xItcHe-aeR8-BndU-3WUx-ltA3-eF6A-BRxIs5
/dev/sdb3 vg2 lvm2 a- 229.80G 0 229.81G
nO7RQk-NaAG-yA9m-LiNi-XmSD-HKHX-lRt4ua
/dev/sdb5 vg2 lvm2 a- 235.00G 0 235.01G
m1xJY0-BLuu-IyAT-W17r-XY6R-XZQF-2cLw0w
/dev/sdc3 vg1 lvm2 a- 48.41G 13.88G 34.59G
z6zl0h-oiRp-jJ12-KpDA-X11g-y2YH-hKjx9U
/dev/sdd2 vg2 lvm2 a- 11.72G 0 11.72G
pGnLD2-SUMV-V82W-myqj-yUH8-x0m1-6XgWe0
/dev/sdd3 vg2 lvm2 a- 13.86G 0 13.87G
n1kZD5-VCP2-Erj1-rtSg-3kki-5Iod-DyAmNG
so: 13GB free on vg1...
=====lvs -v
Finding all logical volumes
LV VG #Seg Attr LSize Maj Min KMaj KMin Origin Snap% Move
Copy% Log Convert LV UUID
lvhome vg1 1 -wi-ao 21.53G -1 -1 253 1
2qxr1c-ObDr-BedT-B8Aq-6fBE-81tW-3mQvuP
lvslash vg1 1 -wi-ao 12.00G -1 -1 253 0
A72rig-0oMK-KgVt-k6vo-rq7O-PKX0-koudNn
lvswap vg1 1 -wi-ao 1.00G -1 -1 253 2
7JzPLM-qqYs-Y4r4-SYdi-9M3j-7teZ-mNqVgW
lvinfra vg2 10 -wi-ao 300.94G -1 -1 253 4
q1qH2f-wqOQ-A7gQ-F8Zq-DGZZ-YumT-TjpmGe
lvmedia vg2 5 -wi-ao 566.31G -1 -1 253 3
8q5eTn-6ruu-NS5E-Zf6o-e88H-Urae-gXdB2Y
and lvslash is on vg1 and I want to grow it by +4GB
=====
- boot rescue
- don't mount
- lvm vgchange -a y
- lvm lvextend -v -L+4G /dev/vg1/lvslash
Trying to remember the error:
=====
...
Loading vg1 table
device-mapper: reload ioctl failed: invalid argument
Failed to suspend lvslash
=====
Now I only looked at pvs since alastair suggested another user with a
similar problem.
In fact, while pvs says vg1 has 13.88G free, I think this is actually
really supposed to be a negative number, since:
(DevSize) - (PSize) = (PFree)
34.59G - 48.41G = -13.82 /= 13.88
, which looks like a bug in at least pvs !
I don't know how I got into this situation, nor how to proceed, but do
know that the access to all the disk partitions is working normally at
he moment, despite the above inconsistency.
Any ideas on how to solve this ?
DaveT.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-lvm] extend lv fails: invalid argument and failed to suspend
2009-09-21 22:03 [linux-lvm] extend lv fails: invalid argument and failed to suspend David Timms
@ 2009-09-21 22:24 ` Alasdair G Kergon
0 siblings, 0 replies; 2+ messages in thread
From: Alasdair G Kergon @ 2009-09-21 22:24 UTC (permalink / raw)
To: David Timms; +Cc: LVM general discussion and development
On Tue, Sep 22, 2009 at 08:03:37AM +1000, David Timms wrote:
> /dev/sdc3 vg1 lvm2 a- 48.41G 13.88G 34.59G
> z6zl0h-oiRp-jJ12-KpDA-X11g-y2YH-hKjx9U
> lvhome vg1 1 -wi-ao 21.53G -1 -1 253 1
> 2qxr1c-ObDr-BedT-B8Aq-6fBE-81tW-3mQvuP
> lvslash vg1 1 -wi-ao 12.00G -1 -1 253 0
> A72rig-0oMK-KgVt-k6vo-rq7O-PKX0-koudNn
> lvswap vg1 1 -wi-ao 1.00G -1 -1 253 2
> 7JzPLM-qqYs-Y4r4-SYdi-9M3j-7teZ-mNqVgW
> (DevSize) - (PSize) = (PFree)
> 34.59G - 48.41G = -13.82 /= 13.88
> , which looks like a bug in at least pvs !
Not really.
Somehow your PV is defined to be bigger than the disk it is currently on.
Ways this can happen include the /dev/sdc partition table getting changed
incorrectly, deliberately overriding the device size when creating it,
restoring from metadata backups incorrectly or using 'dd' to copy device
metadata.
> Any ideas on how to solve this ?
You need to start by reviewing your /dev/sdc partition table and making
sure all space on there is accounted for in partitions in the way you
expect: How big is sdc? Where and how big are sdc1 and sdc2? Is there
any space on the disk not included in sdc1/2/3 ?
Alasdair
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-21 22:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-21 22:03 [linux-lvm] extend lv fails: invalid argument and failed to suspend David Timms
2009-09-21 22:24 ` Alasdair G Kergon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).