From nobody Mon Mar 21 19:29:53 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 561881A26B78 for ; Mon, 21 Mar 2022 19:29:53 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KMl7P0NM2z4SNF for ; Mon, 21 Mar 2022 19:29:53 +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 E2171211B7 for ; Mon, 21 Mar 2022 19:29:52 +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 22LJTqnr004512 for ; Mon, 21 Mar 2022 19:29:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 22LJTqkr004511 for bugs@FreeBSD.org; Mon, 21 Mar 2022 19:29:52 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: bugs@FreeBSD.org Subject: [Bug 262710] glabel labels should not be created for snapshots of zvols Date: Mon, 21 Mar 2022 19:29:53 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: d8zNeCFG@aon.at X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@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 List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647890993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SWumYUUbzYsoVoBYNle00SPRgrrNrysaHvohxdCFPOM=; b=JR6r0RiSKCuQKBftrp+81n8ZxcThfy61lrjGZYm8Ox74tXmaCRoQz4l02yCUCDC9VRzy7d XnJFgm06XFkCLEuYw5eZcfTOYuP8j5Ix91loLmbpmc/tSodhl5AOHuJ08uH3zuGaCOq6v8 Y4ME7iRqvXhQS80d3uBeXSUYPTEg6oIBe+geWPVKo6PqjLhUbbUVme3l9bTw01fEb42GTz hVXuK3XH55Boy5NuRBatHfPqSw9cCXHBCGW+UQ5qJrwod1zLLxdmNUo2c1PS6WIzkMcJpk nwvJcyu97mgrMmkfTKNwA1CRSOg7i1T2SUGE4oLwb7eS0K7BX8duZbqBVTZkbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647890993; a=rsa-sha256; cv=none; b=hp2dwF6uelmBHYbXp1XiXgUclAnMLdNJ/v0nf+39SI5nA2kLd8ji+R0RkVa47jK1/QilQc uVOC0R8FFOC8WwGWgDcdyd+/jEzvj9WVkpFFJnHPaynjRzpKvP6bRMBAC75yKXzpcXipvc flwaoZriiRlXG8osrJ/YiFBXzJNCk8gu5Wg2Hliun7F6AZ8wfiLnUIZFnv5uuKNkRiBHkj MZ85s9WXIgGDMwWo7B1W5lNDznh4dq2D50kJ4zsazoym0oxk6c9COcCZSCp8oFDTb0tOmt rG35SXSahCa3wi2OkZAtoPXsXnSjD1JvzFnPaU4UYOVDYupLtKnhCtXPoLJCQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262710 Bug ID: 262710 Summary: glabel labels should not be created for snapshots of zvols Product: Base System Version: 12.3-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: d8zNeCFG@aon.at Note: This ticket contains both a defect report and a feature request. At l= east the former should be addressed. =3D=3D=3D Defect report =3D=3D=3D Scenario: - FreeBSD 12.3 latest patches - Many zvols which serve as virtual disks for virtual machines, some of the= se running FreeBSD - The vdisks are exported via iSCSI to various virtualization technologies = such as bhyve, VirtualBox, Hyper-V, etc. They appear there as /dev/daX, /dev/ada= X, /dev/vtblkX, etc. - The vdisks are sliced/partitioned for FreeBSD in the "old-fashioned" way:= s4a for /, s4b for swap, s4d for /usr. - In order to enable seamless booting of FreeBSD under these various virtualization technologies, the partitions carrying UFS filesystems get a = UFS filesystem label, and the swap partitions get a glabel label. - Therefore, in a typical FreeBSD VM, in /etc/fstab there are lines such as /dev/ufs/disk904s4a / ufs rw 7 1 /dev/label/disk904s4b none swap sw 0 0 /dev/ufs/disk904s4d /usr ufs rw 7 2 Result: - The labeled slices/partitions in the zvols (also) appear directly in the filesystem server's /dev/ufs and /dev/label. This is expected and desirable because sometimes operations are done directly from the filesystem server (e.g., mounting a UFS filesystem for inspection when it is not in use by a = VM). Scenario (continued): - For backup purposes, daily snapshots of all zvols are taken. - Due to an oversight, one day the zvol/slice/partition in which the labeled geom disk904s4b resides is cleared (using dd if=3D/dev/zero...) Result (continued): - On the filesystem server, /dev/label/disk904s4b still exists. Investigati= ng with "glabel list" shows that it corresponds to a randomly selected snapsho= t of the zvol carring the vdisk 904 (a snapshot taken before the clearing of the label). Expected result (defect report): - Leaves for UFS, glabel, etc. labels should not be created from the slices/partitions of snapshot zvols. =3D=3D=3D Feature request =3D=3D=3D Scenario (continued): - For backup purposes, the snapshots are replicated (using zfs send/zfs receive) to another zpool connected to the same filesystem server. The back= up zpool is connected (imported) only during the time the backup is taken. Result: - On the filesystem server, when the backup zpool is imported, the labeled nodes of its zvols supplant the ones of the original zpool in /dev/ufs and /dev/label (because they carry the identical label names). - This causes i/o to these devices to reach the backup zvol instead of the original. Expected result (feature request): - It should be possible to disable, at least on the level of zpools and preferably on the level of zvols, the creation of labels. Thank you for your patience for reading till here. ;-) -- Martin --=20 You are receiving this mail because: You are the assignee for the bug.=