From owner-freebsd-virtualization@freebsd.org Thu Jun 18 00:45:48 2020 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA54233C612 for ; Thu, 18 Jun 2020 00:45:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49nNXD53V5z3WrC for ; Thu, 18 Jun 2020 00:45:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id AD4EF33C3DA; Thu, 18 Jun 2020 00:45:48 +0000 (UTC) Delivered-To: virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB9A133C51F for ; Thu, 18 Jun 2020 00:45:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nNXD43kYz3Wg8 for ; Thu, 18 Jun 2020 00:45:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8618A28C20 for ; Thu, 18 Jun 2020 00:45:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 05I0jm8J058902 for ; Thu, 18 Jun 2020 00:45:48 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 05I0jmQq058901 for virtualization@FreeBSD.org; Thu, 18 Jun 2020 00:45:48 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 247367] Sometimes, GPT-labeled partitions don't appear in /dev/gpt/ in a FreeBSD BHYVE guest Date: Thu, 18 Jun 2020 00:45:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: 12.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: seb@boisvert.info X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 00:45:48 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D247367 Bug ID: 247367 Summary: Sometimes, GPT-labeled partitions don't appear in /dev/gpt/ in a FreeBSD BHYVE guest Product: Base System Version: 12.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bhyve Assignee: virtualization@FreeBSD.org Reporter: seb@boisvert.info Actual result ------------- According to "glabel", my disk has 3 GPT labels: root@nova:~ # gpart show -l =3D> 40 41942960 vtbd0 GPT (20G) 40 216 - free - (108K) 256 1024 1 boot0 (512K) 1280 39844608 2 root0 (19G) 39845888 2097112 3 swap0 (1.0G) But in /dev/gpt/, only boot0 is detected. root@nova:~ # ls /dev/gpt boot0 Also, "glabel refresh" fails too: root@nova:~ # glabel refresh vtbd0 Can't refresh metadata from vtbd0: Operation not permitted. I don't think that GPT labels depends on the type of disk (VirtIO, AHCI/SAT= A,=20 , SCSI, and so on). Expected result --------------- I expect to see 3 entries in /dev/gpt/, namely: - /dev/gpt/boot0 - /dev/gpt/root0 - /dev/gpt/swap0 I am only seeing /dev/gpt/boot0. Why this is important --------------------- This is annoying because in the BHYVE guest config file, I want to change the disk type from virtio-blk to ahci-hd since virtio-blk does not support = TRIM and ahci-hd does. In Linux, I use /dev/disk/by-uuid/* to avoid using the /dev/something-not-portable. BHYVE guest config ------------------ root@atlantis:~ # cat /tank/vm-bhyve/nova/nova.conf loader=3D"bhyveload" cpu=3D1 memory=3D256M network0_type=3D"virtio-net" network0_switch=3D"public" disk0_type=3D"virtio-blk" disk0_name=3D"disk0" disk0_dev=3D"zvol" uuid=3D"788979be-a7b4-11ea-a49d-a8a15906202d" network0_mac=3D"58:9c:fc:0c:50:9c" Disk ZVOL in the BHYVE host --------------------------- Inside the VM, only 5.4G is Used: root@nova:~ # df -h / Filesystem Size Used Avail Capacity Mounted on /dev/vtbd0p2 18G 5.4G 12G 32% / But the FreeBSD 12.1 guest has a ZVOL with REFER=3D20.1G: root@atlantis:~ # zfs list tank/vm-bhyve/nova/disk0 NAME USED AVAIL REFER MOUNTPOINT tank/vm-bhyve/nova/disk0 20.6G 5.04T 20.1G - Comparison with a Debian guest ------------------------------ Inside the VM, Used is 1.1G. capside@capside:~$ df -h / Filesystem Size Used Avail Use% Mounted on /dev/sda1 125G 1.1G 118G 1% / And the corresponding ZVOL has a REFER=3D4.13G. root@atlantis:~ # zfs list tank/vm-bhyve/capside/disk0 NAME USED AVAIL REFER MOUNTPOINT tank/vm-bhyve/capside/disk0 132G 5.17T 4.13G - --=20 You are receiving this mail because: You are the assignee for the bug.=