Hello,

I sneak in just to report another situation where this feature would be useful: root filesystem placed on an MD Raid array with an external write-intent bitmap.

To be effective the write-intent bitmap file needs to be placed on an external partition outside of the raid array. This creates a chicken and egg problem where the raid array needs the partition where the file is placed which in turn needs the root partition to be mounted.

Haven't tried it, but this probably could be solved within initramfs by mounting the external partition somewhere under /run before assembling the raid array. This needs to be unwinded at shutdown and I see no way to do it properly outside of initramfs, as the unwinding would require the following steps:

- Unmount root
- Stop the raid array, so that the bitmap file is no longer used
- Unmount the write-intent bitmap partition

Another solution might consider the following steps:

- Mount root read only, so no further writes could happen
- Remove the bitmap file from the raid array
- Unmount the write-intent bitmap partition

May be this could be done outside of initramfs but I'm not sure if the bitmap file would be used again after reboot.

If I find some spare time I'll try to experiment using some VM.

FYI, with the root filesystem on an hybrid NVME/HDD Raid 1 I'm experiencing the same NVME "unsafe_shutdowns" problem reported by Joseph Carter. Not unexpected considering that this situation is pretty similar.

Hope it helps.

Bye,

--
Denis Sbragion

Reply via email to