linux "mdadm --write-journal"とlvmcache - どのように関連していますか?

linux

Linux mdadmのマニュアルページに「--write-journal」オプションが表示されました。

lvmcacheはdm-cacheの上に構築されているので、これはlvmcacheとどのような関係がありますか?それらは別のものですか、それともlvmcacheが後ろから「--write-journal」のようなことをしていますか?

ありがとうございます!

ベストアンサー1

RAID ログは、md マンページで詳しく説明されています。

   RAID456 WRITE JOURNAL

   Due to non-atomicity nature of RAID write operations,  interruption  of
   write  operations  (system  crash,  etc.)  to RAID456 array can lead to
   inconsistent parity and data loss (so called RAID-5 write hole).

   To plug the write hole, from Linux 4.4 (to be confirmed),  md  supports
   write  ahead  journal  for RAID456. When the array is created, an addi‐
   tional journal device can be added to the array  through  write-journal
   option.  The  RAID write journal works similar to file system journals.
   Before writing to the data disks, md persists data AND  parity  of  the
   stripe  to  the  journal device. After crashes, md searches the journal
   device for incomplete write operations, and replay  them  to  the  data
   disks.

   When the journal device fails, the RAID array is forced to run in read-
   only mode.

lvmcacheしたがって、それは何らかの形で、形や形であれ、それとは何の関係もありません。

lvmcache は、SSD にデータをキャッシュして、より高速な読み出し速度を提供するように設計されています。

md write Journalは書き込みキャッシュなので、高速ではありません。データ損失を防ぐために存在します。すべてのRAID書き込みが最初に行われる必要がある場合、これはSSDに大きな負担となります。 RAIDの再同期および拡張中にもこのようなことが起こると、短時間で多くのテラバイトのデータが書き込まれることがわかります。

これがおそらくmdadmマンページにSSDの寿命が記載されている理由です。

   --write-journal
          Specify  journal  device  for  the RAID-4/5/6 array. The journal
          device should be a SSD with reasonable lifetime.

おすすめ記事