Package: fai-setup-storage
Version: 4.1.1
Severity: normal
lvm2 version 2.02.106-1 provides a new file lib/device/dev-type.c
which includes the following code in its _wipe_signature function:
if (!yes && (force == PROMPT) &&
yes_no_prompt("WARNING: %s detected on %s. Wipe it? [y/n] ",
type, name) != 'y')
return_0;
So when you're executing fai-setup-storage on a device where e.g. a
swap partition was present already on the device the lvcreate
command prompts for user feedback:
,---- [ steps to reproduce ]
| # lvcreate -n swap -L 247.46875 foobar
| Rounding up size to full physical extent 248.00 MiB
| Logical volume "swap" created
| # mkswap /dev/foobar/swap
| mkswap: /dev/foobar/swap: warning: don't erase bootbits sectors
| on whole disk. Use -f to force.
| Setting up swapspace version 1, size = 253948 KiB
| no label, UUID=df0760cd-9853-4ab9-babb-af66ce1d0fbc
| # lvremove /dev/foobar/swap
| Do you really want to remove active logical volume swap? [y/n]: y
| Logical volume "swap" successfully removed
| # lvcreate -n swap -L 247.46875 foobar
| Rounding up size to full physical extent 248.00 MiB
| WARNING: swap signature detected on /dev/foobar/swap. Wipe it? [y/n] n
| Logical volume "swap" created
`----
The problem is that fai-setup-storage doesn't handle this user
prompt, so fai-setup-storage is sadly hanging at this stage.
It's possible to bypass lvcreate's prompting by using the "--yes"
command line option (which is available for *all* lvm commands since
lvm tools version 2.02.99, didn't verify since which even older
version it's possible to use it for lvcreate) - so a config like
that works around this problem:
| disk_config lvm
| [...]
| foobar-swap swap RAM:50% swap sw lvcreateopts="--yes"
I'm not sure if assuming "--yes" as default option for lvcreate
inside fai-setup-storage is the best choice, but IF we decide to not
include it by default it should be at least mentioned in the docs.
regards,
-mika-
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: https://lists.debian.org/[email protected]