From owner-freebsd-arch Sun Sep 24 13:33:54 2000 Delivered-To: freebsd-arch@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id DD4BE37B424 for ; Sun, 24 Sep 2000 13:33:51 -0700 (PDT) Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.9.3/8.9.3) with SMTP id QAA46561; Sun, 24 Sep 2000 16:33:33 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Sun, 24 Sep 2000 16:33:33 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Barry Pederson Cc: arch@freebsd.org Subject: Re: Snapshots in the Fast Filesystem In-Reply-To: <39CD0C1B.324AA1C5@geocities.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 23 Sep 2000, Barry Pederson wrote: > Is there (or will there be) some way to get a list of snapshots that > have been created on a filesystem? Kirk suggests following a convention > for naming snapshot files, but if that doesn't happen for some reason, > it would be good to have some foolproof way of determining what snaps > exist. Otherwise, I suppose you could search a filesystem for files > that -appear- to be almost as large as the filesystem itself, but that > seems kind of a kludge - and I don't know if I'd want to trust a script > to interpret those results correctly. I won't address the other issues discussed in your email, although I do have some thoughts on them, but will address this one. Snapshot files have the SF_SNAPSHOT file flag set on them -- I believe this is not cleared by ufs_getattr() and hence is probably exposed via stat(). I'm not sure our ls -ol output understands the snapshot flag, but a custom modification to ls, or a manual tool for stating and identifying files with the flag set sounds like it should work. That said, I haven't tried this :-). Given that snapshots should only be created by privileged users, hopefully you won't have the opportunity to lose one. I've been creating my snapshots under /.snapshot on the file system, matching my /.attribute file for extended attributes. In future versions of snapshots, it might be spiffy to expose mounted snapshots of directories under a .snapshot directory in each subdirectory, in the style of NetApp. You can certainly imagine the current implementation permitting it, given sufficient boredom on the part of Kirk. Robert N M Watson robert@fledge.watson.org http://www.watson.org/~robert/ PGP key fingerprint: AF B5 5F FF A6 4A 79 37 ED 5F 55 E9 58 04 6A B1 TIS Labs at Network Associates, Safeport Network Services To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message