From owner-freebsd-fs@FreeBSD.ORG Mon Apr 8 00:54:40 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 3B602BA1 for ; Mon, 8 Apr 2013 00:54:40 +0000 (UTC) (envelope-from jdc@koitsu.org) Received: from qmta12.emeryville.ca.mail.comcast.net (qmta12.emeryville.ca.mail.comcast.net [IPv6:2001:558:fe2d:44:76:96:27:227]) by mx1.freebsd.org (Postfix) with ESMTP id 21471968 for ; Mon, 8 Apr 2013 00:54:40 +0000 (UTC) Received: from omta11.emeryville.ca.mail.comcast.net ([76.96.30.36]) by qmta12.emeryville.ca.mail.comcast.net with comcast id MBcl1l0040mlR8UACCufJi; Mon, 08 Apr 2013 00:54:39 +0000 Received: from koitsu.strangled.net ([67.180.84.87]) by omta11.emeryville.ca.mail.comcast.net with comcast id MCue1l00D1t3BNj8XCueki; Mon, 08 Apr 2013 00:54:38 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 1174573A1B; Sun, 7 Apr 2013 17:54:38 -0700 (PDT) Date: Sun, 7 Apr 2013 17:54:38 -0700 From: Jeremy Chadwick To: lev@FreeBSD.org Subject: Re: ZFS snapshots and daily security checks Message-ID: <20130408005438.GA66727@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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=1365382479; bh=xOh9gs+I71ArBXKK+TTATRGPrJWUtsXoHSF3kPLCEhs=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=Oqba6M8r2SPM2lhXqpA7rJW51GAiAETBodNTtSzvAWz49A8ZooJTKrilA3WWPIdaK el15oJQ7VlJpL2CNA/dMmkvqyBfDvWE+NwbygFkomtCh4RY8QjhUbpBVtjbjPdHMFQ X3WyySskv0NzANeFwmjGBY8C8d4olfjKZiu+fJ+a5xs8UwTRtNDCtSe0cJT1K7u1N7 Yg1Mw2ux1z9Syh1KfUrw0NCIIppV39D/4irT0RJz6eqyfw0zXc7vvJtK63zlWxoF6d ybMKlZrHK8P4HD+sQhx+gje5rC+2OgVvbRqrOcpAEi14F5i5JnhsAkC8Hhe3C8hefS 9QqOud+9xyy0g== 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 00:54:40 -0000 > Here is strange difference between `mount' and `mount -p' output: > `mount' doesn't show mounted ZFS snapshots, but `mount -p' does. > > Is it possible to exclude these snapshots from `mount -p' output or > don't mount them to hierarchy by default? Taken from my stable/9 r249160 system: root@icarus:~ # df -k Filesystem 1024-blocks Used Avail Capacity Mounted on /dev/ada0p2 2063900 664952 1233836 35% / devfs 1 1 0 100% /dev /dev/ada0p4 16503324 147416 15035644 1% /var /dev/ada0p5 16503324 44 15183016 0% /tmp /dev/ada0p6 25316000 6612788 16677932 28% /usr backups 1915745760 469845400 1445900360 25% /backups data/home 1462173974 16568039 1445605935 1% /home data/storage 1897306539 451700604 1445605935 24% /storage devfs 1 1 0 100% /var/named/dev root@icarus:~ # zfs snapshot -r data/home@now root@icarus:~ # touch /home/ilikedata root@icarus:~ # zfs list -t snapshot NAME USED AVAIL REFER MOUNTPOINT data/home@now 160K - 15.8G - root@icarus:~ # /sbin/mount -p /dev/ada0p2 / ufs rw 1 1 devfs /dev devfs rw,multilabel 0 0 /dev/ada0p4 /var ufs rw 2 2 /dev/ada0p5 /tmp ufs rw 2 2 /dev/ada0p6 /usr ufs rw 2 2 backups /backups zfs rw,nfsv4acls 0 0 data/home /home zfs rw,nfsv4acls 0 0 data/storage /storage zfs rw,nfsv4acls 0 0 devfs /var/named/dev devfs rw,multilabel 0 0 root@icarus:~ # /sbin/mount /dev/ada0p2 on / (ufs, local) devfs on /dev (devfs, local, multilabel) /dev/ada0p4 on /var (ufs, local, soft-updates) /dev/ada0p5 on /tmp (ufs, local, soft-updates) /dev/ada0p6 on /usr (ufs, local, soft-updates) backups on /backups (zfs, local, nfsv4acls) data/home on /home (zfs, local, nfsv4acls) data/storage on /storage (zfs, local, nfsv4acls) devfs on /var/named/dev (devfs, local, multilabel) And now after mounting the snapshot: root@icarus:~ # /sbin/mount -t zfs data/home@now /mnt root@icarus:~ # df -k Filesystem 1024-blocks Used Avail Capacity Mounted on /dev/ada0p2 2063900 664952 1233836 35% / devfs 1 1 0 100% /dev /dev/ada0p4 16503324 147416 15035644 1% /var /dev/ada0p5 16503324 44 15183016 0% /tmp /dev/ada0p6 25316000 6612788 16677932 28% /usr backups 1915745760 469845400 1445900360 25% /backups data/home 1462173553 16568044 1445605509 1% /home data/storage 1897306113 451700604 1445605509 24% /storage devfs 1 1 0 100% /var/named/dev data/home@now 1462173553 16568044 1445605509 1% /mnt root@icarus:~ # /sbin/mount -p /dev/ada0p2 / ufs rw 1 1 devfs /dev devfs rw,multilabel 0 0 /dev/ada0p4 /var ufs rw 2 2 /dev/ada0p5 /tmp ufs rw 2 2 /dev/ada0p6 /usr ufs rw 2 2 backups /backups zfs rw,nfsv4acls 0 0 data/home /home zfs rw,nfsv4acls 0 0 data/storage /storage zfs rw,nfsv4acls 0 0 devfs /var/named/dev devfs rw,multilabel 0 0 data/home@now /mnt zfs ro,noatime,nfsv4acls 0 0 root@icarus:~ # /sbin/mount /dev/ada0p2 on / (ufs, local) devfs on /dev (devfs, local, multilabel) /dev/ada0p4 on /var (ufs, local, soft-updates) /dev/ada0p5 on /tmp (ufs, local, soft-updates) /dev/ada0p6 on /usr (ufs, local, soft-updates) backups on /backups (zfs, local, nfsv4acls) data/home on /home (zfs, local, nfsv4acls) data/storage on /storage (zfs, local, nfsv4acls) devfs on /var/named/dev (devfs, local, multilabel) data/home@now on /mnt (zfs, local, noatime, read-only, nfsv4acls) It seems to me mount and mount -p show the mounted snapshot. -- | 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 |