Skip to content

lvm: fix reusing minion pool for os morphing and disk replication - #515

Merged
Dany9966 merged 1 commit into
cloudbase:masterfrom
petrutlucian94:lvm_hook_minion_pool
Sep 2, 2026
Merged

lvm: fix reusing minion pool for os morphing and disk replication#515
Dany9966 merged 1 commit into
cloudbase:masterfrom
petrutlucian94:lvm_hook_minion_pool

Conversation

@petrutlucian94

Copy link
Copy Markdown
Member

We're disabling lvm udev rules as part of the backup writer setup in order to prevent the migrated volumes from being automatically mounted on the replicator vm.

The problem is that we're leaving behind an initrd lvm hook that will error out if the lvm udev rules are missing:

update-initramfs: Generating /boot/initrd.img-6.8.0-138-generic
E: /usr/share/initramfs-tools/hooks/lvm2 failed with return 1.

...
for rules in 56-lvm.rules 69-lvm.rules; do
	if   [ -e /etc/udev/rules.d/$rules ]; then
		cp -p /etc/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/
	elif [ -e /lib/udev/rules.d/$rules ]; then
		cp -p /lib/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/
	else
		exit 1
	fi
done
...

This prevents other packages from getting installed, breaking the os morphing initialization.

We'll solve it by removing the leftover lvm hook.

We're disabling lvm udev rules as part of the backup writer setup
in order to prevent the migrated volumes from being automatically
mounted on the replicator vm.

The problem is that we're leaving behind an initrd lvm hook that
will error out if the lvm udev rules are missing:

```
update-initramfs: Generating /boot/initrd.img-6.8.0-138-generic
E: /usr/share/initramfs-tools/hooks/lvm2 failed with return 1.

...
for rules in 56-lvm.rules 69-lvm.rules; do
	if   [ -e /etc/udev/rules.d/$rules ]; then
		cp -p /etc/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/
	elif [ -e /lib/udev/rules.d/$rules ]; then
		cp -p /lib/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/
	else
		exit 1
	fi
done
...
```

This prevents other packages from getting installed, breaking the
os morphing initialization.

We'll solve it by removing the leftover lvm hook.
@Dany9966
Dany9966 merged commit 86f5340 into cloudbase:master Sep 2, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants