Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jan 2017 19:20:49 -0800
From:      Freddie Cash <fjwcash@gmail.com>
To:        Gary Palmer <gpalmer@freebsd.org>
Cc:        FreeBSD Stable <freebsd-stable@freebsd.org>, Aristedes Maniatis <ari@ish.com.au>
Subject:   Re: Boot partition size
Message-ID:  <CAOjFWZ6WRQ5i4OP5ZK89RxM1YpMbVp%2BcOHCSvUyUx0etizUmog@mail.gmail.com>
In-Reply-To: <20170129141244.GA63867@in-addr.com>
References:  <a4cab85a-5e79-c7c1-fbb7-d9cf83cbf556@ish.com.au> <20170129141244.GA63867@in-addr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 29, 2017 6:13 AM, "Gary Palmer" <gpalmer@freebsd.org> wrote:

On Sun, Jan 29, 2017 at 03:15:19PM +1100, Aristedes Maniatis wrote:
> As recently as last October, the best official advice was to make a 64kB
boot partition.
>
> https://wiki.freebsd.org/action/diff/RootOnZFS/
GPTZFSBoot/Mirror?action=diff&rev1=16&rev2=17
>
>
> Now that turns out to be absolutely terrible advice and some people (like
me) have dozens of machines that will never be upgradable to FreeBSD 11 or
higher. It looks like there is no reasonable method of upgrade that doesn't
involve replacing every hard disk on every machine (that's hundred of
disks) with larger models. I use a zvol for swap, so I can't make swap
smaller to solve the problem.
>
> I started with FreeBSD 4.1 and in 16 years... sigh...
>
> The ashift pain some years ago was also caused by FreeBSD default
recommendations and settings not anticipating future needs quickly enough.
But this mess now is completely self-inflicted foot shooting.
>
>
> 1. Why is the recommendation now 128kB and not much much higher? When
that limit is broken in a couple of years, will there be another round of
annoyed users? Is someone concerned that ZFS users are running hard disks
over under 500Mb and need to save space? Surely the recommendation should
be 512kB?
>
> 2. Is there any possible short term future where ZFS volumes can be
shrunk, or will I be replacing every hard disk (or rebuilding the machine
from scratch)?


It is highly unlikely that ZFS volumes will be able to be reduced in size
even in the long term.  I believe that requires a piece of work that has
been rated as very difficult to do without violating layering policies
inside the ZFS code.

The alternative is, assuming you have a pool with redundancy (e.g. mirror)
is to do a backup, drop one half of the mirror, create a new pool on the
now unused disk, zfs send | zfs receive, boot from the new pool and then
drop the old pool and add the disk to the mirror


You can also format a larger drive with the correct partition sizes, and do
a "zpool replace" (for raidz vdevs) or "zpool detach/attach" (for mirror
vdevs). No send/recv required.

And, you may be able to do that on the existing disks, as ZFS now leaves a
MB or two of "slack space" at the end of the device used in the vdev. This
allows for using drives/partitions that are the same size in MB but have
different numbers of sectors. This was an issue on the early ZFS days.

So, you may be able to resize the freebsd-zfs partition by a handful of KB
without actually changing the size of the vdev.

Cheers,
Freddie



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOjFWZ6WRQ5i4OP5ZK89RxM1YpMbVp%2BcOHCSvUyUx0etizUmog>