From nobody Mon Jan 23 20:25:59 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 4P11pL2HGWz3bKYb for ; Mon, 23 Jan 2023 20:26:18 +0000 (UTC) (envelope-from bsdlists@jld3.net) Received: from mail.jld3.net (mail.jld3.net [45.55.236.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4P11pK2HBYz4Mq4 for ; Mon, 23 Jan 2023 20:26:17 +0000 (UTC) (envelope-from bsdlists@jld3.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=jld3.net header.s=8d052f02dde2 header.b=e3xNSMvr; spf=pass (mx1.freebsd.org: domain of bsdlists@jld3.net designates 45.55.236.93 as permitted sender) smtp.mailfrom=bsdlists@jld3.net; dmarc=pass (policy=quarantine) header.from=jld3.net Received: from localhost (localhost [127.0.0.1]) by mail.jld3.net (Postfix) with ESMTP id 263F641604 for ; Mon, 23 Jan 2023 13:26:11 -0700 (MST) X-Virus-Scanned: amavisd-new at jld3.net Received: from mail.jld3.net ([127.0.0.1]) by localhost (mail.jld3.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jFhHD-MNaPOn for ; Mon, 23 Jan 2023 13:26:09 -0700 (MST) Received: from [172.21.35.231] (c-76-154-109-25.hsd1.co.comcast.net [76.154.109.25]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jld) by mail.jld3.net (Postfix) with ESMTPSA id 4648340551 for ; Mon, 23 Jan 2023 13:26:09 -0700 (MST) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.jld3.net 4648340551 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.jld3.net 4648340551 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jld3.net; s=8d052f02dde2; t=1674505569; bh=rCfvu9XjdTwPcc7n/CoTWL6F9/VtsTlAlT746PAHF8I=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=e3xNSMvrGOT/p0C8Lr+gFCif6E8JlWTBKOuf6ApxLwfDF8g9ElpYinc+c9+1dTZpu PXD1CWOwT7KhoO7iJP4oyF3L8uY/IXgTZt/Npb/RG1NSFrtpiUJU29yZWTNuqxycXm kdp27jdXn9q2SPzdGVZYbocG3xEaswlrta84I4DA= From: "John Doherty" To: freebsd-fs@freebsd.org Subject: Re: zpool list -p -v output does not follow manpage Date: Mon, 23 Jan 2023 13:25:59 -0700 X-Mailer: MailMate (1.13.2r5673) Message-ID: <896F9EA3-35F1-4447-AE38-9AB44E919A56@jld3.net> In-Reply-To: References: <056395aa-179b-bca6-de38-d804fba48ca7@quip.cz> 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 Content-Type: text/plain; format=flowed X-Spamd-Result: default: False [-3.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.989]; DMARC_POLICY_ALLOW(-0.50)[jld3.net,quarantine]; R_SPF_ALLOW(-0.20)[+ip4:45.55.236.93]; R_DKIM_ALLOW(-0.20)[jld3.net:s=8d052f02dde2]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-fs@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[jld3.net:+]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:14061, ipnet:45.55.192.0/18, country:US]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4P11pK2HBYz4Mq4 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On Mon 2023-01-23 01:15 PM MST -0700, wrote: > 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. Also fine for me on 13.1-RELEASE but not 12.4-RELEASE: [root@ss2] # freebsd-version -k ; zpool list -v -p zpX 12.4-RELEASE NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT zpX 1006632960 93696 1006539264 - - 0% 0 1.00x ONLINE - mirror 960M 91.5K 960M - - 0% 0.00% /vd/vd00 - - - - - - - /vd/vd01 - - - - - - -