From owner-freebsd-stable@freebsd.org Thu May 18 01:27:54 2017 Return-Path: Delivered-To: freebsd-stable@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 EBEAED71E4F for ; Thu, 18 May 2017 01:27:54 +0000 (UTC) (envelope-from paul@kraus-haus.org) Received: from mail-qt0-x229.google.com (mail-qt0-x229.google.com [IPv6:2607:f8b0:400d:c0d::229]) (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 AA1A8192D for ; Thu, 18 May 2017 01:27:54 +0000 (UTC) (envelope-from paul@kraus-haus.org) Received: by mail-qt0-x229.google.com with SMTP id v27so23697120qtg.2 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=QPVl1x/MUV5ZtrpXRQyiUHqCyQ22a98pkiU0IKSx0USUezSSQ2/aY94p4bbuYCf5+s dxIQObRoukzUXv4uPqWLAWZXFjaX3aApch7LxZCqAFSCg26hmFG8C1FzdI7ziXEDq0Lo uMVLc37FDUbdklJCeMoysSqQqgHOvnC7TBpYlLsugjlw8QeQOmI+R6nwBkvSJ8cOptik 1jKtrV1VmUJ39G5OoQZQqieif+0/0Fc014RAFO0tPZwtnTE9pdY75yQfeh9RRVpv8X+G HdYI67rFXFzZqTidiHTi8o9S3jVCmkIv0hJl44qXMvbDuk2IhCwHBBAeQjB2pKwMEKMz Rumw== X-Gm-Message-State: AODbwcDgrSOjrwnB/1lXXmP5sKdmHIrq+SrdJcvahbt9L6tHz9kCzxHy 1uZXrQAfG1sfOC8Ti+z9Eg== 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-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code 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.