Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Oct 2018 07:33:48 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        "Andrey V. Elsukov" <bu7cher@yandex.ru>
Cc:        John Baldwin <jhb@freebsd.org>, Marcel Moolenaar <marcel@freebsd.org>,  src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org, Josh Paetzel <jpaetzel@freebsd.org>
Subject:   Re: svn commit: r264378 - head/sys/geom/part
Message-ID:  <CANCZdfpxW6XOxip=TFqr6sRMzYWVzx=XBreA7vbSKCSehRtVzQ@mail.gmail.com>
In-Reply-To: <2f72f3b3-d890-bed2-742e-fcc39c5618e3@yandex.ru>
References:  <201404122028.s3CKSdo1026394@svn.freebsd.org> <da34a750-c6b6-d313-88e6-68a8670c71bb@FreeBSD.org> <2f72f3b3-d890-bed2-742e-fcc39c5618e3@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 9, 2018 at 2:41 AM Andrey V. Elsukov <bu7cher@yandex.ru> wrote:

> On 08.10.2018 19:46, John Baldwin wrote:
> > This needs a way to be overridden.  If you have a machine installed with
> a
> > layout created prior to this change (e.g. a zpool mirror or RAID or some
> > other mirror or RAID), you can no longer create a matching partition
> since
> > the starting sector is now always 40 instead of 34 and the partition size
> > won't match.  Also, while we may want to create sane layouts by default,
> we
> > should probably always provide a way to create less-sane layouts that are
> > still conformant to the spec.  I do wonder if this kind of default
> > preference shouldn't belong in the userspace gpart tool rather than the
> > kernel and the kernel should create any compliant layout as requested by
> > userland instead.
> >
> > jpaetzel@ just ran into this case where he can't replace a failed disk
> in a
> > system running 12 that was first formatted on 10, so it's not academic.
>
> As a workaround you can try to copy first 34 sectors from old disk to
> new using dd(1). And then use `gpart recover`. I think this should work.
>

Clever hack, but we shouldn't need crazy stuff like this....

Yes. This absolutely needs to be in userland, under user control. The
rounding should *ALWAYS* be optional. The reported geometry that the code
bases the 'rounding' on is bogus often times, and not invariant. I've
fought with this misfeature since I was making CF images on a USB adapter
that never had the right geometry for the system it was deployed into. It's
silly.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpxW6XOxip=TFqr6sRMzYWVzx=XBreA7vbSKCSehRtVzQ>