Not planning at first, causing the/home space shortage, plus the partition table is not GPT, resulting in the inability to expand more than 2T, so it is necessary to re-partition a larger hard disk to/home.
1. Partition and format the newly mounted 4T hard drive
2. Create a Directory
sudo mkdir/media/home
3. Mount the/DEV/SDB1 to the/media/home
sudo mount/dev/sdb1/media/home
4. Synchronize/home to/media/home, the synchronization time depends on the size of the data, it is recommended to operate when the system is idle
sudo rsync-axs/home/. /media/home/.
5. Rename/home after synchronization is complete
sudo mv/home/home_old
6. New/Home
sudo mkdir/home
7. Cancel/DEV/SDB1 Mount
sudo umount/dev/sdb1
8. Re-mount/DEV/SDB1 to Home
sudo mount/dev/sdb1/home
9. View/DEV/SDB1 's UUID
Blkid
10. Copy the UUID and modify the/etc/fstab file to automatically mount the boot.
sudo gedit/etc/fstab
At the end of the file, add the following:
# home 4T
Uuid=8da46012-ab9c-434f-a855-2484112fd1a7/home ext4 Nodev,nosuid 0 2
11. Restart the system after saving to view the partition mount status
Df–h
12. Delete/home_old after confirming everything is OK
sudo rm-rf/home_old
At this point, the work to add space to/home is complete.
The Linux system re-mounts the/home to another hard disk or partition