In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to use the directory-layout-spread parameter of glusterfs". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use the directory-layout-spread parameter of glusterfs.
I recently encountered the directory-layout-spread parameter of dht. What is this? The default is subvolume-count. Literally means the number of layout distribution, then what is the specific effect? I did an experiment:
1) create a distributed service (1 x 4, disk1, disk2,disk3,disk4) test to start the service. Modify the vol configuration file trusted-xxxxx-fuse.vol corresponding to the fuse client, add the "option directory-layout-spread 3" field at dht, and set directory-layout-spread to 3. 0.
Note: at present, this parameter can only be set by manually modifying the configuration file, not dynamically through the gluster command.
2) mount client, create three directories in the mount point. 1. Then copy a large number of small files in directory a, and check the file distribution on the backend brick. It is found that the files are only distributed on disk2,disk3,disk4, but there are no files on disk1. two。 Delete all the files in directory a, and then want to copy a large number of small files in directory b, and check the file distribution on the backend brick. It is found that files are only distributed on disk1,disk2,disk3, but there are no files on disk4.
Through the above experiments and combined with source code analysis: directory-layout-spread is set by the user, the default value is the subvolume-count of the dht module, and the number of subvolumes used in the directory hash layout. That is, users can specify that the files under a certain directory can be distributed to N sub-volumes (which are determined by hash algorithm) instead of all sub-volumes. According to hash algorithm, each directory has different N sub-volumes, so that when there are a large number of directories and files, the distribution of files can reach a balanced state as a whole.
The benefits of introducing this parameter are:
1) since the layout of a directory is not allocated to all subvolumes, the loss of files in all directories will not occur when a subvolume down is dropped.
2) since the layout of a directory is not assigned to all subvolumes, when a subvolume causes layout repair, it will not cause all directories to be repaired by layout.
3) rebalance does not require all subvolumes to participate (this point has not been verified ^-^).
Later:
From the directory-layout-spread parameter of glusterfs, I think of the lables function of moosefs (above moosefs 3.0). Lables is to assign a specified chunkservers (storage server) to a directory. For example, the file access performance requirements stored in the A directory are higher, we can assign the files in this directory to the chunkservers equipped with SSD solid state disk, while the B directory files have lower performance requirements, we can separate the files in this directory to the chunkservers of ordinary HDD. Of course, if there are subsequent changes or business needs, you can migrate SSD--- > HDD or HDD---- > SSD dynamically.
At this point, I believe you have a deeper understanding of "how to use the directory-layout-spread parameters of glusterfs". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.
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.