From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 25 21:20:59 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 2080A16A4CE for ; Fri, 25 Jun 2004 21:20:58 +0000 (GMT) Received: from web53302.mail.yahoo.com (web53302.mail.yahoo.com [206.190.39.231]) by mx1.FreeBSD.org (Postfix) with SMTP id 77B2643D5D for ; Fri, 25 Jun 2004 21:20:58 +0000 (GMT) (envelope-from non_secure@yahoo.com) Message-ID: <20040625211917.37738.qmail@web53302.mail.yahoo.com> Received: from [24.94.23.114] by web53302.mail.yahoo.com via HTTP; Fri, 25 Jun 2004 14:19:17 PDT Date: Fri, 25 Jun 2004 14:19:17 -0700 (PDT) From: Joe Schmoe To: freebsd-hackers@FreeBSD.ORG In-Reply-To: <200406231432.i5NEWMkc074721@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailman-Approved-At: Sat, 26 Jun 2004 12:00:49 +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 List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jun 2004 21:20:59 -0000 --- Oliver Fromme wrote: > > 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. Every snapshot I have taken so far takes up zero space on the drive, or at least that is what `df` is telling me ... when I do an `ls -asl` in the directory with the snapshots, I can see each snapshot has a filesize equal to the size of the partition that was snapshotted, but again, `df` tells me they take up zero extra space. So where is the disconnect there ? How much space is the snapshot _really_ taking up, and how do I determine that ? > > 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? I dunno - just to have all the snapshots mounted so that if I want to access one, I don't have to take the time to mount it up. I'm just lazy, I guess ... so there would be no ill effects of doing this ? > > 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. Is this really true ? Where did you read this ? (so I can go read it too...) And this goes back to my first question above - if the snapshot files all take up the same amount of space as the filesystem itself, but `df` does not show an increase in space when I make a snapshot, how do I tell what is _really_ going on ? > > 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. No, I'm not. Re-read the question - I am saying that after I mount the snapshot, I then remount it with -uw, making it writeable (with `mount -uw`), and then I can _successfully_ touch files inside that snapshot. SO what exactly am I doing then ? Have I ruined the snapshot ? Can it still be used ? What inodes and space get used when I touch files inside a write-mounted snapshot ? Should the ability to mount -uw a snapshot mount be removed (in the same way that there is an exception in the unlink system call that allows you to delete schg flagged snapshots) ?? > > 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_ Anyone else have comments on the above sequence ? Is that possible to have happen, or did I just dream it ? thanks. __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail