💾 Archived View for kelgors.me › wiki › move-system-folder.gmi captured on 2023-12-28 at 15:20:51. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

🚧 View Differences

-=-=-=-=-=-=-

Move system directory to other drive

2022-08-10

For this example, i'm moving /home directory to another drive:

# enter in rescue mode
systemctl isolate rescue.target
# Mount the other drive
mount -t ext4 -o sync /dev/sdb1 /mnt
# move all data from /home/ folder to the other drive
# and ensure that all data are written to the disk
mv /home/* /mnt/ && sync
# fetch the uuid of the other drive
lsblk -o UUID,LABEL,MOUNTPOINT,SIZE /dev/sdb1

then in /etc/fstab, add a line to auto mount the other drive as /home directory

# /etc/fstab
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx    /home      ext4   auto,nouser,defaults,nodev,relatime     0    0

then reboot and voilà!

Source

Last-Updated: 2022-08-10