auto-mounting ZFS snapshots

Freddie Cash fjwcash at gmail.com
Mon Dec 6 21:31:16 UTC 2010


On Mon, Dec 6, 2010 at 1:28 PM, jhell <jhell at dataix.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 12/06/2010 16:13, Patrick Proniewski 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?
>
> No this is a no worry type of thing. This is a transparent process that
> handles what is available. Just consider them mounted all the time but
> you will not see them.
>
> Play with it a little and see what it looks like. mount(1) will not even
> show them as mounted so there is no worries here. The correct thing
> happens to keep you from shooting yourself in the foot.

Oh, that's right.  Mount was updated in 8.x to not show ZFS snapshots,
so you don't even have to worry about it anymore.

My previous reply applies to 7.x, though (which is what's running on
one of our backups boxes).


-- 
Freddie Cash
fjwcash at gmail.com


More information about the freebsd-fs mailing list