From nobody Thu Apr 21 21:45:25 2022 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 EB0A0198BB01 for ; Thu, 21 Apr 2022 21:45:43 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oa1-f42.google.com (mail-oa1-f42.google.com [209.85.160.42]) (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 4Kkrgp4Z5Kz3v9J for ; Thu, 21 Apr 2022 21:45:42 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-e2fa360f6dso6727316fac.2 for ; Thu, 21 Apr 2022 14:45:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=4abzgOgCiajSE9zNAfSyM2h/NlA9BbTJnwqvuSu0e64=; b=nhWv/phWQIU3r2vMOa83M3OKTJpaV6xYANPRGi2WJtXWONURGx3V7uCdbiiilX6CKm PUTZ9WHIsR+evgeiHNNjwSJdDh2Z7ALcR2YB4ZCbyhrS4tVm3U/KWOhd9wu3cG4N7YTT F8cTAz67OXu69cL5SMy+1qPehXOHcT28E/bYpYpoblHnnc98FKULltW5VMY038Lob6zk EvOMeJ04p90MsaseSg6VWKTl2aqbSuxvpBvz/Bqtxn3+/AwM3F8tS3JTA/nNQaQcqoaJ TGFillg0G+JXiojGxQiWg8rKewz9wiEA0uLq1MRc4Sny3+evvGwSxkUUA8LLAG2Gdtj2 5RHQ== X-Gm-Message-State: AOAM532hjlh8HYZrs4JmUtVBpERAkXNMlVVtZIWJcnF2LMyaI6yldYke jQvvR5ZMoQpENCncqpsk2zApfBhBm6juWAi9qQaBbWrx X-Google-Smtp-Source: ABdhPJzfFrk5VrFvMU0VmB6HmS2UF9mkDJ4kZ2un3WK5LKBIb2xVOn6YLUWsZqOcfXkjRLlXu6z+o89BSnzKWmPIW+U= X-Received: by 2002:a05:6870:a2d2:b0:d7:60ca:5065 with SMTP id w18-20020a056870a2d200b000d760ca5065mr4853696oak.72.1650577536136; Thu, 21 Apr 2022 14:45:36 -0700 (PDT) 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: <94c10113c3964b1bbd3f4ddf934c23cd@MAIL-HUB.pai.local> In-Reply-To: From: Alan Somers Date: Thu, 21 Apr 2022 15:45:25 -0600 Message-ID: Subject: Re: ZFS reservations for type=volume To: Michael Jung Cc: freebsd-fs Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Kkrgp4Z5Kz3v9J X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.160.42 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.85 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.958]; FREEFALL_USER(0.00)[asomers]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[209.85.160.42:from]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_TLS_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; PREVIOUSLY_DELIVERED(0.00)[freebsd-fs@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.996]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[209.85.160.42:from]; MLMMJ_DEST(0.00)[freebsd-fs]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N Isn't 1.52T the "AVAIL" value, and 24.6T is the "USED"? On Thu, Apr 21, 2022 at 2:56 PM Michael Jung wrote: > > Ok that makes sense... so even though running ZFS since 9.x I'll ask the = newbie question.. > > If it contributes to the parents "used" value why is not reflected here i= n "USED" or in "AVAIL"? > > I would expect USED to be my reservation amount of 15.6T + whatever space= was > being used by other things on the pool. "USED" still sits at 1.52T. > > NAME TYPE USED AVAIL RATIO COMPRESS RESERV REFRESERV VOLSIZE > raid-5400-1 24.6T 1.52T 23.1T - - 2% 6% 1.00x ONLINE > > Thanks again. > > -----Original Message----- > From: Alan Somers [mailto:asomers@freebsd.org] > Sent: Thursday, April 21, 2022 4:40 PM > To: Michael Jung > Cc: freebsd-fs > Subject: Re: ZFS reservations for type=3Dvolume > > A dataset's reservation is local. It doesn't contribute to its parent's r= eservation. Otherwise, you wouldn't be able to separately set a reservation= on the parent. But it _does_ contribute to the parent's "used" value. In t= hat way, you're prevented from reserving too much data on the parent's chil= dren. > -Alan > > On Thu, Apr 21, 2022 at 2:28 PM Michael Jung wrote: > > > > I have a zfs block dataset raid-5400-1/esxi-store1 that I share as an > > iscsi target and that works great. I have set a reservation > > > > on that block device equal to its size so that is not sparse and thus > > while I could over provision guests on the provided LUN, > > > > the storage presented as the LUN capacity will always be available. At = least this is what I want to achieve. > > > > > > > > What I find strange is that the reservation does not seem to be > > applied to the ZFS pool =E2=80=98raid-5400-1=E2=80=99. Do you really ne= ed > > > > to set your maximum reservation at the pool level, and then apply > > reservations to all datasets on that volume? And if so > > > > I would assume you could never set reservations for datasets totaling m= ore than what was reserved for the pool =E2=80=98raid-5400-1=E2=80=99. > > > > > > > > I could build out a test environment and figure out constraints but I= =E2=80=99d really like to know the =E2=80=9Chow it is supposed to work=E2= =80=9D > > > > not the =E2=80=9Chow I find it to work=E2=80=9D. > > > > > > > > Thanks in advance. > > > > > > > > FreeBSD 14.0-CURRENT #4 main-n253875-8e72f458c6d: > > > > > > > > (this is a raidz2 pool =E2=80=93 not my draid pool) > > > > > > > > > > > > root@draid:/usr/src/contrib/bearssl # zfs list -o > > name,type,used,avail,ratio,compression,reservation,refreservation,vols > > ize raid-5400-1 > > > > NAME TYPE USED AVAIL RATIO COMPRESS RESERV REFRESERV VOLSIZE > > > > raid-5400-1 filesystem 18.0T 2.08T 1.36x on none none - <- no reservati= on @pool > > > > root@draid:/usr/src/contrib/bearssl # > > > > > > > > root@draid:/usr/src/contrib/bearssl # zfs list -o > > name,type,used,avail,ratio,compression,reservation,refreservation,vols > > ize raid-5400-1/esxi-store1 > > > > NAME TYPE USED AVAIL RATIO COMPRESS RESERV REFRESERV VOLSIZE > > > > raid-5400-1/esxi-store1 volume 16.9T 18.5T 1.78x zstd 15.6T 16.9T 15.6T= <- reservation @dataset > > > > > > > > root@draid:/usr/src/contrib/bearssl # zpool list > > > > NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT > > > > ccache 9.50G 9.10G 406M - - 88% 95% 1.00x ONLINE - > > > > raid-5400-1 24.6T 1.52T 23.1T - - 2% 6% 1.00x ONLINE - <- Free does not= reflect reservation @pool > > > > tank 18.5T 605G 17.9T - - 0% 3% 1.00x ONLINE - > > > > zfsroot 103G 33.3G 69.7G - - 31% 32% 1.00x ONLINE - > > > > root@draid:/usr/src/contrib/bearssl # > > > > > > > > > > > > CONFIDENTIALITY NOTE: This message is intended only for the use of the > > individual or entity to whom it is addressed and may contain > > information that is privileged, confidential, and exempt from > > disclosure under applicable law. If the reader of this message is not > > the intended recipient, you are hereby notified that any > > dissemination, distribution or copying of this communication is > > strictly prohibited. If you have received this transmission in error, > > please notify us by telephone at (502) 212-4000 or notify us at: PAI, > > Dept. 99, > > 2101 High Wickham Place, Suite 101, Louisville, KY 40245 > > > > > > > > > > > > Disclaimer > > > > The information contained in this communication from the sender is conf= idential. It is intended solely for use by the recipient and others authori= zed to receive it. If you are not the recipient, you are hereby notified th= at any disclosure, copying, distribution or taking action in relation of th= e contents of this information is strictly prohibited and may be unlawful. > > > > This email has been scanned for viruses and malware, and may have been = automatically archived by Mimecast, a leader in email security and cyber re= silience. Mimecast integrates email defenses with brand protection, securit= y awareness training, web security, compliance and other essential capabili= ties. Mimecast helps protect large and small organizations from malicious a= ctivity, human error and technology failure; and to lead the movement towar= d building a more resilient world. To find out more, visit our website. > > > > > CONFIDENTIALITY NOTE: This message is intended only for the use > of the individual or entity to whom it is addressed and may > contain information that is privileged, confidential, and > exempt from disclosure under applicable law. If the reader > of this message is not the intended recipient, you are hereby > notified that any dissemination, distribution or copying > of this communication is strictly prohibited. If you have > received this transmission in error, please notify us by > telephone at (502) 212-4000 or notify us at PAI, Dept. 99, > 2101 High Wickham Place, Suite 101, Louisville, KY 40245 > > > Disclaimer > > The information contained in this communication from the sender is confid= ential. It is intended solely for use by the recipient and others authorize= d to receive it. If you are not the recipient, you are hereby notified that= any disclosure, copying, distribution or taking action in relation of the = contents of this information is strictly prohibited and may be unlawful. > > This email has been scanned for viruses and malware, and may have been au= tomatically archived by Mimecast, a leader in email security and cyber resi= lience. Mimecast integrates email defenses with brand protection, security = awareness training, web security, compliance and other essential capabiliti= es. Mimecast helps protect large and small organizations from malicious act= ivity, human error and technology failure; and to lead the movement toward = building a more resilient world. To find out more, visit our website.