Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LVM2 lvextend doesn't give more space to use
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jyaan
Tux's lil' helper
Tux's lil' helper


Joined: 24 Feb 2008
Posts: 79
Location: USA

PostPosted: Mon Jan 26, 2009 6:09 pm    Post subject: LVM2 lvextend doesn't give more space to use Reply with quote

Is there something I'm doing wrong? I used the command
Code:
lvextend -L+10G /dev/vg/home
and it says the partition was extended successfully. Problem is, I don't actually get any extra space to use. I've resized my /home partition to 40G, but I only have about 5G accessible! lvdisplay reports the size I should have, but df reports otherwise.
Code:
gentoo jyaan # lvdisplay /dev/vg/home
  --- Logical volume ---
  LV Name                /dev/vg/home
  VG Name                vg
  LV UUID                CLdc8K-Imyj-S8fs-ctpA-G2mw-UAdH-Py3hU5
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                41.00 GB
  Current LE             10496
  Segments               3
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
   
Back to top
View user's profile Send private message
scherz0
Apprentice
Apprentice


Joined: 02 Oct 2008
Posts: 154

PostPosted: Mon Jan 26, 2009 6:20 pm    Post subject: Reply with quote

After extending the LV, you need to extend the FS also, since this is not automatic.

The command to use depends on the fs type. For example, see resize_reiserfs to extend a (mounted) reiser fs.
Back to top
View user's profile Send private message
jyaan
Tux's lil' helper
Tux's lil' helper


Joined: 24 Feb 2008
Posts: 79
Location: USA

PostPosted: Mon Jan 26, 2009 6:23 pm    Post subject: Reply with quote

Oh, I'm using ext3. So the command is resize2fs? Can this be done on a live fs, or do I need to unmount?
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Mon Jan 26, 2009 6:33 pm    Post subject: Reply with quote

Quote:
So the command is resize2fs?


Yes.

Quote:
Can this be done on a live fs


Yes
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
jyaan
Tux's lil' helper
Tux's lil' helper


Joined: 24 Feb 2008
Posts: 79
Location: USA

PostPosted: Mon Jan 26, 2009 8:38 pm    Post subject: Reply with quote

Thank you very much! It's working perfectly now. :)

Closed.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3137

PostPosted: Fri Mar 14, 2014 11:42 am    Post subject: Reply with quote

I will have to resize root partition with ext3 on lvm on device mapper, and... well, is it actually safe?
I have 2 options, I can either "just do it" or diassemble raid, do whatever is nessesery on the other drive, reboot to the new system and rebuild raid. In first case downside is if anything goes wrong I have to reinstall, in second case no matter what happens I have to rebuild raid.

So, question is: what can go wrong while I'm *extending* *mounted* *root* *ext3* filesystem on *lvm*?
Creating filesystem takes only a few seconds, will resize also be this fast?
If resize is interrupted due to any reasons, does it mean data lose and broken system?
Is it possible for resize2fs to simply screw up filesystem for no particular reason? (e.g. without hardware/power failure)
Back to top
View user's profile Send private message
drescherjm
Advocate
Advocate


Joined: 05 Jun 2004
Posts: 2790
Location: Pittsburgh, PA, USA

PostPosted: Fri Mar 14, 2014 12:49 pm    Post subject: Reply with quote

You can just resize the root. It is safe to expand a live ext2/3/4. And yes it will be fast.
_________________
John

My gentoo overlay
Instructons for overlay
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3137

PostPosted: Fri Mar 14, 2014 12:59 pm    Post subject: Reply with quote

Thanks, it seems it did go smoothly indeed
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum