#author("2019-10-05T06:10:57+00:00","default:sysosa","sysosa")
CentOS7ではそのままでxfsによるフォーマットが利用できる

[[xfs/Deduplication]]


***単体HDDのフォーマット [#n2686183]

[[AFT]]の絡みがあるが、パーティションを作成後
#code(nonumber){{
[root@s ~]# mkfs.xfs -f  /dev/sdb1
meta-data=/dev/sdb1              isize=256    agcount=32, agsize=22892700 blks
         =                       sectsz=4096  attr=2, projid32bit=0
data     =                       bsize=4096   blocks=732566385, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal log           bsize=4096   blocks=357698, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
[root@s ~]#
}}
とフォーマットする。
&color(red){セクタサイズ};(&color(red){sectsz};)の値は[[AFT]]から自動的に&color(red){4096 B};が定義される。&size(10){一応&color(green){-s size=512};と別の値は指定可能};
xfsだから&color(red){ブロックサイズ};(&color(red){bsize};)を 512B から 64kBまで変えられるので
#code(nonumber){{
[root@s ~]# mkfs.xfs -f -b size=64k /dev/sdb1
meta-data=/dev/sdb1              isize=256    agcount=32, agsize=1430794 blks
         =                       sectsz=4096  attr=2, projid32bit=0
data     =                       bsize=65536  blocks=45785399, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=65536  ascii-ci=0
log      =internal log           bsize=65536  blocks=22356, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=65536  blocks=0, rtextents=0
[root@s ~]#
}}
&color(red){ブロックサイズ};(&color(red){bsize};)を64kBでフォーマットして見たが、、、
#code(nonumber){{
[root@s ~]# LANG=C mount /dev/sdb1 /share
mount: Function not implemented
[root@s ~]#
}}
とマウントできない....

OSのPAGE_SIZEの値より大きいとmountできないみたい。
#code(nonumber){{
[root@s ~]# getconf PAGE_SIZE
4096
[root@s ~]#
}}

windowsだと「クラスター(アロケーションユニット)サイズ」とかでサイズを64kBにして用途限定の高速化などがあるのだが、、


***RAID構成でxfsフォーマット [#z2f872ea]
HDDが12本でRAID6構成、そしてstripe unit sizeが64KBなら
#code(nonumber){{
mkfs.xfs -f -d su=64k,sw=10 /dev/sdb1
}}
とする。suはstripe unit size、swはstripe width。
あとはラベルを付けて
#code(nonumber){{
xfs_admin -L "LV_180219" /dev/sdb1
}}
このラベル名で/etc/fstabを修正する
#code(nonumber){{
LABEL=LV_180219 /data xfs defaults 0 0
}}
&color(red){*};&size(10){/dev/sdb1と指定するのもいいが、他のストレージを追加すると/dev/sdc1とかに変更になるので避けている};
&size(10){あとUUIDで/etc/fstabを記述できるが意味のないIDは不要かなと思っている};



[[xfs/hw-raid]]
1

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS