Am 08.09.2012 20:20, schrieb walt:
> I've never expanded an lvm partition before, and I think I did it the
> long way around just now:
> 
> I divided my 1TB disk into 10 equal pv's when I bought it, and then
> added four of those to a new vg (named wd0), leaving the other six
> for future use.
> 
> After a few months of filling up that partition I needed more room,
> of course, so I used vgextend to add a fifth pv to the existing vg.
> That worked fine, but now I had to extend the ext4 fs to fill all of
> the added new space.
> 
> While googling I saw some advice to use resize2fs for that, but
> resize2fs said there is nothing to do on that fs and quit without
> doing anything.
> 
> After some fumbling around I used lvextend -r -L nnnnn /dev/wd0/wd0,
> where nnnnn is the number of unused extents listed by pvdisplay.
> 
> That (eventually) worked but each time I ran that command, only
> roughly half of the empty extents were added instead of the whole
> nnnnn of them.  Took me about 10 iterations before all of the
> extents were finally added to the filesystem :-/
> 
> So, did I use the wrong tools or in the wrong order, or what?
> It should have been easier than that, I think.
> 

Did you multiply the number of extents reported by pvdisplay with the
extent size? lvextend's -L uses megabytes, if no unit is given. To
specify extents, you should use "-l". You should also prefix the number
with a "+" so that the number is relative to the current size, not the
absolute size of the logical volume.

Regards,
Florian Philipp

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to