Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1241926

Bug#778849: Support restoring initrd on shutdown and pivoting into it

From Denis Sbragion <d.sbragion@neomerica.it>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#778849: Support restoring initrd on shutdown and pivoting into it
Date 2025-04-14 10:00 +0200
Message-ID <KBmTv-dpzm-1@gated-at.bofh.it> (permalink)
References <oVYjo-80O-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


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

Back to linux.debian.bugs.dist | Previous | Next | Find similar | Unroll thread


Thread

Bug#778849: Support restoring initrd on shutdown and pivoting into it Denis Sbragion <d.sbragion@neomerica.it> - 2025-04-14 10:00 +0200

csiph-web