How can I move / to a different partition on the same disk with lvm?

This might be the simplest way to illustrate what I would like to achieve.
I have this:
It has a 70G partition for / and I am getting lots of disk full errors (mostly /tmp)

nvme0n1                259:0    0   1.8T  0 disk 
├─nvme0n1p1            259:1    0   600M  0 part /boot/efi
├─nvme0n1p2            259:2    0     1G  0 part /boot
└─nvme0n1p3            259:3    0   1.8T  0 part 
  ├─rl_wintermute-root 253:0    0    70G  0 lvm  /
  ├─rl_wintermute-swap 253:1    0  15.6G  0 lvm  [SWAP]
  └─rl_wintermute-home 253:2    0   1.7T  0 lvm  /home

How do I achieve this:

nvme0n1                259:0    0   1.8T  0 disk 
├─nvme0n1p1            259:1    0   600M  0 part /boot/efi
├─nvme0n1p2            259:2    0     1G  0 part /boot
└─nvme0n1p3            259:3    0   1.8T  0 part 
  ├─rl_wintermute-swap 253:1    0  15.6G  0 lvm  [SWAP]
  └─rl_wintermute-home 253:2    0   1.7T  0 lvm  /home
                                                 /

With / and /home on the same partition, thereby putting the whole works
on one partition, and allowing me to use the entire disk for everything.

/tmp is not stored on disk (unless you changed the default configuration) but on a tmpfs which is stored in memory. If you are regularly running out of place in /tmp you are doing something wrong. You should probably look into storing your temporary files in your /home or /var/tmp (or configure whatever application is saving a lot of data to /tmp to store it elsewhere).

That might be quite hard without reinstalling unfortunately (depending on how much free space do you have in your /home currently). What filesystem do you use? If it’s ext4 which supports shrinking, then adding more space to your / will be trivial, but if you are using xfs, which doesn’t support shrinking, you might need to reinstall.

1 Like

But they are already in one partition. nvme01n1p3 is the partition and this is the PV for the volume group.
How much space is still available in the home LV ?
df -Th

Maybe you could shrink rl_wintermute-home by X amount of GB ( if the filesystem is ext4 ) and extend rl_wintermute-root. Easiest would be to remove swap or shrink swap and extend rl_wintermute-root.
LVM makes much more sense if you keep free extends available.. These extends can be assigned to a LV anytime when required.

Ugh… I am hopeless with filesystems, I think. Every time I think I understand something, I find out that something else is keeping me from understanding what I thought I knew.

$ df -Th
Filesystem                     Type      Size  Used Avail Use% Mounted on
devtmpfs                       devtmpfs  4.0M     0  4.0M   0% /dev
tmpfs                          tmpfs      32G   17M   32G   1% /dev/shm
tmpfs                          tmpfs      13G   21M   13G   1% /run
efivarfs                       efivarfs  128K   18K  106K  15% /sys/firmware/efi/efivars
/dev/mapper/rl_wintermute-root xfs        70G   68G  2.7G  97% /
/dev/mapper/rl_wintermute-home xfs       1.8T  1.3T  502G  72% /home
/dev/nvme0n1p2                 xfs       960M  650M  311M  68% /boot
/dev/nvme0n1p1                 vfat      599M  7.1M  592M   2% /boot/efi
/dev/sda1                      ext4      1.8T  1.5T  290G  84% /mnt/bakhdd
/dev/sdb1                      ext4      5.5T  3.1T  2.1T  60% /mnt/WinterStore
shalmaneser:/mnt/store/Lin_Win nfs4      3.7T  2.5T  1.2T  68% /home/sheldon/mnts/Lin_Win
shalmaneser:/mnt/store/Media   nfs4      3.7T  2.5T  1.2T  68% /home/sheldon/mnts/Movies
tmpfs                          tmpfs     6.3G   78M  6.2G   2% /run/user/1000

They are on the same PV (physical volume?) They are formatted with xfs. I am pretty much lost now. :slight_smile:

Sigh… They are all using xfs.

I didn’t change anything, that I know of, but I guess I must have. How can I change /tmp to be in my /home/tmp folder?

worse is the fact that 500GB are still free. Now imagine this LV with an initial size of 1.5TB leaving 300GB as a reserve of free extends waiting to be assigned to any LV in the VG with one command!

you can’t shrink xfs only via xfsdump and xfsrestore.