From owner-freebsd-fs@freebsd.org Fri Nov 22 08:09:59 2019 Return-Path: Delivered-To: freebsd-fs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF0CD1B0FEE for ; Fri, 22 Nov 2019 08:09:59 +0000 (UTC) (envelope-from borjam@sarenet.es) Received: from cu01176b.smtpx.saremail.com (cu01176b.smtpx.saremail.com [195.16.151.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47K8HB5KCxz4Tqt for ; Fri, 22 Nov 2019 08:09:58 +0000 (UTC) (envelope-from borjam@sarenet.es) Received: from [172.16.8.16] (unknown [192.148.167.11]) by proxypop01.sare.net (Postfix) with ESMTPA id C191A9DF1F8; Fri, 22 Nov 2019 09:09:53 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: ZFS snapdir readability (Crosspost) OT: mount -t zfs for snapshots From: Borja Marcos In-Reply-To: <201911211630.xALGUT5Z010705@higson.cam.lispworks.com> Date: Fri, 22 Nov 2019 09:09:52 +0100 Cc: jbe-mlist@magnetkern.de, freebsd-fs@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20191107004635.c6d2e7d464d3d556a0d87465@magnetkern.de> <9B22AD46-BE87-4305-9638-74D23AD4C8CA@sarenet.es> <261FE331-EC5C-48C8-9249-9BCBF887CE38@sarenet.es> <913f7040-6e38-452d-6187-e17fae63b652@sentex.net> <20191120144041.7f916360dc0c69bf509c9bd1@magnetkern.de> <20191120163437.691abd369ab9c0a6d7d45ff2@magnetkern.de> <20191120175803.03401c3316fe756cc46f79f1@magnetkern.de> <3C5DC6DD-C44B-41EE-B7AB-6D8F94E43174@sarenet.es> <201911211259.xALCxShX008743@higson.cam.lispworks.com> <462E2C53-2490-4B8C-BB54-BCE8B75BAEB0@sarenet.es> <201911211630.xALGUT5Z010705@higson.cam.lispworks.com> To: Martin Simmons X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 47K8HB5KCxz4Tqt X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=sarenet.es; spf=pass (mx1.freebsd.org: domain of borjam@sarenet.es designates 195.16.151.151 as permitted sender) smtp.mailfrom=borjam@sarenet.es X-Spamd-Result: default: False [-5.16 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:195.16.151.0/24]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_POLICY_ALLOW(-0.50)[sarenet.es,none]; RCVD_IN_DNSWL_NONE(0.00)[151.151.16.195.list.dnswl.org : 127.0.10.0]; IP_SCORE(-2.86)[ip: (-7.61), ipnet: 195.16.128.0/19(-3.89), asn: 3262(-2.87), country: ES(0.04)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:3262, ipnet:195.16.128.0/19, country:ES]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Nov 2019 08:10:00 -0000 > On 21 Nov 2019, at 17:30, Martin Simmons wrote: >=20 >>=20 >> I=E2=80=99ve never seen that and, indeed, on FreeBSD 12.1 it=E2=80=99s = not possible. Or I am terribly >> sloppy today! >>=20 >> Did I miss anything? Is it a new ZFS on Linux feature? >>=20 >>=20 >> root@micro1:~ # mount -t zfs -o ro pool/dataset@snapshot /mnt >> mount: unpul/wwwnfsen@antesinst: Device busy >> root@micro1:~ #=20 >=20 > It looks like unpul/wwwnfsen@antesinst is already mounted -- probably = in .zfs :-) (This is a bit of off-topic now, the behavior of mount -t zfs) Yep, it=E2=80=99s only uglier! Whenever you access any of the directories below .zfs/snapshot the = snapshot is automagically mounted. It=E2=80=99s also sort of invisible except = when you run =E2=80=9Cmount -v=E2=80=9D. In that case those snapshot mounts are visible. You can also unmount them.=20 But it=E2=80=99s rather opaque. Auto mounted snapshots are invisible to = mount(8) unless the -v option is used, regardless of the status of the snapdir property. = However, when you mount them explicitly they are visible. Anyway, was this intended or is it a side effect of the general behavior = of mount? I see it=E2=80=99s not documented on the FreeBSD Manual, which only mentions mounting snapshots = as clones. Which, as far as I know, is consistent with the original ZFS design. Thank you for all the explanations, I was convinced that cloning was the = only way to mount a ZFS snapshot.=20 Borja.