Skip to contentSkip to conversation

lvextend doesn't extend the first time ...

linux-lvm Kevin Buyting 2 participants 2 messages Nov 3, 2003 – Nov 4, 2003

lore
Share & tools
lore
#0 lore raw

gentoo 1.4
vanilla-sources 2.4.22
lvm-user 1.0.7-r1

I am trying to extend my /dev/vg/lv01 (EXT3) by 3Gig's so i did a

# lvextend -L +3G /dev/vg/lv01

then

# e2fsadm -L +3G /dev/vg/lv01 

*making chkfs reporting errors ... fixing them* ... and nothing happens ... then i did

# sync
# mount /dev/vg/lv01 /mnt/somewhere
# df 

says it's still 80G NOT 83G! so i try again *fearing the worst*

# e2fsadm -L +3G /dev/vg/lv01

*making chkfs ... resizing*
again and get 6G more to my /dev/vg/lv01 files are ok... *the best that could happen* 8))

the question is:
how come it isn't extendet by 3G instead of 6G ? what am i doing wrong?
just to know for the next time ...

thanks in advance for any advice

#1 lore raw
Quoted 27 lines · Kevin Buyting

gentoo 1.4
vanilla-sources 2.4.22
lvm-user 1.0.7-r1

I am trying to extend my /dev/vg/lv01 (EXT3) by 3Gig's so i did a

# lvextend -L +3G /dev/vg/lv01

then

# e2fsadm -L +3G /dev/vg/lv01 

*making chkfs reporting errors ... fixing them* ... and nothing happens ... then i did

# sync
# mount /dev/vg/lv01 /mnt/somewhere
# df 

says it's still 80G NOT 83G! so i try again *fearing the worst*

# e2fsadm -L +3G /dev/vg/lv01

*making chkfs ... resizing*
again and get 6G more to my /dev/vg/lv01 files are ok... *the best that could happen* 8))

Quoted 7 lines

the question is:
how come it isn't extendet by 3G instead of 6G ? what am i doing wrong?
just to know for the next time ...

thanks in advance for any advice

You've misunderstood the commands. e2fsadm does the lvextend AND the resize2fs. If you want to add 3Gig to your filesystem you should do EITHER:

e2fsadm -L+3G /dev/vg/lv01

OR

lvextend -L+3G /dev/vg/lv01
resize2fs /dev/vg0lv01

Signature · 1 line
patrick