From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 23 14:32:26 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2470416A4CE for ; Wed, 23 Jun 2004 14:32:26 +0000 (GMT) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EB3E43D45 for ; Wed, 23 Jun 2004 14:32:25 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (fgjajc@localhost [127.0.0.1]) by lurza.secnetix.de (8.12.11/8.12.11) with ESMTP id i5NEWN5H074722; Wed, 23 Jun 2004 16:32:23 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.12.11/8.12.11/Submit) id i5NEWMkc074721; Wed, 23 Jun 2004 16:32:22 +0200 (CEST) (envelope-from olli) Date: Wed, 23 Jun 2004 16:32:22 +0200 (CEST) Message-Id: <200406231432.i5NEWMkc074721@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, non_secure@yahoo.com In-Reply-To: <20040623002850.95962.qmail@web53302.mail.yahoo.com> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.10-RELEASE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Thu, 24 Jun 2004 12:12:33 +0000 Subject: Re: A few technical items on UFS2 and snapshots... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, non_secure@yahoo.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2004 14:32:26 -0000 Joe Schmoe wrote: > Hi - a few questions about UFS2 and snapshots: I'm not a kernel guru, but just a user like you, so take my answers with a pinch of salt ... > 1. Is it dangerous to mount all 20 possible filesystem snapshots and > _leave them mounted_ to use at any time ? I don't think there is any danger, except that you will run out of disk space sooner or later. > What about > automatically mounting all 20 snapshots at boot time ? Sorry, I fail to see what exactly you're trying to achieve. Why would you want to do that? > 2. Related to the first question, it seems like I am getting space > out of nowher e ... that is, if I fill up a drive, then make a > snapshot, then erase the drive and fill it again, You cannot fill it up again, because the snapshot still takes up all the space. When you fill the drive and make a snapshot, erasing the drive will not free any space. > 3. When I mount a snapshot, as described in the man page, but then > later mount - uw the snapshot ( to make that a writeable mount) and, > say, touch a file or create a file in the mounted snapshot ... what > exactly am I doing ? You're getting EPERM ("operation not permitted"), because snapshots are always read-only. > write file A > write file B > crash > file A exists, but B does not > write file B > crash > BOTH file A and B _no longer exist_ I think that can only happen if you modified file A in some way before the crash. Loading it into an editor and writing it back without changes might be sufficient. if the editor doesn't overwrite the original inode, but creates a new one, then the file will be lost if the change hasn't been synced before the crash. (BTW, that's a softupdates-related question, and it's not UFS2-specific.) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München 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