Two pieces of this plate are now mounted on a piece
[Email protected] data]# DF-HT
Filesystem Type Size used Avail use% mounted on
/DEV/VDA1 ext4 40G 5.8G 32G 16%/
Tmpfs tmpfs 16G 16K 16G 1%/DEV/SHM
Requirements: Format VDB new Hard disk, the VDA disk in the original/data/directory to remove the file, the VDB disk partition and mount to the/data directory, and the original VDA disk/data/file moved to the VDB of the/data hard drive mount Directory
Error action method:
mv/data/*/opt
mount/dev/vdb1/data/
mv/opt/*/data/
This approach will cause the data to be moved back to the/vda hard drive when the current drive is removed and moved back, in which case the principle please check the relevant disk data yourself
At this time umount/dev/vdb1
Will report Umount.nfs:/data:device is busy
Workaround:
[Email protected] data]# Lsof | grep data
Bash 8571 root cwd DIR 252,17 4096 2/data
Lsof 8657 root cwd DIR 252,17 4096 2/data
grep 8658 root cwd DIR 252,17 4096 2/data
Lsof 8659 root cwd DIR 252,17 4096 2/data
Kill-9 8571
Note: Because the process is in use at that time, if the kill process is executed directly, you must add 9 to force the kill.
Correct method of operation
Turn off services that depend on the/data/disk
Mkdir/data_1
Mount/dev/vdb1/data_1
mv/data/*/data_1
MOUNT/DEV/VDB/1/data
Umount/data_1
Rm-rf/data_1
Move file Mount Disk