In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
Editor to share with you what the layout of cephfs files is like, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
The layout xattrs of regular files is called ceph.file.layout, and the layout xattrs of directories is called ceph.dir.layout.
Layout field:
Pool
String, either ID or first name can be specified. It is the RADOS storage pool where the data object of the file resides.
Stripe_unit
Number of bytes, integers. The data blocks of a file are distributed according to this size (bytes) like RAID 0. All stripe units in a file are of the same size, and the last stripe unit is usually incomplete-that is, it contains the data at the end of the file and the unused "space" between the end of the data and the size of the fixed stripe unit.
Stripe_count
Round number. The number of consecutive stripe units that make up the RAID 0 stripe data.
Object_size
Integer bytes. File data is divided into RADOS objects according to this size
Use getfattr to read out the file layout:
Getfattr-n ceph.file.layout filename
Query a single file layout field:
Getfattr-n ceph.file.layout.pool filename
Getfattr-n ceph.file.layout.stripe_unit filename
Getfattr-n ceph.file.layout.stripe_count filename
Getfattr-n ceph.file.layout.object_size filename
Use setfattr to modify the file layout:
Setfattr-n ceph.file.layout.pool-v pool_num file_name-set pool id
Setfattr-n ceph.file.layout.stripe_unit-v 1048576 filename-- sets the stripe size
Setfattr-n ceph.file.layout.stripe_count-v 2 filename-- sets the number of stripes across
Setfattr-n ceph.file.layout.object_size-v 1048576 filename-- sets the object size
Query directory particularity:
Use getfattr to read out the directory layout:
Getfattr-n ceph.dir.layout.pool dirname
Use setfattr to modify the directory layout:
Setfattr-n ceph.dir.layout.pool-v pool_num file_name-set pool id
Setfattr-n ceph.dir.layout.stripe_unit-v 1048576 filename-- sets the stripe size
Setfattr-n ceph.dir.layout.stripe_count-v 2 filename-- sets the number of stripes across
Setfattr-n ceph.dir.layout.object_size-v 1048576 filename-- sets the object size
The above is all the content of this article "what is the layout of cephfs files?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, 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.