This morning a netizen bought a bird cloud host product, because the system installed the default automatically mounted directory is the data directory, and this friend needs to install WDCP panel, in theory can also be in the background of the Panel designated directory, but he must follow the official directory www mount. So help him to deal with it can directly modify the Mount directory to resolve the existing directory replacement process.
First, the theoretical step method
In theory, there are a lot of ways to do this online, we just need to create a directory to be mounted, and then uninstall the existing mounted directory, and then go back to the new directory to mount the problem can be solved.
The code is as follows |
Copy Code |
Mkdir/www
|
2. Download the catalog that has been mounted
The code is as follows |
Copy Code |
Umount/data
|
3. Mount to new catalogue
The code is as follows |
Copy Code |
Mount/dev/sdb1/www
|
4, modify the configuration file
The code is as follows |
Copy Code |
Echo '/dev/sdb1/www ext3 defaults 0 0 ' >>/etc/fstab
|
In theory such an operation can complete the replacement directory. But the old left side in the operation of the time there are some problems, in the umount when there are "Umount:/data:device is busy." In some cases useful info about processes this use the device was found by lsof (8) or fuser (1), the error cannot be unloaded.
Second, solve the problem
Here because the program is occupied, we only need to check the ID and then delete it so that the procedure can be done.
The code is as follows |
Copy Code |
/data:947c
|
We can see that there really is a program occupied.
The code is as follows |
Copy Code |
[Root@niaoyun data]# ps-ef |grep 94c
Root 1435 947 0 22:47 pts/0 00:00:00 grep 94c
[Root@niaoyun data]# Ps-ef |grep 94
Root 944 2 0 22:30? 00:00:00 [flush-253:0]
Root 945 868 0 22:33? 00:00:00 sshd:root@pts/0
Root 947 945 0 22:34 pts/0 00:00:00-bash
Root 1468 947 0 22:48 pts/0 00:00:00 ps-ef
Root 1469 947 0 22:48 pts/0 00:00:00 grep 94
|
The code is as follows |
Copy Code |
Kill-9 945
|
Finally, we can continue the operation to complete the umount of the replacement catalog.