Has anyone encountered any file corruption when snapping ZFS file systems? How does ZFS handle open files when compared to other file system types that use similar technology ie. Veritas, etc...?? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20100131/9117bc88/attachment.html>
On Jan 31, 2010, at 6:55 AM, Tony MacDoodle wrote:> Has anyone encountered any file corruption when snapping ZFS file systems?I''ve had no problems. My first snapshot was in June 2006 and I''ve been regularly snapshotting since then.> How does ZFS handle open files when compared to other file system types that > use similar technology ie. Veritas, etc...??VxFS is not at all similar. ZFS is a copy-on-write file system, so a snapshot merely changes the free side of the alloc/free process. -- richard
On Sun, 31 Jan 2010, Tony MacDoodle wrote:> Has anyone encountered any file corruption when snapping ZFS file > systems? How does ZFS handle open files when compared to other file > system types that use similar technology ie. Veritas, etc...??I see that Richard did not really answer your question. Zfs snapshot captures the exact state of data which is already committed to disk. Zfs may buffer written data up to 30 seconds before committing it to disk. Synchronous writes go to disk essentially immediately, and before returning control back to the application. Since written data may be in an inconsistent state, it is certainly quite possible for a snapshot to contain "corrupted" data from the perspective of the application, similar to the way that data may be corrupted after a system panic or power failure. An application which knows about the snapshot mechanism can synchronise its data to disk before requesting a snapshot. Bob -- Bob Friesenhahn bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
On Jan 31, 2010, at 9:39 AM, Bob Friesenhahn wrote:> On Sun, 31 Jan 2010, Tony MacDoodle wrote: > >> Has anyone encountered any file corruption when snapping ZFS file systems? How does ZFS handle open files when compared to other file system types that use similar technology ie. Veritas, etc...?? > > I see that Richard did not really answer your question.Yes, there are many cases where applications can get out of sync, as Bob mentions. But from the file system perspective, ZFS snapshots are safe.> > Zfs snapshot captures the exact state of data which is already committed to disk. Zfs may buffer written data up to 30 seconds before committing it to disk. Synchronous writes go to disk essentially immediately, and before returning control back to the application.Also, when you take a snapshot, the txgs will be committed prior to the snap. -- richard> > Since written data may be in an inconsistent state, it is certainly quite possible for a snapshot to contain "corrupted" data from the perspective of the application, similar to the way that data may be corrupted after a system panic or power failure. An application which knows about the snapshot mechanism can synchronise its data to disk before requesting a snapshot. > > Bob > -- > Bob Friesenhahn > bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ > GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss