linux "mdadm --write-journal"과 lvmcache - 어떻게 관련되어 있나요?

linux "mdadm --write-journal"과 lvmcache - 어떻게 관련되어 있나요?

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.

관련 정보