LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-16-2012, 03:43 PM   #1
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS 6, CentOS 7
Posts: 299

Rep: Reputation: Disabled
LVM manager - graphical


Anyone know of a graphical LVM manager that allows resizing and moving of mounted LVM volumes?

I understood it was a good idea to create an LVM Volume Group with a seperate Volume for each Linux part; /boot, /root, /tmp etc. I understood that putting everything under a Volume Group was good practice and would make for ease of future maintainence, I am beginning to think that might actually not be the case.

Unfortunately I have not allowed enough space for my /usr partition which is now nearly full. I would like to expand it, but first need to contract the size of the adjacent partitions. I have found system-config-lvm but as far as I can see that only allows adding and removing partitions not resizing them.

Thanks,
Nick
 
Old 03-17-2012, 12:09 AM   #2
tommylovell
Member
 
Registered: Nov 2005
Distribution: Raspbian, Debian, Ubuntu
Posts: 380

Rep: Reputation: 103Reputation: 103
Quote:
Anyone know of a graphical LVM manager that allows resizing and moving of mounted LVM volumes?
I don't know of one I like, but since no one has responded yet, I can give some command line guidance. LVM is actually pretty simple and much more flexible than partitions.

Quote:
I understood it was a good idea to create an LVM Volume Group with a seperate Volume for each Linux part; /boot, /root, /tmp etc.
In general that is true, but there is also something to be said for simplicity...

Quote:
I would like to expand it, but first need to contract the size of the adjacent partitions.
Are you talking about the real partitions adjacent to the partition that is your LVM Physical Volume? That's not LVM resizing.

But if you are talking about the other LVM Logical Volumes in the Volume Group, that is LVM and actually the Logical Volumes are not partitions and don't necessarily need to be contracted.

Do you have any free space in the Volume group? Open a command window and issue a 'vgs' command.
How is your /usr filesystem formatted? (A "mount | grep '/usr '" will tell you if you don't remember.)

(Note: all of these commands need root authority, so you either need to 'su -l root' first, or preceed each command with 'sudo'.)

Quote:
I have found system-config-lvm but as far as I can see that only allows adding and removing partitions not resizing them.
You'd be better off using the command line.

You don't say in your profile or your post what distro you are on, but if you have Red Hat/Centos/Fedora it's relatively straightforward.

Assuming one of those distros; assuming that you want to expand /usr by 512MB; assuming there is that much free space in the VG; and assuming for this example that the VG is named VolGroup00, and the Logical Volume is named usrLV. Just do this from the command line.
Code:
lvresize -L+512M /dev/mapper/VolGroup00-usrLV
resize2fs /dev/mapper/VolGroup00-usrLV
If you don't have the space in the VG, it's a little more complicated, but not impossible. You need to bring the system up in rescue mode; 'resize2fs' one or more other filesystems down in size; 'lvresize' it or them down in size; then do the above procedure. Sounds complicated but much easier than doing real partitions.
 
Old 03-17-2012, 06:27 AM   #3
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS 6, CentOS 7
Posts: 299

Original Poster
Rep: Reputation: Disabled
Hi Tommy, thanks for your reply.

Quote:
Originally Posted by tommylovell View Post
Are you talking about the real partitions adjacent to the partition that is your LVM Physical Volume? That's not LVM resizing.
No just the volumes within the LVM physical volume, there should be easily enough space within the whole LVM volume group to juggle the sizes of the individual LVM volumes.


Quote:
Do you have any free space in the Volume group? Open a command window and issue a 'vgs' command.
Yes a small amount of space but really need to contract those volumes which are oversized to free up more space.

Quote:
How is your /usr filesystem formatted? (A "mount | grep '/usr '" will tell you if you don't remember.)
ext4


Quote:
You don't say in your profile or your post what distro you are on, but if you have Red Hat/Centos/Fedora it's relatively straightforward.
No thats because over the past couple of months I have tried installing everything from Arch to Ubuntu. This is on Debian.

Quote:
If you don't have the space in the VG, it's a little more complicated, but not impossible. You need to bring the system up in rescue mode; 'resize2fs' one or more other filesystems down in size; 'lvresize' it or them down in size; then do the above procedure. Sounds complicated but much easier than doing real partitions.
Rescue mode - that was the bit I didn't know I needed to do. Thanks for the info, will try doing it as you suggest.
 
Old 03-18-2012, 07:49 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You may find these links useful http://tldp.org/HOWTO/LVM-HOWTO/ http://sunoano.name/ws/public_xhtml/lvm.html at some point.
 
Old 03-20-2012, 07:38 AM   #5
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS 6, CentOS 7
Posts: 299

Original Poster
Rep: Reputation: Disabled
Thanks tommy and chris, logical volumes all resized now.

Cheers,
Nick
 
Old 03-20-2012, 07:53 AM   #6
tommylovell
Member
 
Registered: Nov 2005
Distribution: Raspbian, Debian, Ubuntu
Posts: 380

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by Nick_C View Post
...logical volumes all resized now.
Good to hear that. Don't give up on LVM. Once you get used to it, it does make life easier.

Now if we could only get the ext2/3/4 filesystem maintainers to change resize2fs so that it could downsize a mounted filesystem... (not that I'm complaining, as I neither have the time nor expertise to do something like that...)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ubuntu graphical lvm unix1adm Linux - Newbie 13 08-06-2009 07:22 PM
LXer: Managing LVM with the LVM Manager LXer Syndicated Linux News 0 03-16-2008 11:10 AM
graphical kernel manager Wp2 Linux - Newbie 7 07-05-2006 01:40 PM
Graphical Download Manager johngrinham Linux - Software 3 07-11-2004 12:52 AM
Graphical File Manager Huddlebum Linux - Software 4 01-13-2004 03:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration