In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how to repair cracked brain files under GlusterFS, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Recovery of GlusterFS file split brain steps
1. Execute the following command to get the path of the split brain file.
# gluster volume heal VOLNAME info split-brain
When the client accesses the split brain file, it will report an Iamp O error.
two。 Close the process of accessing split brain files on the mount client. If a virtual machine is using split brain files, the virtual machine must be turned off.
3. Get and verify the change records of the extended properties through the getfattr command, and then determine which brick contains trusted files by extending the properties.
# getfattr-d-m. -e hex
[root@lab21:/letv/disk4] $getfattr-d-m. -e hex file1
# file: file1
Trusted.afr.plane-client-0=0x000000000000000000000000
Trusted.afr.plane-client-1=0x000000000000000000000000
Trusted.gfid=0x4e028c9b64234502ba304eba44e16da4
File change record attribute description, as shown in the following example:
0x 000003d7 00000001 000000110
| | |
| |\ _ changelog of directory entries |
| |\ _ changelog of metadata |
\ _ changelog of data
The first 8 bits * background field record data change record
Middle 8-bit blue background field record metadata change record
Last 8-bit pink background field record index gfid change record
For catalogs, metadata and index gfid change corresponding fields are valid.
For normal files, the corresponding fields of data and metadata are valid.
For special files, such as device files, the metadata corresponding fields are valid.
A file crack brain, but data crack brain, can also be metadata split brain, also can be data and metadata split brain at the same time.
An example of metadata and data cracking at the same time is as follows:
# getfattr-d-m. -e hex / gfs/brick-?/a
Getfattr: Removing leading'/ 'from absolute path names
\ # file: gfs/brick-a/a
Trusted.afr.vol-client-0=0x000000000000000000000000
Trusted.afr.vol-client-1=0x000003d70000000100000000
Trusted.gfid=0x80acdbd886524f6fbefa21fc356fed57
\ # file: gfs/brick-b/a
Trusted.afr.vol-client-0=0x000003b00000000100000000
Trusted.afr.vol-client-1=0x000000000000000000000000
Trusted.gfid=0x80acdbd886524f6fbefa21fc356fed57
4. Select the correct copy.
5. Solve the brain crack problem by resetting related fields
1) solve the problem of data cracking: reset the corresponding attribute values of the data field
2) solve the problem of metadata cracking: reset the corresponding attribute values of metadata fields
3) solve the index crack: delete an invalid copy and delete the corresponding gfid-link file in the .glusterfs directory
Before deleting the gfid-link file, make sure that the file you want to delete on the current brick does not have a hard link, and if so, you must delete it.
6. Trigger automatic repair
# ls-l
Or
# gluster volume heal VOLNAME
Note:
For the brain cracks caused by normal attributes and different file contents, the heal command cannot be repaired. You need to execute the heal full command, and of course ls can.
The repair method is to delete the wrong copy and the corresponding gfid file.
The above content is how to repair cracked brain files under GlusterFS. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to 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.
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.