Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Dec 2010 13:29:58 -0800
From:      Freddie Cash <>
To:        Patrick Proniewski <>
Cc:        FreeBSD Filesystems <>
Subject:   Re: auto-mounting ZFS snapshots
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Mon, Dec 6, 2010 at 1:13 PM, Patrick Proniewski <> wrot=
> On 6 d=C3=A9c. 2010, at 18:20, Freddie Cash wrote:
>> FreeBSD automounts the "hidden" .zfs filesystem hierarchy where
>> snapshots are "stored" automatically. =C2=A0No need for amd.
> The zfs man page reads:
> =C2=A0 =C2=A0 =C2=A0 File =C2=A0system snapshots can be accessed under th=
e ".zfs/snapshot" direc-
> =C2=A0 =C2=A0 =C2=A0 tory in the root =C2=A0of =C2=A0the =C2=A0file =C2=
=A0system. =C2=A0Snapshots =C2=A0are =C2=A0automatically
> =C2=A0 =C2=A0 =C2=A0 mounted =C2=A0on demand and may be unmounted at regu=
lar intervals. The visi-
> =C2=A0 =C2=A0 =C2=A0 bility of the ".zfs" directory can be controlled by =
the "snapdir" prop-
> =C2=A0 =C2=A0 =C2=A0 erty.
> "may be unmounted at regular intervals" <-- what about this? Do I have to=
 create a periodic script that'll unmount snapshots? And if so, how can I m=
ake a script that'll unmount only snapshots mounted for over, say, 1 hour?

If you don't want the output of "mount" to be cluttered with ZFS
snapshots, then you can manually clear it out with something like:

mount | grep <fs-name> | awk '{ print $1 }' | xargs sudo umount

Replace <fs-name> with the ZFS filesystem name as shown in the output
of mount.  If needed, you could put that into a periodic script or

However, it shouldn't hurt things to have all the snapshots mounted.
We have 205 snapshots mounted on our backups server without any issues
so far.

Freddie Cash

Want to link to this message? Use this URL: <>