From owner-freebsd-fs@freebsd.org Thu May 18 01:27:54 2017 Return-Path: Delivered-To: freebsd-fs@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 EBC50D71E4E for ; Thu, 18 May 2017 01:27:54 +0000 (UTC) (envelope-from paul@kraus-haus.org) Received: from mail-qt0-x22d.google.com (mail-qt0-x22d.google.com [IPv6:2607:f8b0:400d:c0d::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 AA147192A for ; Thu, 18 May 2017 01:27:54 +0000 (UTC) (envelope-from paul@kraus-haus.org) Received: by mail-qt0-x22d.google.com with SMTP id t26so23691898qtg.0 for ; Wed, 17 May 2017 18:27:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kraus-haus-org.20150623.gappssmtp.com; s=20150623; h=subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=NgvmcpnkSUZQzeEjpwZPTn7fjfwhuF2cS04IbRKQ5EE=; b=XsZi1o76VVz6p2yyrwuH4G90gqtOKtD7CyXRZT/yMRkGFZ68ub933e7LhcbLwZutrP cartnpU5qb3QIusB5BuNWd7y6lnb1PkVgp1WcOcQCaPRJSP3/PvEpFg1TupFdn0Q0Usd NZshKouVf1GWUlNci6X7c+zo1RpgfdcsTrsW76aBfZ1K1q+Fs4u5TjfetM83SZpHcR+h w4HIuEj65D/lOqDHqtFlG8ARCPT6KIC2oMr5bLloKqG7b2YxwvZROgMib6+cAShkAf50 egoQP49x7MnbcuyC7A4OxigBLEEF+ARvOOqRUXe2jmlIY44ukWaSzT7vwdJG15FsLRJu 7Jeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=NgvmcpnkSUZQzeEjpwZPTn7fjfwhuF2cS04IbRKQ5EE=; b=LpWISaNNipafx536Lrk7O8YFfeYFrZFNhYSnuSAjNpYDAEfIIU0+WNY1wPF5pECPMC cCZO8kUJPsAw3h+Mas1y8P11pqmCctEwA4Y9ESQBsGXJAcoXTBbRRn7ejv750ofo19nO glAFqDB3plgNX57jst9vBBG3rpDFxVwYIFR2RL1X4KHWUwss8p7wZf51Kpd4ZzRYdiIv UrHJjZObYM9qM/RPS0eX7o+eZHfH7BklOH2VUyw/ulkTZyqX1C7Ep7ucsOftumk4Agi9 khpwEN6XmrGiA7Qzhwsa2+vE1r61QlzXQFx7QKNJ52xFPDxiW05tMc2CcwqLOsVdeXwB 7IGg== X-Gm-Message-State: AODbwcD/pZxBkpztmBfq/h2SzEABNIJfttnFJywAeT2NBSGNN4b8/+6v jSE7O0nmzoRmmlvQ X-Received: by 10.200.55.124 with SMTP id p57mr1559084qtb.258.1495070873603; Wed, 17 May 2017 18:27:53 -0700 (PDT) Received: from [192.168.2.65] (pool-74-109-188-83.albyny.fios.verizon.net. [74.109.188.83]) by smtp.gmail.com with ESMTPSA id b23sm2740056qkb.31.2017.05.17.18.27.52 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 May 2017 18:27:53 -0700 (PDT) Subject: Re: zpool imported twice with different names (was Re: Fwd: ZFS) Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 From: Paul Kraus In-Reply-To: Date: Wed, 17 May 2017 21:27:56 -0400 Cc: "freebsd-fs@freebsd.org" , FreeBSD Stable , =?utf-8?Q?Trond_Endrest=C3=B8l?= Content-Transfer-Encoding: quoted-printable Message-Id: <81774CB0-9E06-43AF-B58B-259234111D61@kraus-haus.org> References: <7c059678-4af4-f0c9-ff3b-c6266e02fb7a@gmx.com> <2318D9EB-4271-42C8-AEDB-4BB86607BB3D@kraus-haus.org> To: "Eric A. Borisch" X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 01:27:55 -0000 > On May 17, 2017, at 5:12 PM, Eric A. Borisch = 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: > 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.