From owner-freebsd-fs@FreeBSD.ORG Mon Dec 6 21:30:00 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B814106566B for ; Mon, 6 Dec 2010 21:30:00 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id C8FF28FC12 for ; Mon, 6 Dec 2010 21:29:59 +0000 (UTC) Received: by ywp6 with SMTP id 6so6664542ywp.13 for ; Mon, 06 Dec 2010 13:29:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=i3Khy131XgCHLiqcVJEL6uwSURYcetL8BNTvjrsGXUQ=; b=SukTEykkZxUIkLu9JIrZlgWU21jhr1rxUivZoDanQJmv+m+86owupthK8TqPK31zDT U2Xk41xnUNiegKQGriKZvh2hBTWkhUIu5TALyzxR9mdd16/UBbj0gDpoZk2KWxWkfYoD sr34XJR9J3cDHhYg2FrnEyN74tLHE3909DAzE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=jqN1Y8t4f1/mjq/mqWuWtNjW8ZrjPu9V1IWdG1bcEVy7OZIl9xG1vwKMZkzhXpapoI 8vAozMHnXh6Og094xsID9jJjr68rKy/odOQX4S1whwoMCHLK9mrTXZuIL8Gn2VOZdRr8 p8Ef/cbIk8cSRd7zDYl4DGH/AgItpp4pd55Rg= MIME-Version: 1.0 Received: by 10.90.4.26 with SMTP id 26mr8507553agd.84.1291670998952; Mon, 06 Dec 2010 13:29:58 -0800 (PST) Received: by 10.90.226.2 with HTTP; Mon, 6 Dec 2010 13:29:58 -0800 (PST) In-Reply-To: References: <4524EE89-E0A2-4CCF-92F9-80BB709C4BF6@patpro.net> Date: Mon, 6 Dec 2010 13:29:58 -0800 Message-ID: From: Freddie Cash To: Patrick Proniewski Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Filesystems Subject: Re: auto-mounting ZFS snapshots X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Dec 2010 21:30:00 -0000 On Mon, Dec 6, 2010 at 1:13 PM, Patrick Proniewski wrot= e: > 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 | awk '{ print $1 }' | xargs sudo umount Replace 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. --=20 Freddie Cash fjwcash@gmail.com