Debian Bug report logs - #918681
lvm2: initramfs-tools hook scripts don't properly setup lvmraid system at boot

version graph

Package: lvm2; Maintainer for lvm2 is Debian LVM Team <[email protected]>; Source for lvm2 is src:lvm2 (PTS, buildd, popcon).

Reported by: Paul Wise <[email protected]>

Date: Tue, 8 Jan 2019 10:45:01 UTC

Severity: wishlist

Found in version lvm2/2.03.02-1

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian LVM Team <[email protected]>:
Bug#918681; Package lvm2. (Tue, 08 Jan 2019 10:45:04 GMT) (full text, mbox, link).


Acknowledgement sent to Paul Wise <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian LVM Team <[email protected]>. (Tue, 08 Jan 2019 10:45:04 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Paul Wise <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: lvm2: initramfs-tools hook scripts don't properly setup lvmraid system at boot
Date: Tue, 08 Jan 2019 18:43:30 +0800
[Message part 1 (text/plain, inline)]
Package: lvm2
Version: 2.03.02-1
Severity: wishlist
File: /usr/share/initramfs-tools/hooks/lvm2
File: /usr/share/initramfs-tools/scripts/local-block/lvm2
File: /usr/share/initramfs-tools/scripts/local-top/lvm2

As a way to migrate away from a possibly failing disk in a single-disk
system without md RAID, I've moved the disk to another system, plugged
in a second disk and added that disk as a lvm raid1 mirror, converting
my system to lvmraid. Consequently I've noticed that on boot, one of
the disks is not attached to the LVs and so I have to refresh each LV
with `lvchange --refresh` and the system then syncs the LVs to the
additional drive. The sync process is quick due to the lvmraid write
bitmaps and low amount of disk writes during boot but it is annoying to
have to run the sync manually on every boot. In case it changes
anything, both of the PVs are on top of individual encrypted LUKS
volumes. I'm not sure how to change the initramfs scripts but maybe the
lvmraid(7) manual page or the RedHat LVM RAID guide will help:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/logical_volume_manager_administration/raid_volumes

-- System Information:
Debian Release: buster/sid
  APT prefers testing-debug
  APT policy: (900, 'testing-debug'), (900, 'testing'), (800, 'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.18.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8), LANGUAGE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages lvm2 depends on:
ii  dmeventd                  2:1.02.155-1
ii  dmsetup                   2:1.02.155-1
ii  libaio1                   0.3.111-1
ii  libblkid1                 2.33-0.2
ii  libc6                     2.28-2
ii  libdevmapper-event1.02.1  2:1.02.155-1
ii  libdevmapper1.02.1        2:1.02.155-1
ii  libreadline5              5.2+dfsg-3+b2
ii  libselinux1               2.8-1+b1
ii  libsystemd0               240-2
ii  libudev1                  240-2
ii  lsb-base                  10.2018112800

Versions of packages lvm2 recommends:
ii  thin-provisioning-tools  0.7.4-2

lvm2 suggests no packages.

-- Configuration Files:
/etc/lvm/lvm.conf changed [not included]

-- no debconf information

-- 
bye,
pabs

https://wiki.debian.org/PaulWise

[signature.asc (application/pgp-signature, inline)]

Information forwarded to [email protected], Debian LVM Team <[email protected]>:
Bug#918681; Package lvm2. (Sun, 19 Mar 2023 06:03:03 GMT) (full text, mbox, link).


Acknowledgement sent to gold holk <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <[email protected]>. (Sun, 19 Mar 2023 06:03:03 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: gold holk <[email protected]>
To: [email protected]
Subject: A initramfs boot script that wait lvmraid become complete for root device
Date: Sun, 19 Mar 2023 14:01:14 +0800
[Message part 1 (text/plain, inline)]
Hey Paul and LVM team:

I faced this issue and manage to write a initramfs-tool boot script to 
fix this.

Put the enclosure script in `/etc/initramfs-tools/scripts/local-top` and 
run `update-initramfs -k all -u`, the initramfs boot stage will run this 
script and wait for the root device becoming `complete` status. If it 
does not complete in 2 minutes, it will stop waiting and continue boot.

To write or debug the initramfs script, the `initramfs-tools(7)` would 
be helpful.

As my realization, to fix this issue in lvm2 package, we should make 
`/usr/share/initramfs-tools/scripts/local-top/lvm2` check the status of 
the activated LV. Please tell me if I can help to merge my script into 
the existing lvm2 initramfs script.

I am new to debian community. This is the first time I write a 
initramfs-script, though I am already experienced in normal  shell script.

I also asked and answered this issue on stack-exchange community; it may 
be helpful if you want to know more details:
tabopen 
https://superuser.com/questions/1773241/raid-1-lv-partially-up-and-unable-to-repair-the-down-rimage-is-missing

May the source be with you

-- 
linux user, amateur web developer, geomatics major.
blog: http://gholk.github.io
[initramfs-lvm-raid-wait.sh (application/x-shellscript, attachment)]

Information forwarded to [email protected], Debian LVM Team <[email protected]>:
Bug#918681; Package lvm2. (Sun, 19 Mar 2023 06:12:03 GMT) (full text, mbox, link).


Acknowledgement sent to gold holk <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <[email protected]>. (Sun, 19 Mar 2023 06:12:03 GMT) (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: gold holk <[email protected]>
To: [email protected]
Subject: Re: A initramfs boot script that wait lvmraid become complete for root device
Date: Sun, 19 Mar 2023 14:08:41 +0800
[Message part 1 (text/plain, inline)]
Sorry, a bug in script about prereq

gold holk 於 2023/3/19 14:01 寫道:
> Hey Paul and LVM team:
>
> I faced this issue and manage to write a initramfs-tool boot script to 
> fix this.
>
> Put the enclosure script in `/etc/initramfs-tools/scripts/local-top` 
> and run `update-initramfs -k all -u`, the initramfs boot stage will 
> run this script and wait for the root device becoming `complete` 
> status. If it does not complete in 2 minutes, it will stop waiting and 
> continue boot.
>
> To write or debug the initramfs script, the `initramfs-tools(7)` would 
> be helpful.
>
> As my realization, to fix this issue in lvm2 package, we should make 
> `/usr/share/initramfs-tools/scripts/local-top/lvm2` check the status 
> of the activated LV. Please tell me if I can help to merge my script 
> into the existing lvm2 initramfs script.
>
> I am new to debian community. This is the first time I write a 
> initramfs-script, though I am already experienced in normal  shell 
> script.
>
> I also asked and answered this issue on stack-exchange community; it 
> may be helpful if you want to know more details:
> tabopen 
> https://superuser.com/questions/1773241/raid-1-lv-partially-up-and-unable-to-repair-the-down-rimage-is-missing
>
> May the source be with you
>
-- 
linux user, amateur web developer, geomatics major.
blog: http://gholk.github.io
[initramfs-lvm-raid-wait.sh (application/x-shellscript, attachment)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 12:58:07 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.