From owner-freebsd-questions@freebsd.org Sun Jun 18 20:19:42 2017 Return-Path: Delivered-To: freebsd-questions@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 19AD7D8D016 for ; Sun, 18 Jun 2017 20:19:42 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from holgerdanske.com (holgerdanske.com [184.105.128.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "holgerdanske.com", Issuer "holgerdanske.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 085267A905 for ; Sun, 18 Jun 2017 20:19:41 +0000 (UTC) (envelope-from dpchrist@holgerdanske.com) Received: from 99.100.19.101 ([99.100.19.101]) by holgerdanske.com with ESMTPSA (ECDHE-RSA-AES128-GCM-SHA256:TLSv1.2:Kx=ECDH:Au=RSA:Enc=AESGCM(128):Mac=AEAD) (SMTP-AUTH username dpchrist@holgerdanske.com, mechanism PLAIN) for ; Sun, 18 Jun 2017 13:19:39 -0700 Subject: Re: zpool import -N mounts filesystems anyway To: freebsd-questions@freebsd.org References: <7f41df25-df2e-298e-d33e-cc95874e831c@bluerosetech.com> From: David Christensen Message-ID: Date: Sun, 18 Jun 2017 13:19:38 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 20:19:42 -0000 On 06/18/17 01:24, Mel Pilgrim wrote: > 11.0-RELEASE-p7 > The pools and filesystems are all at current feature sets and versions. Your BSD appears to be out of date: 2017-06-18 12:47:54 dpchrist@freebsd ~ $ freebsd-version 11.0-RELEASE-p10 2017-06-18 13:06:16 dpchrist@freebsd ~ $ uname -a FreeBSD freebsd 11.0-RELEASE-p9 FreeBSD 11.0-RELEASE-p9 #0: Tue Apr 11 08:42:58 UTC 2017 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 > # zpool list backupA > cannot open 'backupA': no such pool > # zpool import -N backupA > # zpool list backupA > NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH > ALTROOT > backupA 696G 189G 507G - 1% 27% 1.00x ONLINE - > # zfs list backupA > NAME USED AVAIL REFER MOUNTPOINT > backupA 189G 486G 22K /backup-ext/backupA > # zfs get canmount,mountpoint backupA > NAME PROPERTY VALUE SOURCE > backupA canmount on local > backupA mountpoint /backup-ext/backupA local > > > It appears -N is ignored and the presence of canmount=on and mountpoint > being set results in automatic mounting regardless of whether or not -N > is given to the zpool import command. The expected behaviour is that -N > overrides canmount and mountpoint, leaving all filesystems in the pool > unmounted. > > Currently, I work around this by setting mountpoint=none at the root > prior to exporting (all datasets inherit mountpoint). I would prefer to > leave mountpoint set so that the automated task that uses the pools just > has to import and export them without twiddling properties. I will assume 'mount' and 'ls /backup-ext' show the file system as mounted. Checking the zfs properties documentation: https://docs.oracle.com/cd/E23824_01/html/821-1448/gazss.html#gdrcf Setting the canmount property to noauto means that the file system can only be mounted explicitly, not automatically. Have you tried setting canmount to noauto? David