ユーザ用ツール

サイト用ツール


01_linux:13_storage:36_linstor_bcache

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
01_linux:13_storage:36_linstor_bcache [2022/07/07 23:06] – 作成 matsui01_linux:13_storage:36_linstor_bcache [2022/08/24 07:15] (現在) matsui
行 24: 行 24:
 </code> </code>
  
 +==== プールの設定修正 ====
  
 +<color #ed1c24>※compress=offにすると、LINSTORでzfsthinを設定してもシンプロにならないので注意</color>
 +
 +<code>
 +zfs set compress=lz4 DataPool
 +##zfs set compress=off DataPool
 +zfs set sync=disabled DataPool
 +zfs set atime=off DataPool
 +zpool set autotrim=off DataPool
 +</code>
 +
 +==== プールの設定確認 ====
 +<code>
 +zfs get compress
 +zfs get sync
 +zfs get dedup
 +zfs get atime
 +zpool get -o all all | grep autotrim
 +</code>
 +
 +==== LINSOTR storage-pool追加 ====
 +<code>
 +linstor storage-pool create zfsthin node1 DfltStorPool DataPool
 +linstor storage-pool create zfsthin node2 DfltStorPool DataPool
 +linstor storage-pool create zfsthin node3 DfltStorPool DataPool
 +linstor storage-pool create zfsthin node4 DfltStorPool DataPool
 +</code>
 +
 +===== 3.Bcache領域作成  =====
 +
 +
 +今回は、/dev/sdaの余った領域をBcacheに使ってみる。
 +本来はnvmeのSSDを利用したりする。Optane SSDなど
 +
 +<code>
 +lvcreate -l 100%FREE --thinpool ubuntu-vg/CachePool
 +linstor storage-pool create lvmthin oshv1001 LinstorCache ubuntu-vg/CachePool
 +</code>
 +
 +
 +===== 4.create resource group =====
 +
 +<code>
 +linstor resource-group create BcacheG --storage-pool DfltStorPool --place-count 3 --layer-list drbd,bcache,storage
 +</code>
 +
 +===== 5.set bcache for resource group =====
 +
 +<code>
 +linstor resource-group set-property BcacheG BCache/PoolName LinstorCache
 +</code>
 +
 +===== 6.configure bcache in LINBIT SDS (optional)  =====
 + 
 +もしキャッシュのモードを変更する場合
 +
 +<code>
 +# linstor resource-group set-property BcacheG BCache/Writeback true
 +# linstor resource-group set-property BcacheG BCache/Discard true
 +</code>
 +
 +
 +===== 7.Create Volume  =====
 +
 +<code> 
 +linstor volume-group create BcacheG
 +linstor resource-group spawn BcacheG Volume001 10G
 +</code>
 +
 +===== 8.確認 =====
 +
 +<code>
 +## lsblk
 +
 +zd0          230:0        2G  0 disk
 +└─bcache0    252:0        2G  0 disk
 +  └─drbd1000 147:1000  0    2G  0 disk
 +zd16         230:16    0  512M  0 disk
 +└─bcache0    252:0        2G  0 disk
 +  └─drbd1000 147:1000  0    2G  0 disk
 +</code>
 {{tag>LINSTOR drbd}} {{tag>LINSTOR drbd}}
01_linux/13_storage/36_linstor_bcache.1657235173.txt.gz · 最終更新: 2022/07/07 23:06 by matsui