From nobody Fri Jul 15 16:08:03 2022 X-Original-To: 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 4Lkx9B59Qqz4T1cS for ; Fri, 15 Jul 2022 16:08:14 +0000 (UTC) (envelope-from v.velox@vvelox.net) Received: from vulpes.vvelox.net (vulpes.vvelox.net [98.102.84.2]) by mx1.freebsd.org (Postfix) with ESMTP id 4Lkx994z8qz3CsF for ; Fri, 15 Jul 2022 16:08:13 +0000 (UTC) (envelope-from v.velox@vvelox.net) Received: from vvelox.net (localhost [127.0.0.1]) (Authenticated sender: kitsune) by vulpes.vvelox.net (Postfix) with ESMTPA id E432DF079E; Fri, 15 Jul 2022 11:08:03 -0500 (CDT) 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 Date: Fri, 15 Jul 2022 11:08:03 -0500 From: "Zane C. B-H" To: Oleg Ginzburg Cc: fs@freebsd.org Subject: Re: ZFS dataset stats In-Reply-To: References: <42b403fd492b631ad14e97b7e8a9778f@vvelox.net> Message-ID: X-Sender: v.velox@vvelox.net Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Lkx994z8qz3CsF X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of v.velox@vvelox.net designates 98.102.84.2 as permitted sender) smtp.mailfrom=v.velox@vvelox.net X-Spamd-Result: default: False [-3.20 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_ALLOW(-0.20)[+ip4:98.102.84.2/32]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:10796, ipnet:98.102.80.0/20, country:US]; MLMMJ_DEST(0.00)[fs]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[vvelox.net]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Testing with changing it over one one of the VMs and that fails. zfs set volmode=geom storage/debian11-1/dsk1.vhd Even after that ztop and gstat show nothing. On 2022-07-15 08:14, Oleg Ginzburg wrote: > On Fri, Jul 15, 2022 at 8:05 AM Zane C. B-H > wrote: > >> So was just looking and for some reason nread etc for the ZFS >> storage >> stats. >> >> Below is a example of a ZFS dataset being used by CBSD to store a >> raw >> disk image, >> one that is running currently, but for some reasonn the R/W stats >> don't >> seem actually update. >> >> kstat.zfs.storage.dataset.objset-0x1d41.nread: 0 >> kstat.zfs.storage.dataset.objset-0x1d41.reads: 0 >> kstat.zfs.storage.dataset.objset-0x1d41.nwritten: 0 >> kstat.zfs.storage.dataset.objset-0x1d41.writes: 0 >> kstat.zfs.storage.dataset.objset-0x1d41.dataset_name: >> storage/debian10_test/dsk1.vhd >> >> Is there any way to get ZFS to actually keep these up to date for >> use >> cases >> like this? > > Try to switch default ZFS volmode properties in CBSD from 'dev' to > 'full' ( defaults: > https://github.com/cbsd/cbsd/blob/develop/etc/defaults/zfs.conf ), > e.g: > > cat > ~cbsd/etc/zfs.conf < default_ci_zvol_volmode="geom" > default_vm_zvol_volmode="geom" > volmode="geom" > EOF > > in this case, new VMs will be created in a 'geom' mode: > > # cbsd bcreate jname=vm1 vm_os_type=linux > vm_os_profile=CentOS-7-x86_64 vm_ram=1g vm_cpus=1 runasap=1 > imgsize=10g > > # zfs get volmode | grep dsk > jails/mybbuilder130/dsk1.vhd > volmode default default > jails/pxe1/dsk1.vhd > volmode dev local > jails/ubvdi1/dsk1.vhd > volmode default default > jails/vm1/dsk1.vhd > volmode full local > jails/windows1/dsk1.vhd > volmode default default > > if you are using cloud/gold images, you may have to delete and get > them again