NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/57409: Feature request: Make GPT detection on VND configuration optional (and/or disable it if configuration is originated from xbdback)
>Number: 57409
>Category: kern
>Synopsis: Feature request: Make GPT detection on VND configuration optional (and/or disable it if configuration is originated from xbdback)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 16 00:00:00 +0000 2023
>Originator: Matthias Petermann
>Release: NetBSD-10.0_BETA
>Organization:
>Environment:
NetBSD vhost2.local 10.0_BETA NetBSD 10.0_BETA (XEN3_DOM0) #0: Mon May 8 07:40:40 UTC 2023 root@ws.local:/build/netbsd-10/obj/sys/arch/amd64/compile/XEN3_DOM0 amd64
>Description:
This is a follow up to a discussion on IRC #netbsd. First of all, many thanks to Riastradh for the incredible support not only on this issue.
If a file image is used as backing store for a Xen XBD, the xbdback driver uses the vnd driver to access the file. This means that a new instance of a VND is configured on first access. This in turn leads to the kernel of the host recognizing any GPT header present in the image and creating the GPT partitions as wedges.
This can lead to problems if:
- the GUID of the GPT is already known in the system
- the GUID of the GPT partition is known in the system
This leads to error messages in the kernel log like this:
[ 11060.300428] vnd8: GPT GUID: be7ea2d1-9c20-4bb4-a0dd-b46c4aa33c7f
[ 11060.300428] autoconfiguration error: vnd8: wedge named '28f2f543-a579-4f52-a828-24436ff6fc94' already exists, manual intervention required
[ 11060.300428] autoconfiguration error: vnd8: wedge named 'f97bc22f-3294-44e7-9813-ff726dc478ad' already exists, manual intervention required
[ 11060.372726] xbd backend: attach device vnd8d (size 33554432) for domain 15
Functionally this does not lead to any limitation, it is rather the error message that confuses and the feeling that the host should not try to interfere with the file images unless it is explicitly desired.
>How-To-Repeat:
Both occur reproducibly if, for example, a "golden" file image is copied several times for a mass deployment of virtual machines and then used simultaneously as a backing store on the same host. in this case, the kernel issues an error message for autoconfiguration.
For testing it should be sufficient to create a new image with dd, configure it as VND, create a GPT with a partition on it and format it with FFS. Then unconfigure, copy the image to a second file and now copy both images one after the other with vndconfig. When configuring the second image, the error message should appear.
>Fix:
Ideally, it would be possible to selectively prevent the detection of the GPT in VNDs. In addition (or if it's the only use case, also like to be exclusive for it) it would certainly make sense to make this the default for VNDs configured by xbdback.
Home |
Main Index |
Thread Index |
Old Index