I have a 128GB SSD with root and home on one big extended partition. I want to separate /home from the root-partition. And I want to upgrade from 16.04 to 18.04. There are a lot of results where they explain how to move the /home folder.
But I thought wouldn't it be easier the other way around? /home contains the most data, if it is more then 50% of my SSD, then I cannot even move it directly. But the rest of my root partition is only 11 GB, so I have come up with the following solution:
- Shrink the root partition with only 20 to 25 GB (which I already did with help from this site).
- Remove everything except /home from the old partition with this
script:
cd /
shopt -s extglob
rm -rf !(home)
- Move content of /home to / ("
mv /home /
") - Install 18.04 on the new partition
Is this a good strategy, or am I missing things?
EDIT:
For jdwolf: I don't know what a dynamic partition is, but maybe this info can help: this is the result of lsblk:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 117,4G 0 disk
├─sda1 8:1 0 487M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 116,9G 0 part
├─ubuntu--vg-root 252:0 0 90,2G 0 lvm /
└─ubuntu--vg-swap_1 252:1 0 3,7G 0 lvm [SWAP]
~./config/users-dirs.dirs
on how you can set another location.