WordPress knowledge sharing

An example of how to solve the problem that the attached data disk is lost and not displayed after the pagoda panel restarts the server

This time on Pagoda panel In the middle of the optimization and speed increase website, there was an episode. After restarting the server, the extra data disk purchased could not be found. After a lot of trouble, Weieis Blog solved the problem. Now share the record of the solution process. First, make a backup for yourself and use it later. Second, share it with people who also encounter the same problem.

This problem occurred in the process of helping friends optimize their websites Record the process of speeding up the template website of newspaper and solving additional problems , you can go and have a look if you are interested.

At that time, Lao Wei was operating on object storage. When all the images were uploaded to OSS object storage, he replaced all the image address links with plug-ins in batches and replaced them with OSS image addresses. He restarted the server to make the new image address take effect. At this time, he found that the website 404 was wrong and could not be opened. First of all, calm down (in fact, he was in a panic), and think that he bought an additional 100GB data disk. Go to the pagoda panel and see the path of the website program pointing to the data disk (there is too much website data, and the default disk capacity is not enough). At this time, when you look at the server configuration on the front page of the panel, you can no longer see the 100G attached disk.

I figured out that the problem was that the data disk could not be displayed, and the website content was on it. Calm down and think about it. The previous normal operation of the website indicates that the data disk has been attached, but it has not been added to the startup item, so the system cannot find the data disk after restarting. The solution is to put the data disk in the startup item, and let the system load the data disk after startup.

Lao Wei suggested that the pagoda panel is suitable for novices and Xiaobai to build a website, and supports Linux Windows system, Click to go directly to the pagoda website Register an account and get a free professional edition gift package of ¥ 3188 (only 1188 yuan for permanent authorization of the professional edition). New users can enjoy a professional edition experience of 0.99 yuan for 7 days.
Recommended selection of pagoda panel Alibaba Cloud Tencent Cloud The server
For more information, see Special topic of pagoda panel
Click to view NetEase Cloud Classroom "Introduction to Pagoda Linux Panel for Novice"

In the evening, people have gone to bed and can't get in touch, and can't get the SSH account password. At this time, the terminal function of the pagoda panel is used to execute simple SSH commands.

First, enter the command to view the drive letter of the data disk and the name of the loaded folder.

df -h

Knowing that the folder name is mnt, most people will use www or home as the folder name. Here, if you operate your own disk, you should pay attention to the specific disk name. Don't copy it mechanically.

At that time, Lao Wei didn't have an SSH account password. The first method was to manually add a mount command to the/etc/fstab file (go to the pagoda panel>>File>>find and edit the file) using the pagoda file function:

/dev/vdb1 /mnt ext4 defaults 0 0

Mnt is the name of the mounted folder, that is, the folder name of the 100G data disk mapped to the default disk. The drive letter of the data disk is not necessarily vdb1. The names of different hosts are different, but the meaning and usage are the same. Therefore, the operations here Please be sure to understand the meaning and difference between the folder name and the drive letter before operating. It is easy to be injured by mistake when you are ignorant

The second way is to use the terminal command function of the pagoda panel mentioned above.

Third, if you have an SSH account password, log in and enter the following command line:

vi /etc/fstab
/dev/vdb1 /mnt ext4 defaults 0 0

After adding, remember to restart the server and let the external disk start automatically to take effect. At this time, the data disk can be seen on the home page of the pagoda panel, and the website can be opened normally. The problem is solved.

Like( zero )
Article name: A Solution to the Loss and Non display of the Attached Data Disk after the Pagoda Panel Restarts the Server
Article link: https://www.vpsss.net/15989.html
Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself.
The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.