LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to merge root filesystem with a super-partition? [SOLVED] (https://www.linuxquestions.org/questions/linux-general-1/how-to-merge-root-filesystem-with-a-super-partition-%5Bsolved%5D-4175713065/)

kakis 06-06-2022 03:01 AM

How to merge root filesystem with a super-partition? [SOLVED]
 
I'm having issues where my root FS on my fedora machine only has 15 GB of disk space.
lsblk yields the following:

Code:

[uesr@fedora ~]$ lsblk
NAME                                    MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINTS
zram0                                    252:0    0    8G  0 disk  [SWAP]
nvme0n1                                  259:0    0 476.9G  0 disk
├─nvme0n1p1                              259:1    0  600M  0 part  /boot/efi
├─nvme0n1p2                              259:2    0    1G  0 part  /boot
└─nvme0n1p3                              259:3    0 475.4G  0 part
  └─luks-5af04d49-0592-4272-a1f4-91fa9e7d40b3
                                        253:0    0 475.3G  0 crypt
    └─fedora_fedora-root                253:1    0    15G  0 lvm  /

It seems like my luks encrypted partition is not the root partition but rather a sub-partition that is named fedora_fedora-root is. I believe I just followed the recommended partitioning when setting up fedora, but I am not sure.

Is there some way for me to merge the fedora_fedora-root into the luks-5af04d49-0592-4272-a1f4-91fa9e7d40b3 partition? Do I have to reinstall?

syg00 06-06-2022 03:27 AM

No need for anything so esoteric - this is exactly what LVM was designed to fix.
First up, edit that post and change the [quote] tags to [code]. Then let us see the following - in [code] tags.
Code:

pv
vgs
lvs


kakis 06-06-2022 03:46 AM

Quote:

Originally Posted by syg00 (Post 6359003)
No need for anything so esoteric - this is exactly what LVM was designed to fix.
First up, edit that post and change the quote tags to [code]. Then let us see the following - in [code] tags.
Code:

pv
vgs
lvs


Code:

[user@fedora ~]$ sudo vgs
  VG            #PV #LV #SN Attr  VSize    VFree
  fedora_fedora  1  1  0 wz--n- <475.34g <460.34g

Code:

[user@fedora ~]$ sudo lvs
  LV  VG            Attr      LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root fedora_fedora -wi-ao---- 15.00g

The
Code:

pv
command is not really doing anything for me, it just loads forever, not sure how to use it in the context you gave.

syg00 06-06-2022 04:39 AM

Sorry, my bad; should have been "pvs", not "pv" .... :doh:
The vg has all that space, which is what you want - pick a size for the root, and use something like this
Code:

sudo lvextend -r -L 30G /dev/fedora_fedora/root

kakis 06-06-2022 06:37 AM

Quote:

Originally Posted by syg00 (Post 6359014)
Sorry, my bad; should have been "pvs", not "pv" .... :doh:
The vg has all that space, which is what you want - pick a size for the root, and use something like this
Code:

sudo lvextend -r -L 30G /dev/fedora_fedora/root

Wonderful this seems to be the solution! Thank you! :)


All times are GMT -5. The time now is 10:27 PM.