To Move Home To Another Drive

less than 1 minute read

Description:

Follow these steps to move your /home directory to another drive.

To Resolve:

  1. Open terminal => type:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Change to root
su

# Change ownership of second drive to your user. If you don't know the path to the second drive type "blkid" to find your drive.
chown gerry -R /dev/sdb1

# Give yourself permissions to that drive
chmod 666 -Rv /dev/sdb1

# Create a temp mount point
mkdir /mnt/tmp

# Mount your drive to that mount point
mount /dev/sdb1 /mnt/tmp

# Copy your current /home dir to that point
rsync -avx /home/ /mnt/tmp

# Unmount the drive
umount /mnt/tmp

# Rename the old home
mv /home /home.old

# Copy your drive UUID to a text editor like Pluma
blkid

#Open the auto mount file. Feel free to use vim or whatever.
vi /etc/fstab

#Paste in:
UUID=bdab1550-7619-495c-abf3-19ea3f95af60    /home    ext4    defaults   0  2

# Save and exit the file, then reboot
reboot
  1. Your drive should be auto mounted!

Tags:

Updated:

Comments