In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what is the GlusterFS extended attribute". In the daily operation, I believe many people have doubts about what the GlusterFS extended attribute is. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the question of "what is the GlusterFS extended attribute?" Next, please follow the editor to study!
Extended attributes are generally supported by modern file systems, but they are not easy to be discovered by users.
The extended attribute xattr is widely used in both DHT,AFT and stripe of Glusterfs.
Xattr is a key-value structure that includes a string key and a binary value. We have get/set/list xattr methods to manipulate them.
Such a trick is widely used in glusterfs: when set/get xattr, the relevant operation of gluster server will be triggered. For example, the reblance code in DHT uses a specific attr to trigger the recalculation of the DHT layout.
The following focuses on trusted.glusterfs.dht xattr in DHT and trusted.glusterfs.afr.* xattr in AFR
The core of the DHT function is the consistent consistent hashing. The location of the file storage depends on the hash value of the file name, each brick has a hash value range, the hash value of the file name falls in the hash value range of a brick, and the file is stored on the birck.
Directories are a little different. Directories are available on every brick. But the xattr trusted.glusterfs.dht for each directory is different. Because they have different hash intervals.
When we lookup the directory, we need to collect these xattr to form a table. At the same time, we need to pay attention to the gap and overlap between the intervals.
It is not difficult to find that this method has serious scalability problems, and every time we add / delete a brick, we have to recalculate the hash interval stored in the xattr.
However, AFR is more complex than DHT in using attr.
For example, an afr volume called test1 consists of two brick, test1-client-0 and test1-client-1. Then the file on the test1-client-0 will have a xattr named trusted.afr.test1-client-1.
This is because the purpose of AFR is to recover from failure. So operations on one brick are recorded in xattr on all other brick, which is wasteful when the number of copies exceeds 2. :-/
What is stored in xattr is "counter waiting for operation"
There are three types of operations:
Data manipulation-mostly writes but also e.g. Truncates
Metadata manipulation-e.g. Chmod/chown/chgrp, and xattrs (yes, this gets recursive)
File operations-create, delete, rename, etc.
Counter is first incremented by 1 before each file system operation is performed.
After the execution is completed, reduce the counter by one.
Normally, counter should go back to 0. If a node has a problem halfway and counter is not 0, then we can know the node out of date and start self-heal to fix it.
So it is conceivable that the most serious case is that the counter of both replica nodes of AFR is not zero, and we call this special case "split brain". At this point, it is difficult or almost impossible for the system to return to normal itself.
At this point, the study on "what are the GlusterFS extension properties" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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: 289
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.