💾 Archived View for kelgors.me › wiki › move-system-folder.gmi captured on 2023-01-29 at 02:41:21. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2023-12-28)

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

Move system directory to other drive

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

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