PDA

View Full Version : Resizing /



dquake
4th October 2017, 05:56 PM
Is there a way to resize the root folder? i would like to do some tests on a spare partitions but I don't know how to resize a lvm partition and I'm looking for guidance.

thanks!


NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 119.2G 0 disk
├─sda1 8:1 0 1G 0 part /boot
├─sda2 8:2 0 107.6G 0 part
│ ├─fedora-root 253:0 0 50G 0 lvm /
│ ├─fedora-swap 253:1 0 7.6G 0 lvm [SWAP]
│ └─fedora-home 253:2 0 50G 0 lvm /home
└─sda3 8:3 0 10.6G 0 part

smr54
4th October 2017, 10:06 PM
I have a page on lvm with links to better pages.

http://srobb.net/lvm.html

dquake
7th October 2017, 01:31 PM
thanks smr54 will take a look

nobody
9th October 2017, 04:21 AM
I have a page on lvm with links to better pages.

http://srobb.net/lvm.html

I am really wondering, smr54, why we should use LVM as logical fs? I do it automatically (using default Fedora installation), but for the single hard drive LVM does not make any sense, any sense at all... :doh:

The next and following Fedora installations I'll do as classic approach, thus using ext4. Nobody needs this crap (even me :D), since to resize once formatted LVM is, after all, pain in the a@@.

_nobody_

smr54
9th October 2017, 12:45 PM
Well, LVM often makes sense in production environments, with LUNS and such. For what seems to me the typical Fedora installation, often a single user laptop or desktop, I don't like it as a default and always change it to standard. (Standard can often be easily manipulated with gparted and the like).

My guess is that it's a case of Fedora being more or less a testing ground for RHEL, which does have many uses where LVM is useful, so they leave it at the RHEL default. It is easy enough to change at install.

nobody
10th October 2017, 04:22 AM
Quake,

Here for you: https://forums.fedoraforum.org/showthread.php?p=1784174#post1784174

Good Luck, you'll need it! :p

smr54,

What you have said/wrote in your last post, should be A MUST pop-up window as warning when installing Fedora, since everybody thinks (me ignorant at the time, included in the sheep flock) that LVM is something better, super-duper FS, helping to the cause.

LUN means meta storage, where LVM gives impression that behind is one hard drive, but instead could be hundreds physical (one logical as proxy), and LVM is good (as it is) for that purpose. Everything else is as I said... Do not want to repeat myself! :D

_nobody_

amiga
10th October 2017, 06:00 AM
I am really wondering, smr54, why we should use LVM as logical fs? I do it automatically (using default Fedora installation), but for the single hard drive LVM does not make any sense, any sense at all...

The next and following Fedora installations I'll do as classic approach, thus using ext4. Nobody needs this crap (even me ), since to resize once formatted LVM is, after all, pain in the a@@.

First of all LVM is not a fs, a file system. It is a type of partitioning. The logical volumes inside still have to have a file system such as ext4 or xfs. Therefore none of your comments make sense.

With your very poor understanding you have it backwards. Re-sizing logical partitions is much easier than re-sizing physical partitions as you don't have to worry about fragmentation. With physical partitions you need space in front, so you need to move partitions around, a dangerous and time-consuming exercise. With logical volumes location is irrelevant. You can shrink any volume and he space can be added to any other volume.

To the OP you need to do this from a live distribution with the file system unmounted. You need to shrink the file system first with the commands for your file system. You haven't specified is you are using ext4, xfs, or something else. You should use lsblk -f next time. Once the underlying file system is reduced use lvreduce to reduce the logical volume.

nobody
10th October 2017, 08:05 AM
Actually, amiga, you remain me of the US politicians. You know everything, you advise, you say to others that they are with poor knowledge, but when it comes to work, you are nowhere. :C

You truly remain me of Donald Trump! :doh:

I already posted the solution (true one). I solved it for me, and few other people here. And I do not care what others think about me, since I am capable. ;)

_nobody_

lsatenstein
10th October 2017, 02:50 PM
My solution is multifold. For a spinning drive, I use xfs and ext4 /boot and /home as ext4 and / as xfs.
For my SSD
I am going to use /boot as ext4 / as btrfs and if I can /home as btrfs. If I have problems with /home being on btrfs, I will convert /home to xfs.

As for swap, I tend to pre-allocate it oversized to 10gig even though my 8gig system only requires about 7.5 gig for swap. Swap is on the boot drive. I have really rarely noted any swap use, unless I do a suspend

From all the pundats on the web, the consensus is that btrfs with "COW" is better for SSDs than any alternative.

amiga
10th October 2017, 09:07 PM
you remain me of the US politicians.

Don't you mean I remind you of something. It would help if you knew English.


I already posted the solution (true one).

The "solution" you posted was for the wrong problem. In that thread someone wanted to extend their whole lvm physical volume across an unused partition which directly followed it.

In this thread the OP wanted to reduce the 50 GB fedora-root logical volume mounted at / in order to create space for spare partitions. As 50 GB is huge for / they could free up 30-35 GB for new spare logical volumes.

As the problems are different the "solution" you are referring to is irrelevant to this thread.

Didn't smr54 post the links to lvm pages ? They were thanked by the OP dquake.

nobody
11th October 2017, 05:09 AM
Didn't smr54 post the links to lvm pages ? They were thanked by the OP dquake.

Excellent English from you, isn't it? Last sentence I did not understand at all. :doh:

Yup, I do not use too much English these days, trying to learn German. As I am trying to learn many domains (Coreboot, U-Boot, YOCTO)... And these I am trying (at least, but not the last) to learn and perfect for years. Since everything is moving. :D

You here expressed only one very good knowledge. About HDDs, and attempts to understand GFX. I admire this... Yes, I do.

But, please, if you do NOT understand other people, I'll politely ask you NOT to comment their attempts and actions. Please! :confused:

I solved many problems, not knowing in-depth really the theory. But this is how now the whole Open Source works these days. Well! You could not have 100 people for 100 narrow domains.

_nobody_