Jeb Campbell
2005-Nov-20 05:10 UTC
[zfs-discuss] Shadow copy format for snapshots and Samba
Samba has a shadow_copy module to serve read-only snapshots to windows clients. I tried to use snapshotting in freebsd 5 (haven''t tried 6), but couldn''t get it stable. I''m really looking forward to getting it going on Solaris. Anyway you can read about the format of the link here: http://us5.samba.org/samba/docs/man/Samba-HOWTO-Collection/VFS.html#id2618182 When it was working on FreeBSD, it was really slick and windows users could right-click and see the previous versions. Anyway the idea is simple -- add an option "shadowcopylinks" to zfs, and when a snapshot is created (and snapdir==visible), then do a symlink(? -- maybe something lower) from the .zfs/snapshot/snapname to @GMT-$time (time format documented in the above link -- and it must be GMT). Of course the symlink/whatever would get removed when the snapshot is removed. If we had that and auto snapshotting like 2 at 30m, 2 at 12h, 7 at 1d, 4 at 1w (take a snapshot every 30 minutes and keep the last 2, etc) -- I would be in heaven. Oh and I don''t think I have said "Thank you" or could say it enough for zfs -- I''m so excited! Anyone want to start an OpenSolaris file serving distro? Bare minimum with kernel, zfs, nfs, and samba (and libs...) -- small enough to be on a compact flash. I''ve done it with linux and the *bsd''s, but I don''t know how long it would take to get up to speed on opensolaris. jebc-devnull at c4solutions.net (remove the dev null and dash) This message posted from opensolaris.org
Jonathan Adams
2005-Nov-21 21:16 UTC
[zfs-discuss] Shadow copy format for snapshots and Samba
On Sat, Nov 19, 2005 at 09:10:06PM -0800, Jeb Campbell wrote:> Samba has a shadow_copy module to serve read-only snapshots to windows > clients. I tried to use snapshotting in freebsd 5 (haven''t tried 6), > but couldn''t get it stable. I''m really looking forward to getting it > going on Solaris. > > Anyway you can read about the format of the link here: > http://us5.samba.org/samba/docs/man/Samba-HOWTO-Collection/VFS.html#id2618182 > > When it was working on FreeBSD, it was really slick and windows users > could right-click and see the previous versions. > > Anyway the idea is simple -- add an option "shadowcopylinks" to zfs, > and when a snapshot is created (and snapdir==visible), then do a > symlink(? -- maybe something lower) from the .zfs/snapshot/snapname to > @GMT-$time (time format documented in the above link -- and it must be > GMT).I assume you mean create a symlink from: /data/shadow_share/@GMT-$SNAPNAME to: /path/.zfs/snapshot/$SNAPNAME after creating the snapshot?> Of course the symlink/whatever would get removed when the snapshot is removed. > > If we had that and auto snapshotting like 2 at 30m, 2 at 12h, 7 at 1d, 4 at 1w > (take a snapshot every 30 minutes and keep the last 2, etc) -- I would > be in heaven.Certainly sounds possible. Cheers, - jonathan -- Jonathan Adams, Solaris Kernel Development
Jeb Campbell
2005-Nov-21 22:35 UTC
[zfs-discuss] Re: Shadow copy format for snapshots and Samba
> I assume you mean create a symlink from: > /data/shadow_share/@GMT-$SNAPNAME > to: > /path/.zfs/snapshot/$SNAPNAME > > after creating the snapshot? > > > Of course the symlink/whatever would get removed > when the snapshot is removed.(Not a kernel or filesystem dev as I''m sure you can tell...) I hesitated to say symlink, because what happens when you rename the snapshot? Would something lower level in zfs be more appropriate?> > If we had that and auto snapshotting like 2 at 30m, > 2 at 12h, 7 at 1d, 4 at 1w > > (take a snapshot every 30 minutes and keep the last > 2, etc) -- I would > > be in heaven. > > Certainly sounds possible.It would take some thinking to make it elegant enough for solaris standards... Just trying to get the idea out there -- it would be a combination of cron and logrotate ;) This message posted from opensolaris.org