Using Linux and GFS to create Cluster Storage (2)

Source: Internet
Author: User
Use Linux and GFS to create Cluster Storage (2)-Linux general technology-Linux technology and application information. The following is a detailed description. Create cluster settings
You can complete most cluster settings through cluster. conf in/etc/cluster. I do not recommend using various cluster management applications to create this setting file. Even a fully supported RHEL application, such as Conga released two months ago, often creates invalid cluster. conf files and cannot be parsed by necessary services.
The following is an example of a cluster. conf file. This setting file adopts a beautiful XML format, and its content is very direct. First, we name the cluster. We call this cluster "Web.1 ".
Skip the fence daemon option first. The next part is the setting content of the cluster body. You need to define two nodes in the noternodes section. The setting file will be stored on both nodes at the same time, so that both nodes know each other.
Each node in the cluster declares that the name of the blocking method is unique. Under the ternames end tag, the fencedevice section defines how each node blocks other nodes. Using a server that supports IPMI (smart platform management interface) is the best method, and its configuration is quite simple. You only need to tell the IP address of IPMI and the logon method. To avoid leaving a password in cluster. conf, you can point it to a script owned by the root and return the password by this script.
We also need to point out that we have defined two nodes in the settings. This is required because the cluster cannot reach the "Quorate" State unless most nodes agree to their own state. If there are only two nodes, there is not a majority. Therefore, this method allows the cluster to work only under two nodes, rather than only one node. This is a necessary way to set up a basic cluster.
Run "service cman start" on each node, and the system should be able to start normal operation. You can check "clustat" or "cman nodes" to check whether the node is running well. If any necessary part is not started, the cluster will not display the "Quorate" status.
GFS settings
First, we need to set CLVM so that we can use LVM. To activate CLVM through GFS, we only need to set "locking type = 3" in lvm. conf.
Then, create an LVM volume group and volume as usual, but use a shared block device. If you are using DRBD, you may use/dev/drbd0. I have created a physical volume and then created a volume group named vg01, create a logical volume named web1 in/dev/vg01/web1.
Finally, we need to create a file system:
Gfs_mkfs-t web1: mygfs-p lock_dlm-j 2/dev/vg01/web1
-The name given in-t must be the cluster name, followed by the name you gave to the file system. Only members of the web1 cluster can load the file system. Then, set the key type of the distributed lock manager to indicate that you need two journal copies (because this is a dual-node cluster ). If you expect more nodes to be added in the future, you need to set a high number of journals at this time.

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.