Last update at :2024-07-13,Edit by888u
This morning, a netizen purchased a certain Niao cloud host product. Because the directory automatically mounted by default after system installation is the data directory, this friend needs to install the WDCP panel. Theoretically, the directory can also be specified in the background of the panel, but He must mount it according to the official directory WWW. So after helping him deal with it, he can directly modify the mounting directory to solve the replacement process of the existing directory.
First, theoretical steps and methods
Theoretically, there are many such operation methods on the Internet. We only need to create a directory that needs to be mounted, then uninstall the already mounted directory, and then mount it again in the new directory to solve the problem.
1. Create a new www directory
mkdir /www
2. Download the mounted directory
umount /data
3. Mount to a new directory
mount /dev/sdb1 /www
4. Modify the configuration file
echo \\’/dev/sdb1 /www ext3 defaults 0 0\\’ >> /etc/fstab
Theoretically, this operation can complete the directory change. However, there are still some problems during the operation of Snail. During umount, "umount: /data: device is busy. In some cases useful info about processes that use the device is found by lsof(8) or "fuser(1)\\" error message cannot be uninstalled.
Second, solve the problem
Because the program is occupied here, we only need to check the ID and delete it. This is the operation process.
1. fuser /data
/data: 947c
We can see that there is actually a program occupying it.
2. Check the process
[[email protected] data]# ps -ef |grep 94croot 1435 947 0 22:47 pts/0 00:00:00 grep 94c[[email protected] data]# ps -ef |grep 94root 944 2 0 22:30 ? 00:00:00 [flush-253:0]root 945 868 0 22:33 00:00:00 sshd: [email protected]/0root 947 945 0 22:34 pt s/0 00:00: 00 -bashroot 1468 947 0 22:48 pts/0 00:00:00 ps -efroot 1469 947 0 22:48 pts/0 00:00:00 grep 94
3. Delete occupation
kill -9 945
Finally, we can continue to complete the mounting of the changed directory after re-umounting.
Recommended site searches: corporate website registration, Japanese proxy server IP, me domain name, Hong Kong domain name registration, domain name purchase, domain name registration query, how to register a domain name, foreign space rental, website IP address query domain name reservation,
发表评论