From owner-freebsd-fs@FreeBSD.ORG Mon Apr 8 08:07:39 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A702B76 for ; Mon, 8 Apr 2013 08:07:39 +0000 (UTC) (envelope-from jdc@koitsu.org) Received: from qmta01.emeryville.ca.mail.comcast.net (qmta01.emeryville.ca.mail.comcast.net [IPv6:2001:558:fe2d:43:76:96:30:16]) by mx1.freebsd.org (Postfix) with ESMTP id 8E2CB945 for ; Mon, 8 Apr 2013 08:07:39 +0000 (UTC) Received: from omta15.emeryville.ca.mail.comcast.net ([76.96.30.71]) by qmta01.emeryville.ca.mail.comcast.net with comcast id ML491l0041Y3wxoA1L7fub; Mon, 08 Apr 2013 08:07:39 +0000 Received: from koitsu.strangled.net ([67.180.84.87]) by omta15.emeryville.ca.mail.comcast.net with comcast id ML7e1l0081t3BNj8bL7e31; Mon, 08 Apr 2013 08:07:38 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 1CE0673A1B; Mon, 8 Apr 2013 01:07:38 -0700 (PDT) Date: Mon, 8 Apr 2013 01:07:38 -0700 From: Jeremy Chadwick To: Lev Serebryakov Subject: Re: ZFS snapshots and daily security checks Message-ID: <20130408080738.GA73905@icarus.home.lan> References: <20130408005438.GA66727@icarus.home.lan> <1504594172.20130408114200@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1504594172.20130408114200@serebryakov.spb.ru> User-Agent: Mutt/1.5.21 (2010-09-15) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1365408459; bh=d9vKqrxaBTKR2VgMDuf73qCiV3Job6s3Y3duC7ip35o=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=UO2YUwvyhPYZRPPoHbpHT6Yqo4HwLr+/1xuOsjaOhUETzICmU8CS0OVORy4P/JWVG +ZKDMqbPv5eOdABQCZgw9r+WwH6ID2jnOCFEfBa6mFjeEYzvrAVJIYi9H7F4NrxhDr jyLVFnRPnVNXKdboT1CqBZ6/5xf9u5HyalJ1WUyPtBzo/e8hoIfZzN9pi0MMkproK9 Qdky1PbJE7yRvLrlHtp7buD0t//cork1pmUgpbSkrUWCj/9iQhGOIdFkWE8k3eNAW5 HtvpUnudyFAjcEIUOTUqyDfWoKoxNcRaX/L3lGeS21zzB52alLK3R/jHRqMLRZvgQ3 RU+mLcLCqBIhw== Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Apr 2013 08:07:39 -0000 On Mon, Apr 08, 2013 at 11:42:00AM +0400, Lev Serebryakov wrote: > Hello, Jeremy. > You wrote 8 апреля 2013 г., 4:54:38: > > >> Is it possible to exclude these snapshots from `mount -p' output or > >> don't mount them to hierarchy by default? > JC> Taken from my stable/9 r249160 system: > And here is my 9.1-STABLE r244958 (I'm filtering out all hourly > output, or this message will be infinite): > > % df -k > Filesystem 1024-blocks Used Avail Capacity Mounted on > /dev/mirror/root 2026028 675598 1188348 36% / > devfs 1 1 0 100% /dev > fdescfs 1 1 0 100% /dev/fd > procfs 4 4 0 100% /proc > /dev/mirror/var 16244332 6285320 8659466 42% /var > /dev/mirror/tmp 1012972 12290 919646 1% /tmp > /dev/mirror/usr 64995336 10259340 49536370 17% /usr > /dev/mirror/databases 101554148 174252 93255566 0% /var/databases > pool 487184219 21 487184198 0% /pool > pool/home 511417117 24232919 487184198 5% /usr/home > devfs 1 1 0 100% /var/named/dev > % mount > /dev/mirror/root on / (ufs, local) > devfs on /dev (devfs, local) > fdescfs on /dev/fd (fdescfs) > procfs on /proc (procfs, local) > /dev/mirror/var on /var (ufs, local, soft-updates) > /dev/mirror/tmp on /tmp (ufs, local, soft-updates) > /dev/mirror/usr on /usr (ufs, local, soft-updates) > /dev/mirror/databases on /var/databases (ufs, local, soft-updates) > pool on /pool (zfs, local, nfsv4acls) > pool/home on /usr/home (zfs, local, nfsv4acls) > devfs on /var/named/dev (devfs, local) > % zfs list -t snapshot | grep -v hourly > NAME USED AVAIL REFER MOUNTPOINT > pool/home@daily-2013-04-05_03.01.28--1m 544K - 23.1G - > pool/home@daily-2013-04-06_03.01.20--1m 688K - 23.1G - > pool/home@weekly-2013-04-06_04.15.34--1y 1.70M - 23.1G - > pool/home@daily-2013-04-07_03.04.44--1m 1.15M - 23.1G - > pool/home@daily-2013-04-08_03.01.31--1m 437K - 23.1G - > % mount -p | grep -v hourly > /dev/mirror/root / ufs rw 1 1 > devfs /dev devfs rw 0 0 > fdescfs /dev/fd fdescfs rw 0 0 > procfs /proc procfs rw 0 0 > /dev/mirror/var /var ufs rw 2 2 > /dev/mirror/tmp /tmp ufs rw 2 2 > /dev/mirror/usr /usr ufs rw 2 2 > /dev/mirror/databases /var/databases ufs rw 3 3 > pool /pool zfs rw,nfsv4acls 0 0 > pool/home /usr/home zfs rw,nfsv4acls 0 0 > devfs /var/named/dev devfs rw 0 0 > pool/home@daily-2013-04-05_03.01.28--1m /usr/home/.zfs/snapshot/daily-2013-04-05_03.01.28--1m zfs ro,nosuid,noatime,nfsv4acls 0 0 > pool/home@daily-2013-04-06_03.01.20--1m /usr/home/.zfs/snapshot/daily-2013-04-06_03.01.20--1m zfs ro,nosuid,noatime,nfsv4acls 0 0 > pool/home@weekly-2013-04-06_04.15.34--1y /usr/home/.zfs/snapshot/weekly-2013-04-06_04.15.34--1y zfs ro,nosuid,noatime,nfsv4acls 0 0 > pool/home@daily-2013-04-07_03.04.44--1m /usr/home/.zfs/snapshot/daily-2013-04-07_03.04.44--1m zfs ro,nosuid,noatime,nfsv4acls 0 0 > % > > JC> It seems to me mount and mount -p show the mounted snapshot. > I didn't mount snapshot specifically, and they are created by zfSnap > script from ports (sysutils/zfsnap). > As I can see in this script, snapshots are created with > > /sbin/zfs snapshot -r ${fs}@${snapshot} I don't know what to tell you -- my output clearly shows that after creating a snapshot with "zfs snapshot -r filesystem@snapname" that mount nor mount -p show anything. I wonder if you have either pool or filesystem-level attributes which are causing your issue. Here are mine, for the pool and filesystem I used in my previous mail (pool "data" and filesystem "data/home"): root@icarus:~ # zpool get all data NAME PROPERTY VALUE SOURCE data size 2.72T - data capacity 24% - data altroot - default data health ONLINE - data guid 4221681810446459190 default data version - default data bootfs - default data delegation on default data autoreplace off default data cachefile - default data failmode wait default data listsnapshots off default data autoexpand off default data dedupditto 0 default data dedupratio 1.00x - data free 2.06T - data allocated 671G - data readonly off - data comment - default data expandsize 0 - data freeing 0 default data feature@async_destroy enabled local data feature@empty_bpobj active local data feature@lz4_compress enabled local root@icarus:~ # zfs get all data/home NAME PROPERTY VALUE SOURCE data/home type filesystem - data/home creation Tue Jan 22 23:48 2013 - data/home used 15.8G - data/home available 1.35T - data/home referenced 15.8G - data/home compressratio 1.00x - data/home mounted yes - data/home quota none default data/home reservation none default data/home recordsize 128K default data/home mountpoint /home local data/home sharenfs off default data/home checksum on default data/home compression off default data/home atime on default data/home devices on default data/home exec on default data/home setuid on default data/home readonly off default data/home jailed off default data/home snapdir hidden default data/home aclmode discard default data/home aclinherit restricted default data/home canmount on default data/home xattr off temporary data/home copies 1 default data/home version 5 - data/home utf8only off - data/home normalization none - data/home casesensitivity sensitive - data/home vscan off default data/home nbmand off default data/home sharesmb off default data/home refquota none default data/home refreservation none default data/home primarycache all default data/home secondarycache all default data/home usedbysnapshots 0 - data/home usedbydataset 15.8G - data/home usedbychildren 0 - data/home usedbyrefreservation 0 - data/home logbias latency default data/home dedup off default data/home mlslabel - data/home sync standard default data/home refcompressratio 1.00x - data/home written 15.8G - data/home logicalused 15.2G - data/home logicalreferenced 15.2G - -- | Jeremy Chadwick jdc@koitsu.org | | UNIX Systems Administrator http://jdc.koitsu.org/ | | Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |