Managing Physical Volumes, Volume Groups and Logical Volume

I have two physical volumes and I want to remove one - freeing up the disk space for enlarging my home partition.

--- Physical volume ---
PV Name               /dev/nvme0n1p9
VG Name               fedora_localhost-live00
PV Size               <124.87 GiB / not usable 2.00 MiB
Allocatable           yes (but full)
PE Size               4.00 MiB
Total PE              31965
Free PE               0
Allocated PE          31965
PV UUID               LSV3jE-sIAM-lWLr-iL9W-JolR-62o6-cmQm46

--- Physical volume ---
PV Name               /dev/nvme0n1p7
VG Name               fedora_localhost-live
PV Size               <99.60 GiB / not usable 3.00 MiB
Allocatable           yes (but full)
PE Size               4.00 MiB
Total PE              25496
Free PE               0
Allocated PE          25496
PV UUID               SlkUos-ROOb-A8r2-nBk8-ytc5-NNMz-zGBrnh

The one I don’t need is fedora_localhost-live00

What are the steps to do this?

Thanks

1 Like

Post the output:

sudo vgs; sudo pvs; sudo lvs
VG                      #PV #LV #SN Attr   VSize   VFree
fedora_localhost-live     1   3   0 wz--n-  99.59g    0 
fedora_localhost-live00   1   3   0 wz--n- 124.86g    0 

PV             VG                      Fmt  Attr PSize   PFree
/dev/nvme0n1p7 fedora_localhost-live   lvm2 a--   99.59g    0 
/dev/nvme0n1p9 fedora_localhost-live00 lvm2 a--  124.86g    0 

LV   VG                      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
home fedora_localhost-live   -wi-ao---- <30.73g                                                    
root fedora_localhost-live   -wi-ao----  62.93g                                                    
swap fedora_localhost-live   -wi-ao----   5.93g                                                    
home fedora_localhost-live00 -wi-a----- <48.93g                                                    
root fedora_localhost-live00 -wi-a-----  70.00g                                                    
swap fedora_localhost-live00 -wi-a-----   5.93g

I dont need anything in fedora_localhost-live00. Have checked, checked again and triple checked.

1 Like
sudo umount /dev/fedora_localhost-live00/{home,root}
sudo swapoff /dev/fedora_localhost-live00/swap
sudo lvremove /dev/fedora_localhost-live00/*
sudo vgremove fedora_localhost-live00 
sudo pvremove /dev/nvme0n1p9
4 Likes

Just a note to others, when I did the above I had to recreate my grub.cfg as described here:

https://discussion.fedoraproject.org/t/fedora-failing-to-boot-dracut-initqueue-timeout/76916/6

I still had a reference to the old swap partition.

2 Likes

Your configuration is a prime example on how you will benefit from BTRFS file system (fedora 33). With two subvolumes / and /home they no longer live in two partitions but rather share the entire space available. Space is used more efficiently.

Another note regarding swap, I prefer using swapfiles instead of swap partitions, that’s much more flexible. (Doesn’t work if your LVM is encrypted and you want suspend-to-disk). In Fedora 33, SwapOnZRAM is coming by default…

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.