LinuxQuestions.org
Visit Jeremy's Blog.
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 08-27-2015, 03:08 PM   #1
pinaki
LQ Newbie
 
Registered: Jun 2015
Location: India
Distribution: Fedora 22
Posts: 7

Rep: Reputation: Disabled
Re-sizing mount points in Fedora


Hello all,

I have root and home mount points residing under a LVM.

/ = 32G (including /home)
/home = 10G (fixed)

As root does not use as much space I would like to expand /home.

Is there any way to safely do that?
 
Old 08-27-2015, 04:10 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Boot any LiveCD that has gParted on it and have at it.
 
Old 08-27-2015, 05:22 PM   #3
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by Habitual View Post
Boot any LiveCD that has gParted on it and have at it.
system-config-lvm from a LiveCD would be the right tool if he uses LVM. But I'm not completely sure that he meant it with "residing under a LVM".
 
Old 08-28-2015, 03:39 PM   #4
pinaki
LQ Newbie
 
Registered: Jun 2015
Location: India
Distribution: Fedora 22
Posts: 7

Original Poster
Rep: Reputation: Disabled
@Habitual, hortageno, thanks for the reply.
Here's my fsck -l

I want to reduce Disk /dev/mapper/fedora-root and make more space for /dev/mapper/fedora-home.
Does your solutions fit.

Quote:
Disk /dev/sda: 74.5 GiB, 80026361856 bytes, 156301488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000bd1ea

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1026047 1024000 500M 83 Linux
/dev/sda2 1026048 66598911 65572864 31.3G 8e Linux LVM
/dev/sda3 66600960 105663459 39062500 18.6G 83 Linux
/dev/sda4 105664512 156301230 50636719 24.1G 83 Linux




Disk /dev/mapper/fedora-swap: 2 GiB, 2113929216 bytes, 4128768 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/fedora-root: 19.5 GiB, 20971520000 bytes, 40960000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/fedora-home: 9.8 GiB, 10485760000 bytes, 20480000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
 
Old 08-28-2015, 03:50 PM   #5
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by pinaki View Post
@Habitual, hortageno, thanks for the reply.
Here's my fsck -l

I want to reduce Disk /dev/mapper/fedora-root and make more space for /dev/mapper/fedora-home.
Does your solutions fit.
Yes, you should use system-config-lvm from a LiveCD if you want to use a gui. Otherwise you would need to resize the filesystem on /, reduce the root LV, extend the home LV and grow the filesystem on /home. system-config-lvm does all these steps for you. But you should have a backup as always with such operations. Better safe than sorry.
 
Old 08-28-2015, 09:24 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,333

Rep: Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176Reputation: 4176
system-config-lvm hasn't been developed for ages, and was dropped by Redhat/Fedora some time back. Certainly won't be on F22 if that is what the OP is using. If you are using XFS you cannot reduce it using any tool. Any sane filesystem can be managed using the LVM tools which will also shrink/enlarge the filesystem as well as the lv. "man lvm" will list all the tools available, lvresize is what you want. Note the comment re resizing the filesystem.

gparted should be able to do it all for you as mentioned (except shrink XFS), but I don't recall ever having used it on LVM lvs.

Note my sigline.
 
Old 08-30-2015, 12:44 PM   #7
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by syg00 View Post
system-config-lvm hasn't been developed for ages, and was dropped by Redhat/Fedora some time back. Certainly won't be on F22 if that is what the OP is using.
I didn't know that. It's still in the Ubuntu repositories. So guess the OP has to use the good old terminal and resize2fs, lvreduce and lvextend.

Quote:
Originally Posted by syg00 View Post
If you are using XFS you cannot reduce it using any tool. Any sane filesystem can be managed using the LVM tools which will also shrink/enlarge the filesystem as well as the lv. "man lvm" will list all the tools available, lvresize is what you want. Note the comment re resizing the filesystem.
I think it's safe to assume that the OP doesn't use XFS.

Quote:
Originally Posted by syg00 View Post
gparted should be able to do it all for you as mentioned (except shrink XFS), but I don't recall ever having used it on LVM lvs.
Gparted will NOT resize logical volumes!!! It only can resize partitions and the filesystems on it.

So the basic steps are

1. shrink the filesystem on "root" with resize2fs
2. shrink the logical volume "root" with lvreduce
3. extend the logical volume "home" with lvextend
4. grow the filesystem on "home" with resize2fs

Be careful with steps 1 and 2. If you make the lv smaller than the filesystem, you might lose data. To be safe, make the filesystem 1GB smaller than you need and grow it after you shrunk the lv to fill the remaining space.

HTH

Edit: If your version of lvreduce/lvextend supports the "-r" option, then it will do the filesystem resizing for you and steps 1 and 4 are not necessary.

Last edited by hortageno; 08-30-2015 at 04:25 PM.
 
  


Reply

Tags
mount point, partitions, resize


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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] enabling KDE to auto-mount devices set to BSD-type mount points in fstab? dchmelik Linux - Software 10 07-18-2015 05:50 AM
[SOLVED] enabling KDE to auto-mount devices set to BSD-type mount points in fstab? dchmelik Calculate 1 07-12-2013 02:47 AM
[SOLVED] NFS mount points don't mount during boot Quakeboy02 Debian 11 06-16-2013 08:11 AM
[SOLVED] Fedora Core 17 - Partitioning sizing to test other linux as well worzel1968 Fedora 10 07-14-2012 06:23 AM
SCRIPT: check if auto-mount mount-points are still mounted markus1982 Linux - Software 0 05-25-2003 06:48 AM

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

All times are GMT -5. The time now is 01:00 AM.

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