In general, we migrate the home directory to other partitions in the Linux environment, nothing more than the size of the space, after the migration can do the expansion effect, so here do a migration process. This is illustrated by the method of adding a new hard disk partition and migrating the home directory to the new partition.
The first step, because the virtual machine used, so first add a hard disk it
Step Two
Fdisk/dev/sdb
then choose N (Create a new partition)
First Sector the general return with the default is good, meaning represents the starting point of the sector code. Then pop command (M for help): interface, select w, meaning write exit, after partprobe The following synchronization partition table.
MKFS.XFS/DEV/SDB1 will be /DEV/SDB1 partition is formatted as XFS File System
Step Three
to create a temporary /Home Catalogue
Mount /dev/sdb1 to temp directory
Enter Init 1 to switch to Maintenance mode (make sure no one is connected to the system in production, if there are still visitors, need to clear), copy home directory files to /mnt/home and go to Mount profile directory /etc/fstab
Enter the VIM editor so input
Finally can be edited into this, the previous home line to delete, save exit, input Mount-a
Enter DF and ls-l instructions to view,/home has been migrated successfully
Original/home Do not delete, after the system stabilized for some time before processing. If the original directory is simply lifted and mounted to the new directory, the files in the original directory will be hidden.
Migrate/home directory to other partitions in Linux environment