|
Replies:
11
-
Last Post:
Mar 30, 2007 7:01 AM
by: Toby Thain
|
|
|
Posts:
72
From:
Registered:
2/15/07
|
|
|
|
File level snapshots in ZFS?
Posted:
Mar 29, 2007 11:22 AM
|
|
Hi, Is it possible to take file level snapshots in ZFS? Suppose I want to keep a version of the file before writing new data to it, how do I do that? My goal would be to rollback the file to earlier version (i.e. discard the new changes) depending upon a policy. I would like to keep only 1 version of a file at a time and while writing new data, earlier version will be discarded and current state of file (before writing) would be saved in the version.
Thanks, -Atul _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris dot org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
|
|
|
Albert Chin
opensolaris-zfs-disc...
|
|
|
|
Re: File level snapshots in ZFS?
Posted:
Mar 29, 2007 11:31 AM
in response to: atulvid
|
|
On Thu, Mar 29, 2007 at 11:52:56PM +0530, Atul Vidwansa wrote: > Is it possible to take file level snapshots in ZFS? Suppose I want to > keep a version of the file before writing new data to it, how do I do > that? My goal would be to rollback the file to earlier version (i.e. > discard the new changes) depending upon a policy. I would like to > keep only 1 version of a file at a time and while writing new data, > earlier version will be discarded and current state of file (before > writing) would be saved in the version.
Doubt it. Snapshots are essentiall "free" and take no time so might as well just snapshot the file system.
-- albert chin (china at thewrittenword dot com) _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris dot org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
|
|
|
|
Posts:
1,859
From:
US
Registered:
6/17/05
|
|
|
|
Re: File level snapshots in ZFS?
Posted:
Mar 29, 2007 11:50 AM
in response to: atulvid
|
|
Atul Vidwansa wrote: > Hi, > Is it possible to take file level snapshots in ZFS? Suppose I want to > keep a version of the file before writing new data to it, how do I do > that? My goal would be to rollback the file to earlier version (i.e. > discard the new changes) depending upon a policy. I would like to > keep only 1 version of a file at a time and while writing new data, > earlier version will be discarded and current state of file (before > writing) would be saved in the version.
Most folks use SCCS, CVS, or some other version control system for this sort of task. These will work fine on ZFS. -- richard _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris dot org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
|
|
|
|
Posts:
72
From:
Registered:
2/15/07
|
|
|
|
Re: File level snapshots in ZFS?
Posted:
Mar 29, 2007 12:01 PM
in response to: relling
|
|
Hi Richard, I am not talking about source(ASCII) files. How about versioning production data? I talked about file level snapshots because snapshotting entire filesystem does not make sense when application is changing just few files at a time.
Regards, -atul
On 3/30/07, Richard Elling <Richard dot Elling at sun dot com> wrote: > Atul Vidwansa wrote: > > Hi, > > Is it possible to take file level snapshots in ZFS? Suppose I want to > > keep a version of the file before writing new data to it, how do I do > > that? My goal would be to rollback the file to earlier version (i.e. > > discard the new changes) depending upon a policy. I would like to > > keep only 1 version of a file at a time and while writing new data, > > earlier version will be discarded and current state of file (before > > writing) would be saved in the version. > > Most folks use SCCS, CVS, or some other version control system for this > sort of task. These will work fine on ZFS. > -- richard > _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris dot org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
|
|
|
|
Posts:
1,859
From:
US
Registered:
6/17/05
|
|
|
|
Re: File level snapshots in ZFS?
Posted:
Mar 29, 2007 1:43 PM
in response to: atulvid
|
|
Atul Vidwansa wrote: > Hi Richard, > I am not talking about source(ASCII) files. How about versioning > production data? I talked about file level snapshots because > snapshotting entire filesystem does not make sense when application is > changing just few files at a time.
CVS supports binary files. The nice thing about version control systems is that you can annotate the versions. With ZFS snapshots, you don't get annotations. -- richard
> Regards, > -atul > > On 3/30/07, Richard Elling <Richard dot Elling at sun dot com> wrote: >> Atul Vidwansa wrote: >> > Hi, >> > Is it possible to take file level snapshots in ZFS? Suppose I want to >> > keep a version of the file before writing new data to it, how do I do >> > that? My goal would be to rollback the file to earlier version (i.e. >> > discard the new changes) depending upon a policy. I would like to >> > keep only 1 version of a file at a time and while writing new data, >> > earlier version will be discarded and current state of file (before >> > writing) would be saved in the version. >> >> Most folks use SCCS, CVS, or some other version control system for this >> sort of task. These will work fine on ZFS. >> -- richard >> _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris dot org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
|
|
|
|
Manoj Joseph
manoj@clusterfs.com
|
|
|
|
Re: File level snapshots in ZFS?
Posted:
Mar 30, 2007 6:47 AM
in response to: relling
|
|
Richard Elling wrote: > Atul Vidwansa wrote: >> Hi Richard, >> I am not talking about source(ASCII) files. How about versioning >> production data? I talked about file level snapshots because >> snapshotting entire filesystem does not make sense when application is >> changing just few files at a time. > > CVS supports binary files. The nice thing about version control systems > is that you can annotate the versions. With ZFS snapshots, you don't get > annotations.
Sure version control systems do file versioning. But, ZFS with its COW brings a new way of doing this.
I do not see applications like emacs, star office etc using SCCS/CVS. But I can easily see then using file snapshots if zfs were to offer it (am conveniently ignoring portability).
It was suggested that filesystem snapshots be used to achieve the same purpose. It would not work, if you have to roll back one file change but not others...
Extended attributes could potentially be used to annotate file snapshots... ;)
I can also see possibilities with clustered/distributed applications (parallel Postgresql perhaps?) needing to commit/revoke across servers using this. Layered distributed filesystems could potentially use this for recovery.
But I also remember a long thread on this not too long ago going nowhere. ;)
Just my $0.02.
-Manoj _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris dot org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
|
|
|
|
Toby Thain
toby@smartgames.ca
|
|
|
|
Re: File level snapshots in ZFS?
Posted:
Mar 30, 2007 7:01 AM
in response to: relling
|
|
On 29-Mar-07, at 5:43 PM, Richard Elling wrote:
> Atul Vidwansa wrote: >> Hi Richard, >> I am not talking about source(ASCII) files. How about versioning >> production data? I talked about file level snapshots because >> snapshotting entire filesystem does not make sense when >> application is >> changing just few files at a time. > > CVS supports binary files.
And Subversion supports them even better... But even more relevantly to the OP, it has cheap tagging.
--Toby
> The nice thing about version control systems > is that you can annotate the versions. With ZFS snapshots, you > don't get > annotations. > -- richard > >> Regards, >> -atul >> On 3/30/07, Richard Elling <Richard dot Elling at sun dot com> wrote: >>> Atul Vidwansa wrote: >>> > Hi, >>> > Is it possible to take file level snapshots in ZFS? _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris dot org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
|
|
|
|
Posts:
1,154
From:
US
Registered:
6/14/05
|
|
|
|
Re: File level snapshots in ZFS?
Posted:
Mar 29, 2007 4:04 PM
in response to: atulvid
|
|
On 29/03/07, Atul Vidwansa <atulvid at gmail dot com> wrote: > Hi Richard, > I am not talking about source(ASCII) files. How about versioning > production data? I talked about file level snapshots because > snapshotting entire filesystem does not make sense when application is > changing just few files at a time. > > Regards, > -atul
It does make sense if you understand how snapshots work. If you only change a few files, your snapshots aren't going to use much room.
What you want is version control, not ZFS snapshots. I highly recommend you look into them instead.
-- "Less is only more where more is no good." --Frank Lloyd Wright
Shawn Walker, Software and Systems Analyst binarycrusader at gmail dot com - http://binarycrusader.blogspot.com/ _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris dot org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
|
|
|
|
Posts:
202
From:
Singapore
Registered:
6/17/05
|
|
|
|
Re: File level snapshots in ZFS?
Posted:
Mar 29, 2007 5:51 PM
in response to: swalker
|
|
On 3/30/07, Shawn Walker <binarycrusader at gmail dot com> wrote: > On 29/03/07, Atul Vidwansa <atulvid at gmail dot com> wrote: > > Hi Richard, > > I am not talking about source(ASCII) files. How about versioning > > production data? I talked about file level snapshots because > > snapshotting entire filesystem does not make sense when application is > > changing just few files at a time. > > > > Regards, > > -atul > > It does make sense if you understand how snapshots work. If you only > change a few files, your snapshots aren't going to use much room.
This goes back to file system layout. If the production data is housed in the file system where many other changes taking place and the administrator is only interested in backing up a few of those files, file system layer snaps will not be "cheap".
> What you want is version control, not ZFS snapshots. I highly > recommend you look into them instead.
He mentioned production data and I imagine this could be "big production data". Then, CVS and the like will be too heavy and he needs to re-layout his file system. At the very least, isolating the production data into its own dataset will help.
-- Just me, Wire ... _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris dot org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
|
|
|
|
Posts:
1,154
From:
US
Registered:
6/14/05
|
|
|
|
Re: File level snapshots in ZFS?
Posted:
Mar 29, 2007 6:20 PM
in response to: weeyeh
|
|
On 29/03/07, Wee Yeh Tan <weeyeh at gmail dot com> wrote: > On 3/30/07, Shawn Walker <binarycrusader at gmail dot com> wrote: > > On 29/03/07, Atul Vidwansa <atulvid at gmail dot com> wrote: > > > Hi Richard, > > > I am not talking about source(ASCII) files. How about versioning > > > production data? I talked about file level snapshots because > > > snapshotting entire filesystem does not make sense when application is > > > changing just few files at a time. > > > > > > Regards, > > > -atul > > > > It does make sense if you understand how snapshots work. If you only > > change a few files, your snapshots aren't going to use much room. > > This goes back to file system layout. If the production data is > housed in the file system where many other changes taking place and > the administrator is only interested in backing up a few of those > files, file system layer snaps will not be "cheap".
But his example was "changing just few files at a time," so that's a different case. Let's not try to discuss multiple examples at once :)
> > What you want is version control, not ZFS snapshots. I highly > > recommend you look into them instead. > > He mentioned production data and I imagine this could be "big > production data". Then, CVS and the like will be too heavy and he > needs to re-layout his file system. At the very least, isolating the > production data into its own dataset will help.
Actually, recent version control systems can be very efficient at storing binary files. Careful consideration of the layout of your file system applies regardless of which type of file system it is (zfs, ufs, etc.).
-- "Less is only more where more is no good." --Frank Lloyd Wright
Shawn Walker, Software and Systems Analyst binarycrusader at gmail dot com - http://binarycrusader.blogspot.com/ _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris dot org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
|
|
|
|
Posts:
803
From:
Plano, TX
Registered:
4/27/05
|
|
|
|
Re: File level snapshots in ZFS?
Posted:
Mar 29, 2007 6:28 PM
in response to: swalker
|
|
On Thu, 29 Mar 2007, Shawn Walker wrote:
> On 29/03/07, Wee Yeh Tan <weeyeh at gmail dot com> wrote: > > On 3/30/07, Shawn Walker <binarycrusader at gmail dot com> wrote: > > > On 29/03/07, Atul Vidwansa <atulvid at gmail dot com> wrote: > > > > Hi Richard, > > > > I am not talking about source(ASCII) files. How about versioning > > > > production data? I talked about file level snapshots because > > > > snapshotting entire filesystem does not make sense when application is > > > > changing just few files at a time. > > > > > > > > Regards, > > > > -atul > > > > > > It does make sense if you understand how snapshots work. If you only > > > change a few files, your snapshots aren't going to use much room. > > > > This goes back to file system layout. If the production data is > > housed in the file system where many other changes taking place and > > the administrator is only interested in backing up a few of those > > files, file system layer snaps will not be "cheap". > > But his example was "changing just few files at a time," so that's a > different case. Let's not try to discuss multiple examples at once :)
The OP is long on generalities and short on specifics. Without more specifics, it's hard to provide useful input.
... snip ...
Al Hopper Logical Approach Inc, Plano, TX. al@logical-approach.com Voice: 972.379.2133 Fax: 972.379.2134 Timezone: US CDT OpenSolaris.Org Community Advisory Board (CAB) Member - Apr 2005 OpenSolaris Governing Board (OGB) Member - Feb 2006 to Mar 2007 _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris dot org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
|
|
|
|
Posts:
202
From:
Singapore
Registered:
6/17/05
|
|
|
|
Re: File level snapshots in ZFS?
Posted:
Mar 29, 2007 7:46 PM
in response to: swalker
|
|
On 3/30/07, Shawn Walker <binarycrusader at gmail dot com> wrote: > Actually, recent version control systems can be very efficient at > storing binary files.
Still no where as efficient as a ZFS snapshot.
> Careful consideration of the layout of your file > system applies regardless of which type of file system it is (zfs, > ufs, etc.).
True. ZFS does open up a whole new can of worms/flexibility.
-- Just me, Wire ... _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris dot org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
|
|
|
|
|