Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 May 2017 21:27:56 -0400
From:      Paul Kraus <paul@kraus-haus.org>
To:        "Eric A. Borisch" <eborisch@gmail.com>
Cc:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>, FreeBSD Stable <freebsd-stable@freebsd.org>, =?utf-8?Q?Trond_Endrest=C3=B8l?= <Trond.Endrestol@fagskolen.gjovik.no>
Subject:   Re: zpool imported twice with different names (was Re: Fwd: ZFS)
Message-ID:  <81774CB0-9E06-43AF-B58B-259234111D61@kraus-haus.org>
In-Reply-To: <CAASnNnpXaXmRHi97Fo4wE_VLT39O50kOaa8WvMk00doxMfxFQQ@mail.gmail.com>
References:  <7c059678-4af4-f0c9-ff3b-c6266e02fb7a@gmx.com> <adf4ab9f-72f1-ed0f-fee2-82caba3af4a4@gmx.com> <ca7b47a7-7512-3cbb-d47b-6ef546dffd74@gmx.com> <alpine.BSF.2.21.1705160825130.40966@mail.fig.ol.no> <CAASnNnrwTuJkMG2p%2BcXoKVfRQKnA5NccRGodwNUdCyG5j-L_LA@mail.gmail.com> <2318D9EB-4271-42C8-AEDB-4BB86607BB3D@kraus-haus.org> <CAASnNnpXaXmRHi97Fo4wE_VLT39O50kOaa8WvMk00doxMfxFQQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

> On May 17, 2017, at 5:12 PM, Eric A. Borisch <eborisch@gmail.com> =
wrote:
>=20
> Short version:
>=20
> It's not the -f causing the problem, it's the parsing and (double)
> importing via /boot/zfs/zpool.cache that is.

I was unclear=E2=80=A6 _how_ do you get the double entry in zpool.cache =
_except_ by using the -f option with a zpool that is already imported ?

> Longer story:

<snip>

> So it is not the import with -f that is causing the problem here, it =
is the
> following reboot when the zpool.cache file is parsed and ensuing
> double-import.

I would maintain that it is the combination of the import of an already =
imported zpool which causes the double entry in the zpool.cache in =
combination with a recent rename of the zpool.

Would (did) the import without the force fail ? The last host this zpool =
was imported on was _this_ host, so the =E2=80=9Cis this zpool used by =
another host=E2=80=9D check would not stop such an import.

Or, is the zpool rename not updating the name in the zpool.cache file ?

I don=E2=80=99t currently have a test system available or I would =
experiment...=20

> (As an aside, using the -f is required to import a pool last
> used and not exported by another system, and is a common and =
documented use
> case. If you look at the code, it turns on a the ZFS_IMPORT_ANY_HOST =
flag,
> not an 'ignore all errors' state. There is a separate -F which is more
> 'force'-ish (turns on rewinding).)

There are times when it is necessary to force an operation. One of the =
underlying assumptions is that the person using the force option _knows_ =
with a very high degree of certainty that the zpool is not in use, =
either by another system or the same system.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?81774CB0-9E06-43AF-B58B-259234111D61>