Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the MooseFS maintenance skills?

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is to share with you what MooseFS maintenance skills are, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

MooseFS is a network distributed file system. Today we will take a look at the maintenance skills of MooseFS.

First, start MooseFS cluster

The safest way to start a MooseFS cluster (to avoid any read or write incorrect data or similar problems) is to follow these command steps:

Start the mfsmaster process

Start all mfschunkserver processes

Start the mfsmetalogger process (if mfsmetalogger is configured)

When all the chunkservers are connected to the MooseFS master, any number of clients can use mfsmount to mount the export file system. You can check the master log or the CGI monitor to see if all chunkserver is connected.

2. Stop MooseFS cluster

Stop the MooseFS cluster securely:

Unmount the MooseFS file system on all clients (using the umount command or other equivalent command)

Stop the chunkserver process with the mfschunkserver-s command

Stop the metalogger process with the mfsmetalogger-s command

Stop the master process with the mfsmaster-s command

III. Maintenance of MooseFS chunkservers

If the goal (target) of each file is not less than 2, and there are no under-goal files (which can be checked with the mfsgetgoal-r and mfsdirinfo commands), then a single chunkserver can be stopped or restarted at any time. Whenever you need to stop or restart another chunkserver later, make sure that the previous chunkserver is connected and that there is no under-goal chunks.

IV. Backup of MooseFS metadata

Usually metadata has two parts of data.

The main metadata file metadata.mfs, which is named metadata.mfs.back when mfsmaster is running

The metadata change log changelog.*.mfs stores file changes over the past N hours (the value of N is set by the BACK_LOGS parameter, and the parameter is set in the mfschunkserver.cfg configuration file).

Major metadata files need to be backed up regularly, depending on how many hours of changelogs storage. Metadata changelogs should be replicated automatically in real time. Since MooseFS 1.6.5, these two tasks have been done by the mfsmetalogger daemon.

V. recovery of MooseFS master

In the event of a mfsmaster crash (for example, due to host or power failure), a metadata log changelog is required to be incorporated into the primary metadata. The easiest way to do this is through the mfsmetarestore tool:

Mfsmetarestore-a

If master data is stored in a path outside the location specified by MooseFS compilation, use the-d parameter to specify the use, such as:

Mfsmetarestore-a-d / storage/mfsmaster

Restore MooseFS master from backup

To restore a master from a backup, you need to do:

1. Install a mfsmaster

2. Use the same configuration to configure this mfsmaster (use backup to retrieve mfsmaster.cfg). It can be seen that the configuration file also needs to be backed up.

3. Retrieve the metadata.mfs.back file, either from the backup or from the metalogger host (if the metalogger service is started), and then put the metadata.mfs.back into the data directory, usually ${prefix} / var/mfs.

4. Copy the * metadata file from any server running the metalogger service before the master outage, and put it in the mfsmaster data directory.

5. Using the mfsmetarestore command to merge metadata changelogs, you can use either the automatic recovery model mfsmetarestore-an or the non-automatic recovery model. The syntax is as follows:

Mfsmetarestore-m metadata.mfs.back-o metadata.mfs changelog_ml.*.mfs

These are the MooseFS maintenance skills, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report