Date: Mon, 6 Dec 2010 13:29:58 -0800 From: Freddie Cash <fjwcash@gmail.com> To: Patrick Proniewski <patpro@patpro.net> Cc: FreeBSD Filesystems <freebsd-fs@freebsd.org> Subject: Re: auto-mounting ZFS snapshots Message-ID: <AANLkTik3Y6RkYQsZO=D52aA6mYXrq%2B%2BSzQeOY5Xh-qjg@mail.gmail.com> In-Reply-To: <DCA2288C-81EF-453D-9DC9-25A54F4C69A7@patpro.net> References: <4524EE89-E0A2-4CCF-92F9-80BB709C4BF6@patpro.net> <AANLkTikNJuJPMJ5Ktwi6TiOjCBr7WGrPN5UfJswAbfCw@mail.gmail.com> <DCA2288C-81EF-453D-9DC9-25A54F4C69A7@patpro.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 6, 2010 at 1:13 PM, Patrick Proniewski <patpro@patpro.net> wrote:
> On 6 déc. 2010, at 18:20, Freddie Cash wrote:
>
>> FreeBSD automounts the "hidden" .zfs filesystem hierarchy where
>> snapshots are "stored" automatically. No need for amd.
>
> The zfs man page reads:
>
> File system snapshots can be accessed under the ".zfs/snapshot" direc-
> tory in the root of the file system. Snapshots are automatically
> mounted on demand and may be unmounted at regular intervals. The visi-
> bility of the ".zfs" directory can be controlled by the "snapdir" prop-
> 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 make 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
cronjob.
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
fjwcash@gmail.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik3Y6RkYQsZO=D52aA6mYXrq%2B%2BSzQeOY5Xh-qjg>
