The device file name for the new disk is/dev/vdb size 100GB.
#fdisk-L View the new disk
1. Partition the new disk
#fdisk/dev/vdb
Prompt operation P print n new d Delete W operation effective Q exit
After Operation W
#partprobe forcing the kernel to re-locate the partition table (update partition table)
Here we add a partition/dev/vdb1 size of 40GB
2, partition format
#mkfs-T EXT4/DEV/VDB1 format to EXT4 format
3. Temporarily mount the new drive in a directory
#cd/mnt/
#mkdir Home
#mount/dev/vdb1/mnt/home Mount to/mnt/home
#df-H View
#cp-a/home/*/mnt/home/copy the things under the home to the mounted directory, backup
#rm-rf/home/* to erase everything under the home.
#umount/DEV/VDB1 unmount the hard drive
#df-H View
4. Set the boot mount
#vi/etc/fstab
Add a line at the end
/dev/vdb1/home EXT4 Defaults 1 2
Save exit
#df-H to see if/home is mounted
#mount-A to mount a/etc/fstab in a non-mounted partition
#df-H View
Filesystem Size used Avail use% mounted on
Label=cec-rootfs 16G 1.9G 13G 13%/
Tmpfs 1.9G 0 1.9G 0%/dev/shm
/DEV/VDA1 194M 28M 157M 15%/boot
/DEV/VDB1 40G 176M 38G 1%/Home
Successful Mount found
mount a new disk to a specified directory or partition in Linux