From nobody Thu Sep 12 18:08:51 2024 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 4X4QRl5tvzz5WQBv for ; Thu, 12 Sep 2024 18:08:51 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X4QRl2fQHz4b6S for ; Thu, 12 Sep 2024 18:08:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726164531; a=rsa-sha256; cv=none; b=C7wpwcClNlXHVs9aBLz/QRMYm8f/+BbUve3BaigLnCalP9w7GUB6bjCsY0SXxvkyiOpzF3 EPlEl9aRE5gO57ebHJK3hx7sycSckM0c++m9vk1E5lpciy7s+WffNNkRXv7IwDhAFJxFe2 wWEP8uekcBH12+BS9VwS72wECZkAKy16O01WT8EkaTBHZb1UBTepynzfd/qZzwJB+/sW5S 8J8DxuDabO+fP3gSSxPU1qLBqrIO4AlH5IlNg+caTZBshn9UlgkJntVyMJHBIBvsUkxj6y TyKAt6puDh0Vws7DsH0JK8h4z0PoKi0or5LY4R8A2+mTu5AeJHX9KIyYDbIigQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726164531; 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: in-reply-to:in-reply-to:references:references; bh=UNAHnq3dDQ6+hXrDkzBspMqXVOE2gZpB4Z17LZRAZkk=; b=LeLt2cjusjzfFEGgsXRem4UeWgMpDhqe7c7tONqFeCFFp2yE/J6NGOSIguXMyUKGolYbL5 nQb0/UBkNa8h3G5yGxC8fIFsK/GP3dcRb9qKwsIT3Scp5MqPJ4fwergO8pLeo7Z4kGGHjQ xdtllmX+iS92pGNcDDiyp+UypSEK3+lziVqxu1EdyOwAVXbOG9nDeC780W8qq4fE7XRwSM 0ukQZVSEYir3lkoZLUxR5jVpd4Bb/QXGXYBrqMj7MxW7JH5kDM/4ZwtEpMiBQ6pN+CDJh+ l2+4RjaNowUXwbhw/+j2w0/IYs2dLTxrRZ0h5vsEQ7ZSLS/2R2I9E39bBfLNCQ== 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 4X4QRl2Cj5z1Ny9 for ; Thu, 12 Sep 2024 18:08:51 +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 48CI8pjk061544 for ; Thu, 12 Sep 2024 18:08:51 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 48CI8pmV061543 for bugs@FreeBSD.org; Thu, 12 Sep 2024 18:08:51 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 281456] makefs zfs is tricky to get right with multiple partitions, matching freebsd install default Date: Thu, 12 Sep 2024 18:08:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 14.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: pat@patmaddox.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281456 --- Comment #3 from Pat Maddox --- > The release scripts use the following invocation Ah good to know about that, thanks. Next time I will grep the code base to = see where the tools might be being used. The tests were very helpful though. > Would it be useful to include that as an example in the makefs man page? I think so. Even a simplified example would be helpful, along the lines of = the layout that I showed above. And maybe a script in examples/. I share Ed's t= ake that either one would get out of sync with the installer. I think on the lo= wer end of effort, a simplified example in man page is fine, plus a note to find the complete & current invocation in the release script. A smaller note: the man page says "fs-options is a comma-separated list of options." I didn't realize I could pass -o multiple times, so was doing stu= ff like -o poolname=3Dzroot,rootpath=3D/,fs=3Dzroot/foo\;mountpoint=3D/foo\;canmount= =3Don,fs=3Dzroot/bar\;mountpoint=3D/foo\;canmount=3Don. Perhaps it's convention that comma-separated can be split into multiple arg= s, I don't know - but multiple -o was more natural and easier to read, which I g= ot from the tests. > What ordering constraints were causing problems? After another look, I don't think it was an order issue. Rather it looks li= ke the expectations around datasets mounted at /. The scenarios I came up with are: 1. Defining a dataset with mountpoint=3D/, while not defining the root data= set. I think this is an implicit example of 1a. 1a. Defining the root dataset with mountpoint=3D/ and another dataset with = it. 2. Defining root dataset to have mountpoint!=3Drootpath, and no dataset with mountpoint=3Drootpath An interesting variation of 1a is that it's possible to define two datasets with same mountpoint, even if both canmount. So it seems limited to / or rootpath. --- Example 1: Additional dataset with mountpoint=3D/, root dataset undefined makefs -t zfs -s 64m -o poolname=3Dzroot -o rootpath=3D/ -o fs=3Dzroot/ROOT\;mountpoint=3Dnone -o fs=3Dzroot/ROOT/default\;mountpoint= =3D/ test.img foo ZFS support is currently considered experimental. Do not use it for anything critical. Assertion failed: (cur->inode->param =3D=3D NULL), function fs_layout_one, = file /home/patmaddox/wip/.trees/infra-pdt-rewrite/infra/pdt/freebsd-src.git/b/st= able/14/usr.sbin/makefs/zfs/fs.c, line 886. Abort trap (core dumped) --- Example 1a: Additional dataset with mountpoint=3D/, root dataset explicit mountpoint=3D/ (succeeds if canmount=3Doff) makefs -t zfs -s 64m -o poolname=3Dzroot -o rootpath=3D/ -o fs=3Dzroot\;mou= ntpoint=3D/ -o fs=3Dzroot/ROOT\;mountpoint=3Dnone -o fs=3Dzroot/ROOT/default\;mountpoin= t=3D/ test.img foo ZFS support is currently considered experimental. Do not use it for anything critical. Assertion failed: (cur->inode->param =3D=3D NULL), function fs_layout_one, = file /home/patmaddox/wip/.trees/infra-pdt-rewrite/infra/pdt/freebsd-src.git/b/st= able/14/usr.sbin/makefs/zfs/fs.c, line 886. Abort trap (core dumped) makefs -t zfs -s 64m -o poolname=3Dzroot -o rootpath=3D/ -o fs=3Dzroot\;mountpoint=3D/\;canmount=3Doff -o fs=3Dzroot/ROOT\;mountpoint= =3Dnone -o fs=3Dzroot/ROOT/default\;mountpoint=3D/ test.img foo ZFS support is currently considered experimental. Do not use it for anything critical. --- example 2: solo root dataset with mountpoint!=3Drootpath makefs -t zfs -s 64m -o rootpath=3D/ -o poolname=3Dzroot -o fs=3Dzroot\;mountpoint=3D/zroot main.zfs foo ZFS support is currently considered experimental. Do not use it for anything critical. Segmentation fault (core dumped) --- bonus: two datasets with same mountpoint succeeds makefs -t zfs -s 64m -o poolname=3Dzroot -o rootpath=3D/ -o fs=3Dzroot/foo\;mountpoint=3D/foo -o fs=3Dzroot/bar\;mountpoint=3D/foo test= .img foo makefs -t zfs -s 64m -o poolname=3Dzroot -o rootpath=3D/ -o fs=3Dzroot/foo\;mountpoint=3D/foo -o fs=3Dzroot/bar\;mountpoint=3D/foo test= .img foo ZFS support is currently considered experimental. Do not use it for anything critical. --=20 You are receiving this mail because: You are the assignee for the bug.=