From nobody Mon Jan 23 20:15:56 2023 X-Original-To: freebsd-fs@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 4P11Zd4WYmz3bJMG for ; Mon, 23 Jan 2023 20:16:09 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-vk1-f174.google.com (mail-vk1-f174.google.com [209.85.221.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P11Zd2KcHz4LwP for ; Mon, 23 Jan 2023 20:16:09 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-vk1-f174.google.com with SMTP id i42so4678453vkd.0 for ; Mon, 23 Jan 2023 12:16:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=oLEhAID4+2vfvdU2P/0/PNhDmQ56Dyhk66P3l2zRZJM=; b=wIzW7reF8iPI8usdRjMeOcF/EGLggdHpfqJA0cZPRGZLbrM5CqvfCcOhqfk5/nkI7P mlpj4Dwg2jReC7ckyuCaWiiLVYfiVjAVAFblqCk98dD3eeynwf+CY6ypKE0s4ZmqCnWN nx+0TpBF2tGZJP+s3iBprEZJUQLgwoFKBj9iukyisEs9UFSpwzXqex+EFpa8yI8v8DP5 fXLSj01xvnB4+vuNvHp2/hqOQyw76ud2Zv8u1NNrUlAfnvPkYgasVpePTsnRb8r+FCwr l8yZnnsb9z5zk/Xs8mQEESFM/lxI4BXWPI0Y+noOrIcGMw+u8yFdtrXxQtObmtxD/KEw DMEg== X-Gm-Message-State: AFqh2koF7fASEisf2tA6OPRrdrri8d6s4T/IDy9owgq7bCtj+gOk1O4R 3sGwEZunObP/ltOU5SWzSy1TLYQjmkc2182V9n5n6/XM X-Google-Smtp-Source: AMrXdXvOwXwdPDUXxlbKHIiveFyNM3Luif05FDJYk27fioYJozMZmYfA+iaIn3tFxPgHe5MM/qQDDInKtLFhjS29CUo= X-Received: by 2002:a1f:19ca:0:b0:3bc:b5b1:c39c with SMTP id 193-20020a1f19ca000000b003bcb5b1c39cmr3086023vkz.19.1674504968415; Mon, 23 Jan 2023 12:16:08 -0800 (PST) List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 References: <056395aa-179b-bca6-de38-d804fba48ca7@quip.cz> In-Reply-To: <056395aa-179b-bca6-de38-d804fba48ca7@quip.cz> From: Alan Somers Date: Mon, 23 Jan 2023 13:15:56 -0700 Message-ID: Subject: Re: zpool list -p -v output does not follow manpage To: Miroslav Lachman <000.fbsd@quip.cz> Cc: "freebsd-fs@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4P11Zd2KcHz4LwP X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Mon, Jan 23, 2023 at 1:01 PM Miroslav Lachman <000.fbsd@quip.cz> wrote: > > If we have some sample pool and list verbose statistics we see following > output which is OK: > > # zpool list -v > NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP > HEALTH ALTROOT > tank0 492G 5.07G 487G - - 9% 1% 1.00x > ONLINE - > da0p3 492G 5.07G 487G - - 9% 1.02% > > > But when -p is added to make the output numbers parsable (exact values), > the numbers are exact for top level only and the output is nor parsable > nor easily human readable (broken columns): > > # zpool list -v -p > NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP > HEALTH ALTROOT > tank0 528280977408 5438681088 522842296320 - - > 9% 1 1.00x ONLINE - > da0p3 492G 5.07G 487G - - 9% 1.02% > > This behavior is not documented and I think it is unexpected. > > The same goes when we need to show just some of possible properties, > eg.: name and size: > > # zpool list -v -p -o name,size > NAME SIZE > tank0 528280977408 > da0p3 492G 5.06G 487G - - 9% 1.02% > > Name and Size is shown for top level but other properties are shown for > da0p3 which is again unexpected to me. > > This is on FreeBSD 12.3-p10, I don't have access to any newere version. > > Can somebody confirm if this is on newer versions too? > > And - can this be fixed? > > Kind regards > Miroslav Lachman It's working correctly for me on 13.1-RELEASE and 14.0-CURRENT.