From owner-freebsd-fs@FreeBSD.ORG Fri Jan 13 13:34:45 2006 Return-Path: X-Original-To: freebsd-fs@FreeBSD.ORG Delivered-To: freebsd-fs@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDE8C16A428 for ; Fri, 13 Jan 2006 13:34:45 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52C4B43D4C for ; Fri, 13 Jan 2006 13:34:43 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (iforgf@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k0DDYa2n024958 for ; Fri, 13 Jan 2006 14:34:37 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k0DDYZEA024957; Fri, 13 Jan 2006 14:34:35 +0100 (CET) (envelope-from olli) Date: Fri, 13 Jan 2006 14:34:35 +0100 (CET) Message-Id: <200601131334.k0DDYZEA024957@lurza.secnetix.de> From: Oliver Fromme To: freebsd-fs@FreeBSD.ORG In-Reply-To: X-Newsgroups: list.freebsd-fs User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.11-STABLE (i386)) Cc: Subject: Re: preventing deadlocks in snapshot directories - unexplained X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-fs@FreeBSD.ORG List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2006 13:34:46 -0000 user wrote: > I have asked this before, but nobody answered ... Many people tend to be reluctant answering questions from anonymous users (or they don't bother reading their questions at all). > If you have multiple snapshots, how do you segregate them in order to > avoid the deadlocks that the ".snap" directory is supposed to fix ? As far as I know, using that directory is just a matter of convention. You can place snapshots anywhere else, and it doesn't make a difference. The only thing special about ".snap" is that it is created by default by newfs(1), and it is expected to exist by the snapshot support of the dump(8) and fsck(8) tools (for dumping live file systems and background fsck, respectively). > I understand why a snapshot is created in (mount)/.snap - but what if I > have multiple snapshots running simultaneously ? It doesn't make a difference. > cd /.snap > rm -rf snap3 > > the _entire_ /.snap directory locks up until that command completes. Well, yes, certain file system operations are blocked until the removal of the snapshot is complete, which can take quite some time, depending on the size of the file system, because a lot of data has to be updated. So, that blocking is to be expected (unfortunately). > So, this leads me to conclude that actually, I need to do this: > > /.snap/snapshot_file > /.snap2/snapshot_file > /.snap3/snapshot_file No, it doesn't make a difference. As far as I know, the snapshot code doesn't care about the directory name where the snapshot files are placed. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. (On the statement print "42 monkeys" + "1 snake":) By the way, both perl and Python get this wrong. Perl gives 43 and Python gives "42 monkeys1 snake", when the answer is clearly "41 monkeys and 1 fat snake". -- Jim Fulton