Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Dec 2013 08:15:05 +0100 (CET)
From:      =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
To:        Freddie Cash <fjwcash@gmail.com>
Cc:        FreeBSD stable <freebsd-stable@freebsd.org>
Subject:   Re: Does FreeBSD's ZFS reserve 1/64 of the capacity for COW?
Message-ID:  <alpine.BSF.2.00.1312090808000.75198@mail.fig.ol.no>
In-Reply-To: <CAOjFWZ6fd0dGCgcbvV6T=nw=VFUfdcRCu4DcMiQxZxyt4E=vrg@mail.gmail.com>
References:  <alpine.BSF.2.00.1312061325420.75198@mail.fig.ol.no> <CAOjFWZ6fd0dGCgcbvV6T=nw=VFUfdcRCu4DcMiQxZxyt4E=vrg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 6 Dec 2013 08:47-0800, Freddie Cash wrote:

> On Fri, Dec 6, 2013 at 4:46 AM, Trond Endrestøl <
> Trond.Endrestol@fagskolen.gjovik.no> wrote:
> 
> > Hi,
> >
> > Today I came across "Becoming a ZFS Ninja Part 1"
> > http://www.youtube.com/watch?v=tPsV_8k-aVU featuring Ben Rockwood who
> > stated that ZFS reserves 1/64 of the capacity for COW safe-guarding.
> > Fast forward to 00:49:44. Thus, one should take this fact into account
> > when planning the storage capacity of your (larger) zpools.
> >
> > Does FreeBSD's ZFS also reserve 1/64 of the capacity for COW?
> >
> > If it's true, then I guess this should be noted in zpool(8) and in the
> > Handbook.
> >
> > Any comments or insights?
> > Do you think I should file a PR?
> >
> > Have a nice weekend! ;-)
> >
> 
> Based on the experience I went through a week or so ago, I would have to
> say, no.  (Unless this is an unrelated issue.)
> 
> I filled a 75 TB pool 100% full, 0 bytes left.  Was unable to delete files,
> was unable to "cp /dev/null" files, was unable to truncate files.??  Mostly
> due to snapshots and "deleting" a file actually marks the blocks as part of
> the previous snapshot and updates a bunch of metadata.  And, was unable to
> destroy any snapshots as there was 0 space to write out metadata.
> 
> Thankfully, I had 1 ZFS filesystem without any snapshots, and I was able to
> successfully delete files from that dataset.  Once a few MB of free space
> was made available, then I was able to start deleting snapshots
> 
> ?I now have a dataset on each ZFS pool called "do-not-delete" with a 1 GB
> reservation (and no snapshots).  This way, if the pool ever gets filled to
> 100% (and it did a few days later), it's a simple matter to "create" free
> space:
>   # zfs set reservation=512M storage/do-not-delete
> ?
> Then delete some snapshots, and set the reservation back to 1 GB.
> 
> I've now hit the 100% full issue 3 times.  Twice, the do-not-delete
> reservation saved me.

That's a handy tip. Thanks.

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1312090808000.75198>