Skip to contentSkip to conversation

resizing logical volumes

linux-lvm Ben Snyder 2 participants 2 messages Jul 10, 2002

lore
Share & tools
lore

Ben Snyder

author
#0 lore raw

OK, I asked a question here the other day that ended up being a filesystems question, sorry, but thanks for removing my head from my arse on that one (I knew that, really I did).

While I was asking that question, I also asked about adding existing partitions on other devices to a logical volume/volume group.

The reply I got was this:

pvcreate /dev/device
vgextend VolGroupName /dev/device
lvextend --size +60G LogicalVolumePath

This all seemed to work just fine, in fact when I do a lvdisplay and vgdisplay, it says 120G (which is what I expected it to be). However, when I try to perform the e2fsadm, I get the following (and I'm not an idiot, I'm using/seeing the actual paths here):

e2fsadm --size +20G LogicalVolumePath
e2fsadm -- new size too large for "LogicalVolumePath" e2fsadm -- size of "LogicalVolumePath" would be invalid

I thought to myself, 'Maybe I did this already.' I was, afterall, just starting me 1st cup of coffee. Whenever I mount the filesystem and do a df -h, it still reports 59G, which is what I started at.

While this might still be a FS issue, I still can find nowhere else to turn for assistance.

Thanks in advance...

#1 lore raw
Quoted 23 lines · Ben Snyder

OK, I asked a question here the other day that ended up being a filesystems question, sorry, but thanks for removing my head from my arse on that one (I knew that, really I did).

While I was asking that question, I also asked about adding existing partitions on other devices to a logical volume/volume group.

The reply I got was this:

pvcreate /dev/device
vgextend VolGroupName /dev/device
lvextend --size +60G LogicalVolumePath

This all seemed to work just fine, in fact when I do a lvdisplay and vgdisplay, it says 120G (which is what I expected it to be). However, when I try to perform the e2fsadm, I get the following (and I'm not an idiot, I'm using/seeing the actual paths here):

e2fsadm --size +20G LogicalVolumePath
e2fsadm -- new size too large for "LogicalVolumePath" e2fsadm -- size of "LogicalVolumePath" would be invalid

Quoted 6 lines

I thought to myself, 'Maybe I did this already.' I was, afterall, just starting me 1st cup of coffee. Whenever I mount the filesystem and do a df -h, it still reports 59G, which is what I started at.

While this might still be a FS issue, I still can find nowhere else to turn for assistance.

e2fsadm does the logical volume resize as well as the filesystem stuff - so effectively it is trying to do the same thing twice.

What you need to do now is simply the second part of what e2fsadm does and that is the resize2fs

patrick