Hi Edward,
My question was does snapshot instantly get committed to disk or its
kept in memory till next TXG. If its kept in memory till next TXG will
sync=always solve this problem.
Regards,
Justin Skariah.
On 10/14/2011 05:33 PM, Edward Ned Harvey wrote:
From: opensolaris-discuss-boun...@opensolaris.org [mailto:opensolaris-
discuss-boun...@opensolaris.org] On Behalf Of Justin Skariah
I have a doubt regarding zfs snapshots. When I take a zfs snapshot does it
commit to the disk after logging in ZIL or it remains in ZIL till a DMU
transaction group commit happens.
At all times, there exists in RAM, a data structure that represents the
present state of the filesystem. As processes send writes to the
filesystem, those writes occur in RAM, and according to schedule, they get
committed to disk as a TXG.
If a process writes in SYNC mode, then the process cannot continue until
after the write is committed to nonvolatile storage. So ZFS immediately
records this intent in the ZIL, and then the SYNC mode write can exist in
RAM, waiting for a TXG just like all the other ASYNC mode writes. Meanwhile
the process has been freed up to continue processing.
When you make a snapshot, the parent node of the filesystem is copied and
preserved. It's an instant operation. I don' t know if this is instantly
committed to disk, or if it's allowed to be buffered and written in the next
TXG.
Your question didn't really make any sense, so hopefully I've answered it.
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org