您好,登錄后才能下訂單哦!
小編給大家分享一下cephfs文件布局是怎么樣的,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!
常規(guī)文件的布局 xattrs 叫作 ceph.file.layout 、目錄的布局 xattrs 叫作 ceph.dir.layout
布局字段:
pool
字符串,可指定 ID 或名字。它是文件的數(shù)據(jù)對象所在的 RADOS 存儲池。
stripe_unit
字節(jié)數(shù)、整數(shù)。一個文件的數(shù)據(jù)塊按照此尺寸(字節(jié))像 RAID 0 一樣分布。一文件所有條帶單元的尺寸一樣,最后一個條帶單元通常不完整——即它包含文件末尾的數(shù)據(jù)、還有數(shù)據(jù)末端到固定條帶單元尺寸之間的未使用“空間”。
stripe_count
整數(shù)。組成 RAID 0 “條帶”數(shù)據(jù)的連續(xù)條帶單元數(shù)量。
object_size
整數(shù)個字節(jié)。文件數(shù)據(jù)按此尺寸分塊為 RADOS 對象
使用getfattr讀出文件布局:
getfattr -n ceph.file.layout filename
查詢單個文件布局字段:
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
使用setfattr修改文件布局:
setfattr -n ceph.file.layout.pool –v pool_num file_name ---設(shè)置pool id
setfattr -n ceph.file.layout.stripe_unit -v 1048576 filename --設(shè)置條帶大小
setfattr –n ceph.file.layout.stripe_count –v 2 filename --設(shè)置條帶跨越個數(shù)
setfattr –n ceph.file.layout.object_size –v 1048576 filename --設(shè)置對象大小
查詢目錄特殊性:
使用getfattr讀出目錄布局:
getfattr -n ceph.dir.layout.pool dirname
使用setfattr修改目錄布局:
setfattr -n ceph.dir.layout.pool –v pool_num file_name ---設(shè)置pool id
setfattr -n ceph.dir.layout.stripe_unit -v 1048576 filename --設(shè)置條帶大小
setfattr -n ceph.dir.layout.stripe_count –v 2 filename --設(shè)置條帶跨越個數(shù)
setfattr -n ceph.dir.layout.object_size –v 1048576 filename --設(shè)置對象大小
以上是“cephfs文件布局是怎么樣的”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學(xué)習(xí)更多知識,歡迎關(guān)注億速云行業(yè)資訊頻道!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。