Re: [PATCH] md: warn about using another MD array as write journal
From: Song Liu <song@kernel.org>
Date: 2021-03-19 23:17:10
On Tue, Mar 16, 2021 at 9:39 PM Manuel Riel [off-list ref] wrote:
quoted hunk ↗ jump to hunk
To follow up on a previous discussion[1] about stuck RAIDs, I'd like to propose adding a warning about this to the relevant docs. Specifically users shouldn't add other MD arrays as journal device. Ideally mdadm would check for this, but having it in the docs is useful too. 1: https://lore.kernel.org/linux-btrfs/d3fced3f-6c2b-5ffa-fd24-b24ec6e7d4be@xmyslivec.cz/ (local) ---diff --git a/Documentation/driver-api/md/raid5-cache.rst b/Documentation/driver-api/md/raid5-cache.rst index d7a15f44a..128044018 100644 --- a/Documentation/driver-api/md/raid5-cache.rst +++ b/Documentation/driver-api/md/raid5-cache.rst@@ -17,7 +17,10 @@ And switch it back to write-through mode by:: echo "write-through" > /sys/block/md0/md/journal_mode In both modes, all writes to the array will hit cache disk first. This means -the cache disk must be fast and sustainable. +the cache disk must be fast and sustainable. The cache disk also can't be +another MD RAID array, since such a nested setup can cause problems when +assembling an array or lead to the primary array getting stuck during +operation.
Sorry for being late on this issue. Manuel and Vojtech, are we confident that this issue only happens when we use another md array as the journal device? Thanks, Song
write-through mode ==================