Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Apr 2013 11:42:00 +0400
From:      Lev Serebryakov <lev@FreeBSD.org>
To:        Jeremy Chadwick <jdc@koitsu.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: ZFS snapshots and daily security checks
Message-ID:  <1504594172.20130408114200@serebryakov.spb.ru>
In-Reply-To: <20130408005438.GA66727@icarus.home.lan>
References:  <20130408005438.GA66727@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello, Jeremy.
You wrote 8 =D0=B0=D0=BF=D1=80=D0=B5=D0=BB=D1=8F 2013 =D0=B3., 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/databas=
es
pool                    487184219       21 487184198     0%    /pool
pool/home               511417117 24232919 487184198     5%    /usr/home
devfs                           1        1         0   100%    /var/named/d=
ev
% 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-201=
3-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}

--=20
// Black Lion AKA Lev Serebryakov <lev@FreeBSD.org>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1504594172.20130408114200>