From owner-freebsd-current@freebsd.org Fri Feb 3 15:27:49 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2221CCE701; Fri, 3 Feb 2017 15:27:49 +0000 (UTC) (envelope-from ultima1252@gmail.com) Received: from mail-yb0-x22c.google.com (mail-yb0-x22c.google.com [IPv6:2607:f8b0:4002:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F80FC59; Fri, 3 Feb 2017 15:27:49 +0000 (UTC) (envelope-from ultima1252@gmail.com) Received: by mail-yb0-x22c.google.com with SMTP id 123so6869657ybe.3; Fri, 03 Feb 2017 07:27:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=90z5R+cAE8kRp+53gjHy5SjNSxArbYP8OHsumqA/KhI=; b=kN/HAPFFp2mxF40sPpRcerux4+folvEhDEEJ+JKf6eE2TV7/W8MbG9S5ui5l6JvwlM wRawdPuksTlE3kHOh8FlK2RqaZn/UJjL0iHR0BaJRHwxUT7maWa/rHi2D2ZnBIKYlCf3 8DGg/wCXVfl/lnZpeiKO8gq2SMTM+6xYY1vgnWygPNG7omWxJdi/jsrcbTr4CV37XdF+ xcbVPXAjsSJvwmwgrpBtX1dKsoAkZ+b9fgsadZH+i3v8jksgHEt+5SlSeF/Ldj9/OMps uk2Oc5uYMFECkp7Z6yZg2hm55ytVZDxAKeTZfQUfreUE8bY2onzvpreKBuZeC/ubzFUi GRUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=90z5R+cAE8kRp+53gjHy5SjNSxArbYP8OHsumqA/KhI=; b=MEz5yiywi1GIDNQpmQ8OTVNyGtnZDz1RqUDOjoe0LiChF5SJJrglxeQbgMsdM8TEmd wsIiiRdDn6SeTtCGm9t10q6ZV9Htjjfz/TyD8+RjCOMrIgS+KpyHWi1Cvhj7zzSvziSq cjhmYbrbVjmCiROHI74KI3QcosVeB3ZLMPjqbzKYIB40wjdyGydkkX5bg8FWPI9jUZwx Il6kBBMUcdRZXBM5zDSslqYFGU9u4m5wbCVhzRYMaGM5YPvParbPDh2V5V2fWnhU8R3n diihIRL4KRN5ZDfeJA2PlIJNwWzXoZ3ndx0OxyEOlJkYxoXh2jYDsCOcmCg6jWQJHKZy hJDQ== X-Gm-Message-State: AIkVDXJKncecFJDMjmkV9241CdcxuTYc5V6h4lizevSjsCF+oYUhI7c6ig7km9Xwwv4dV9rJH8vApkZGOthrAA== X-Received: by 10.37.248.2 with SMTP id u2mr6440810ybd.52.1486135668573; Fri, 03 Feb 2017 07:27:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.52.65 with HTTP; Fri, 3 Feb 2017 07:27:48 -0800 (PST) In-Reply-To: <20170203124251.GA68015@in-addr.com> References: <20170203124251.GA68015@in-addr.com> From: Ultima Date: Fri, 3 Feb 2017 10:27:48 -0500 Message-ID: Subject: Re: zfs snapshot_limit is not respected To: Gary Palmer Cc: freebsd-stable@freebsd.org, freebsd-current@freebsd.org, freebsd-fs@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 15:27:50 -0000 Hey Gary, You are probably right. Do you know how to "lock" this property by chance? I'v read this exact line several times trying to understand the exact meaning. The "user is allowed to change the limit" I *think* is referring to the zfs allow command. The problem is that I checked the dataset and it is showing no permissions granted to a user. So I guess user in this case is also including the root user, but how does one lock the property from root? I keep going through the manpage looking for something I may have missed but keep coming up empty. Thanks for replying, Ultima On Fri, Feb 3, 2017 at 7:42 AM, Gary Palmer wrote: > On Thu, Feb 02, 2017 at 09:31:58PM -0500, Ultima wrote: > > I recently moved some data on a box with limited space. I decided I > should > > limit the snapshots so that space would not become an issue. I just check > > back a week later to find out the box is hitting the borderline. Doing I > > quick check I realized that the snapshot_limit is not being respected. > > > > # uname -a > > FreeBSD R1 11.0-STABLE FreeBSD 11.0-STABLE #17 r312232: Sun Jan 15 > 10:59:10 > > EST 2017 root@S1:/usr/src/11-STABLE/obj/usr/src/11-STABLE/src/sys/ > MYKERNEL > > amd64 > > > > # zfs create zroot/bhyve/test > > # zfs set snapshot_limit=0 zroot/bhyve/test > > # zfs snapshot zroot/bhyve/test@1 > > > > > > # zfs snapshot zroot/bhyve/test@2 > > # zfs snapshot zroot/bhyve/test@3 > > # zfs list -t snapshot | grep zroot/bhyve/test > > zroot/bhyve/test@1 0 - > > 88K - > > zroot/bhyve/test@2 0 - > > 88K - > > zroot/bhyve/test@3 0 - > > 88K - > > # zfs get all zroot/bhyve/test | grep snapshot > > zroot/bhyve/test usedbysnapshots 0 - > > zroot/bhyve/test snapshot_limit 0 local > > zroot/bhyve/test snapshot_count 3 local > > > > Also wanted to verify 0 was not being mistaken for none. > > > > # for snapshot in `zfs list -t snapshot | grep zroot/bhyve/test | awk > > '{print $1}'`; do zfs destroy $snapshot ; done > > > > # zfs get all zroot/bhyve/test | grep snapshot > > zroot/bhyve/test usedbysnapshots 0 - > > zroot/bhyve/test snapshot_limit 0 local > > zroot/bhyve/test snapshot_count 0 local > > > > # zfs set snapshot_limit=1 zroot/bhyve/test > > # zfs snapshot zroot/bhyve/test@1 > > # zfs snapshot zroot/bhyve/test@2 > > # zfs snapshot zroot/bhyve/test@3 > > # zfs get all zroot/bhyve/test | grep snapshot > > zroot/bhyve/test usedbysnapshots 0 - > > zroot/bhyve/test snapshot_limit 1 local > > zroot/bhyve/test snapshot_count 3 local > > > > > > Also tested on head > > FreeBSD S1 12.0-CURRENT FreeBSD 12.0-CURRENT #26 r312388: Wed Jan 18 > > 12:38:52 EST 2017 > > root@S1:/usr/src/head/obj/usr/src/head/src/sys/MYKERNEL-NODEBUG > > amd64 > > Hi, > > I suspect this line from the manpage is key: > > The limit is not enforced if the user is allowed to change the limit > > Regards, > > Gary >