[Moosefs] Storage class

Source: Internet
Author: User

Chapter 1 Moosefs 3.1 Storage class function introduction

1.1 What is storage class

In Moosefs, storage class allows the chunks of the specified file to be stored on which chunkservers.

Storage class is expressed using a label.

In order to be compatible with the early version of the goal feature, Moosefs 3.0 will automatically establish 1~9 storage class in the system. The goal tool will work by default under the corresponding storage class.

1.2 What is a label

A label is a letter that can be assigned to Chunkserver (a~z,26 optional), and each chunkserver can be labeled with multiple tags (i.e., multiple letters on the tag, but up to 26 labels)

A complete label expression can be composed of multiple sub-expressions, separated by commas between each sub-label. Each sub-expression refers specifically to a storage mode for a copy of the file. The subexpression can be an asterisk * or a label schema.

The label schema can be a label or a complex expression consisting of addition, multiplication, and parentheses.

Addition is the meaning of logic "or", that is, a copy of a file can be stored on any chunkserver containing the addition element label. For example, if the storage class of a file is A+b+c, any chunkserver that contains a, B, or C tag can be used to store a copy of the file.

Multiplication is the logical "and" meaning that a copy of a file can be stored only on a chunkserver that contains all the labels. For example, if the storage class of a file is ABC, it can be used to hold a copy of the file only if a chunkserver contains the ABC three tag.

The same subexpression can be represented by adding a number before the expression without repeating the declaration multiple times.

Chapter 2 How to use storage class

2.1 Machine configuration

In the example in this article, Moosefs will be installed on 11 machines:

TS02, TS03 for master servers

Ts04. TS12 to Chunkservers

Premise hypothesis:

Some initialization data has been stored in the sample Moosefs file system, and goal is 2 (storage class 2)

2.2 Installation method of Moosefs without setting storage class

If no label is set on Chunkserver, the distribution of the data in the Moosefs 3.0 system will be the same as in version 2.0, as shown in

2.3 Add label to Chunkservers

To label Chunkserver, you need to modify the configuration file for the corresponding Chunkserver/etc/mfs/mfschunkserver.cfg

Edit the configuration file, remove the comment symbol in front of labels = A, and set the label you want

After setting up, you need to notify the Chunkserver process profile has been updated, using the following two commands can be

Service Moosefs-pro-chunkserver Reload

Or

Mfschunkserver Reload

Again for Ts04. Ts07 set a tag, ts08. TS12 the b tag, the information from the CGI page to see Chunkserver is as follows:

If you want to set multiple labels for chunkserver, here are three ways to do it:

LABELS = XYZ

Or

LABELS = X Y Z

Or

LABELS = X, Y, Z

The cluster after the label is set up as follows:

2.4 Creating the Storage class

Use the Mfsscadmin tool to create a storage class in the Moosefs system.

[Moosefs] Storage class

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.