Skip to contentSkip to conversation

systemd generator fails if lvmconfig does not find a value

linux-lvm Bastian Blank 2 participants 2 messages Dec 23, 2018 – Jan 3, 2019

lore
Share & tools
lore
#0 lore raw

Moin

The systemd generator in 2.03.01 fails if the config does not yet contain the variables it tries to read via lvmconfig. It aborts as lvmconfig exits with exit value 5.

| % /sbin/lvmconfig config/checks te/t 2>/dev/null; echo $? 
| checks=1
| 5

As generators should not fail, ignoring lvmconfig problems might be the best option. The fallback of just generating services is safe.

Regards,
Bastian

Signature · 3 lines
Each kiss is as the first.
		-- Miramanee, Kirk's wife, "The Paradise Syndrome",
		   stardate 4842.6
#1 lore raw
Quoted 6 lines · Bastian Blank

Moin

The systemd generator in 2.03.01 fails if the config does not yet contain the variables it tries to read via lvmconfig. It aborts as lvmconfig exits with exit value 5.

Quoted 6 lines
| % /sbin/lvmconfig config/checks te/t 2>/dev/null; echo $? 
| checks=1
| 5

As generators should not fail, ignoring lvmconfig problems might be the best option. The fallback of just generating services is safe.

We could probably use "lvmconfig --type full" here instead. The "--type full" will get the actual setting if it exists and if not, it'll take the default value. And yes, even if that one fails, we should still generate the services... Thanks for noticing! I'll patch this.

Signature · 1 line
Peter