I'm on Arch Linux and this is the overview of the current disk layout:
❯ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 476,9G 0 disk
├─nvme0n1p1 259:1 0 1G 0 part /boot
├─nvme0n1p2 259:2 0 300G 0 part /
└─nvme0n1p3 259:3 0 175,9G 0 part /home
❯ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p2 295G 82G 198G 30% /
/dev/nvme0n1p3 173G 87G 77G 53% /home
/dev/nvme0n1p1 1022M 84M 939M 9% /boot
Since I found out that I may have allocated too much space to the root
partition and too little to the home
partition, I would like to know if it is possible to transfer some available space from one to the other. I have thought of the following steps:
- Backup the whole system
- Boot from live arch usb
- Resize the root partition (this will give me some unallocated space)
- Delete the current /home partition
- Create and format a new home partition on
nvme0n1/nvme0n1p3
- Transfer the old /home files to the newly created part
Supposing these steps so far are sound, there are some more steps to be followed of course. What do I have to do exactly to restore the old system without making much of a mess? I'd like to avoid reinstalling from 0 and preserve installed programs, docker images, etc.
Also, while I'm at it, I'd like to ask:
- Which are some good root - home size considering I use docker a lot and potentially will install a decent number of programs in the future (right now I've used ~82G)?
- Do you have any suggestions for an exclude_files list for
rsync
when cloning the /home partition (like caches, node_modules, site_packages, etc.)?
rsync
when cloning the /home partition (like caches, node_modules, site_packages, etc.)?"quota
orreservation
properties for them - either of which can be changed at any time with one simple command - no need to move files around or re-partition any drives).