On Mon, 25 May 2026 07:19:35 -0400
Greg Troxel <[email protected]> wrote:
> Could you post a link to your test program?
>
It is a closed source binary. I can share it with a few NetBSD
developers for the purpose of debugging this issue, provided they keep
it confidential and do not redistribute the binary. Otherwise, you can
try simulating similar I/O patterns with your preferred open source
alternatives.
> What about cgd without lvm?
>
I can try it over the next few days. At this stage I'm not sure if it
is cgd, lvm, or something else, hence I'm trying to understand if
anyone else observed similar issues.
> What about 10.1 on bare metal?
>
I don't have any spare amd64 physical hardware for this test.
> Any reason you are using 10.1 intead of the tip of netbsd-10?
>
The 10.1 is the official release for which prebuilt ISO image are
available. I can build from sources, but I don't have a lot of spare
time to try different combinations of NetBSD. I also reproduced the
same issue with 11.0_RC2.
> You say bhyve, and I think you mean host/dom0 is FreeBSD using bhyve and
> you have NetBSD 10.1 as a VM hosted on that. Do you mean that, or
> something else? What do the virtual disks look like?
>
FreeBSD-15 host using Bhyve as hypervisor and running NetBSD VM.
Hypervisor VM config:
graphics="yes"
xhci_mouse="yes"
cpu=8
memory=8G
wired_memory="yes"
network0_type="virtio-net"
network0_switch="public"
disk0_type="nvme"
disk0_name="disk0.img"
disk0_dev="file"
NetBSD VM disk partitions:
gpt show -a ld0
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 2014 Unused
2048 262144 1 GPT part - EFI System
Type: efi
TypeID: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
GUID: 25ef855c-7cfe-4c80-b054-d9de73215c73
Size: 128 M
Label: boot-efi
Attributes: None
264192 4194304 2 GPT part - NetBSD FFSv1/FFSv2
Type: ffs
TypeID: 49f48d5a-b10e-11dc-b99b-0019d1879648
GUID: 59a4d833-77ba-487d-8a29-e4bba45d5ecf
Size: 2048 M
Label: root
Attributes: None
4458496 4194304 3 GPT part - NetBSD swap
Type: swap
TypeID: 49f48d32-b10e-11dc-b99b-0019d1879648
GUID: e5c7a155-2405-429a-bf9e-e97785e8475c
Size: 2048 M
Label: swap
Attributes: None
8652800 125562880 4 GPT part - NetBSD Cryptographic Disk
Type: cgd
TypeID: 2db519ec-b10f-11dc-b99b-0019d1879648
GUID: 395978be-4314-4e9d-a968-88ac119b9036
Size: 61310 M
Label: cgd
Attributes: None
134215680 2015 Unused
134217695 32 Sec GPT table
134217727 1 Sec GPT header
CGD created with:
cgdconfig -g -o /etc/cgd/cgd0_params -k argon2id -V gpt adiantum
cgdconfig -V re-enter cgd0 /dev/dk3 /etc/cgd/cgd0_params
gpt create -f cgd0
gpt add -a 1m -l "cgd-lvm" -t linux-lvm cgd0
cat > /etc/cgd/cgd.conf << 'EOF'
# cgd target [paramsfile]
cgd0 NAME=cgd /etc/cgd/cgd0_params
EOF
LVM created with:
dkctl cgd0 listwedges
/dev/rcgd0: 1 wedge:
dk4: cgd-lvm, 125558784 blocks at 2048, type:
lvm pvcreate /dev/rdk4
lvm vgcreate vg0 /dev/rdk4
lvm lvcreate -l 100%FREE -n data vg0
newfs -O 2ea /dev/vg0/data