Help with editing fstab to move /home

Hello,

I am trying to move my /home to another drive. I currently have two home folders with the same content and just need to edit the fstab file to complete the transition. I have looked at several explanations online about how to do this but they are all a bit different and I’ve become confused :sweat_smile:

There are three blk devices listed at the bottom of the fstab and I’d like my /home to be on the /mnt/nvme_btrfs device. All the devices mount fine and I’ve done a reboot after testing. I am a bit concerned about making a mistake and making a bigger problem if I make a bad edit to this file.

Thank you for any help you can give me. I am very new at fstab editing. :blush:

# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=EA66-EE67                            /efi           vfat    fmask=0137,dmask=0027 0 2
UUID=724cd874-a819-44c9-8b98-59c4ed4a18b3 /              btrfs   subvol=/@,noatime,compress=zstd 0 0
UUID=724cd874-a819-44c9-8b98-59c4ed4a18b3 /home          btrfs   subvol=/@home,noatime,compress=zstd 0 0
UUID=724cd874-a819-44c9-8b98-59c4ed4a18b3 /var/cache     btrfs   subvol=/@cache,noatime,compress=zstd 0 0
UUID=724cd874-a819-44c9-8b98-59c4ed4a18b3 /var/log       btrfs   subvol=/@log,noatime,compress=zstd 0 0
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

UUID="59fc9712-74d6-4dd1-8e81-ab178e1de852"     /mnt/nvme_btrfs btrfs   defaults        0       0
UUID="93f781bc-617d-4895-8194-ed14239e2ad5"     /mnt/toshiba_internal   btrfs   defaults        0       0
UUID="13e8b225-e336-431d-8f71-23e2e2982a76"     /mnt/toshiba_external   btrfs   defaults        0       0

just write /home in place of /mnt/nvme_btrfs and write an existing directory in place of /home.

or you can just change the home dir for the user
usermod -d /extra-home/username username

1 Like