From owner-freebsd-stable@freebsd.org Fri Feb 3 02:31:59 2017 Return-Path: Delivered-To: freebsd-stable@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 CBDA2CCDB27; Fri, 3 Feb 2017 02:31:59 +0000 (UTC) (envelope-from ultima1252@gmail.com) Received: from mail-yb0-x22d.google.com (mail-yb0-x22d.google.com [IPv6:2607:f8b0:4002:c09::22d]) (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 8E1FF1B07; Fri, 3 Feb 2017 02:31:59 +0000 (UTC) (envelope-from ultima1252@gmail.com) Received: by mail-yb0-x22d.google.com with SMTP id o65so2045961ybo.2; Thu, 02 Feb 2017 18:31:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=dButyUbQ5iTvPrQO/TVCBj8PpIAxBy/Ic44tS/rHWbo=; b=JbexhR1vcawix1HvD9Rr+gmlorncrCHAsQJPWCQCGebMcvHLHEnWuv24bST8TP66Pr dRVCyyUTFnSyjNOMPY5FtOlpIySA0N4x1abQHKLKmXSWIu1vD9MMOuOZc1gUsKj6Knfz fqi31n/tVDL16mesu0kD0Otejx6hAaX5xA/qs1bkq5OK5qG5OuweZpvLfk4y0eeS9Ib3 m/0uaMeuWJ0ooEfZWEfCIvehwMYqlGiqkZwrt9JQWWv0yO1ISy3Wqd61qPHZ3W+1TJEN 2KpBr5luLixmTG7Ju26d8en1WIlq6hQTDK37A5Uc8kwii8oWTP6Su0cZsvodw7gNZqid nhEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=dButyUbQ5iTvPrQO/TVCBj8PpIAxBy/Ic44tS/rHWbo=; b=OXcehSapoTSaSoYUNNa3py+UmZP8C+IX3cKVLPS7lVPvw+S9ni5Tsq8MwGXrVTra9V s8k3qflxQLh4q6AIayjGc14hG6T7msg/NDv4S/UbnyM2Jdpc7FXbA0ZRgtkkDM9TJgbN Ra0KwffdVFyRHvyot1GV1VZmxSurq7zOSFY+sHXE7JjUTW7acYqMyMMgjqsN7iP2cMYY 9Rauw1taa85Yetc1iQEKTcT8RDCTR/udFCPj3L4KYXiZIq8ou/satldcdr90fBVqfZc/ nJtebppGt1hl18iUCGSs2uh8g2nuESrahLUzzmCMtGRU8WmxWpinpTHkQM6KdQyk9SH6 kO+Q== X-Gm-Message-State: AIkVDXLzwkF0keeiaxseUK6JkdpRwsYIyZWdEUUJ9m/+AuLXKHZN0PgeOwFBDLz6eI9QM/oTqp1ge5W/SMrEUw== X-Received: by 10.37.248.2 with SMTP id u2mr4670497ybd.52.1486089118503; Thu, 02 Feb 2017 18:31:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.52.65 with HTTP; Thu, 2 Feb 2017 18:31:58 -0800 (PST) From: Ultima Date: Thu, 2 Feb 2017 21:31:58 -0500 Message-ID: Subject: zfs snapshot_limit is not respected To: 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-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 02:31:59 -0000 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