Date: Fri, 15 Jul 2022 16:14:26 +0300 From: Oleg Ginzburg <olevole@olevole.ru> To: "Zane C. B-H" <v.velox@vvelox.net> Cc: fs@freebsd.org Subject: Re: ZFS dataset stats Message-ID: <CAMsb%2BmYJ2Nwd1UCYPrs2RVsSNnaKKGH_u0KVH11M4Qm12RGRvQ@mail.gmail.com> In-Reply-To: <42b403fd492b631ad14e97b7e8a9778f@vvelox.net> References: <42b403fd492b631ad14e97b7e8a9778f@vvelox.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000d1a65b05e3d7cc3c Content-Type: text/plain; charset="UTF-8" On Fri, Jul 15, 2022 at 8:05 AM Zane C. B-H <v.velox@vvelox.net> 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 <<EOF 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 --000000000000d1a65b05e3d7cc3c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Fri, Jul 15, 2022 at 8:05 AM Zane = C. B-H <<a href=3D"mailto:v.velox@vvelox.net">v.velox@vvelox.net</a>>= wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px = 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">So was j= ust looking and for some reason nread etc for the ZFS storage <br> stats.<br> <br> Below is a example of a ZFS dataset being used by CBSD to store a raw <br> disk image,<br> one that is running currently, but for some reasonn the R/W stats don't= <br> seem actually update.<br> <br> kstat.zfs.storage.dataset.objset-0x1d41.nread: 0<br> kstat.zfs.storage.dataset.objset-0x1d41.reads: 0<br> kstat.zfs.storage.dataset.objset-0x1d41.nwritten: 0<br> kstat.zfs.storage.dataset.objset-0x1d41.writes: 0<br> kstat.zfs.storage.dataset.objset-0x1d41.dataset_name: <br> storage/debian10_test/dsk1.vhd<br> <br> Is there any way to get ZFS to actually keep these up to date for use <br> cases<br> like this?<br> <br></blockquote><div><br></div><div>Try to switch default ZFS volmode prop= erties in CBSD from 'dev' to 'full' ( defaults: <a href=3D"= https://github.com/cbsd/cbsd/blob/develop/etc/defaults/zfs.conf">https://gi= thub.com/cbsd/cbsd/blob/develop/etc/defaults/zfs.conf</a> ), e.g:<br><br></= div>cat > ~cbsd/etc/zfs.conf <<EOF<br>default_ci_zvol_volmode=3D&q= uot;geom"<br>default_vm_zvol_volmode=3D"geom"<br>volmode=3D&= quot;geom"<br>EOF<br><br></div><div class=3D"gmail_quote">in this case= , new VMs will be created in a 'geom' mode:<br><br># cbsd bcreate j= name=3Dvm1 vm_os_type=3Dlinux vm_os_profile=3DCentOS-7-x86_64 vm_ram=3D1g v= m_cpus=3D1 runasap=3D1 imgsize=3D10g<br><br># zfs get volmode | grep dsk<br= >jails/mybbuilder130/dsk1.vhd =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0volmode =C2=A0 default =C2=A0defau= lt<br>jails/pxe1/dsk1.vhd =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 volmode = =C2=A0 dev =C2=A0 =C2=A0 =C2=A0local<br>jails/ubvdi1/dsk1.vhd =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 volmode =C2=A0 default =C2=A0default<br>jails/vm1/dsk1= .vhd =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0volmode =C2=A0 full =C2= =A0 =C2=A0 local<br>jails/windows1/dsk1.vhd =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 volmo= de =C2=A0 default =C2=A0default<br><br>if you are using cloud/gold images, = you may have to delete and get them again</div></div> --000000000000d1a65b05e3d7cc3c--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMsb%2BmYJ2Nwd1UCYPrs2RVsSNnaKKGH_u0KVH11M4Qm12RGRvQ>