Damon Atkins
2007-Jul-27 10:26 UTC
[zfs-discuss] ZFS with HDS TrueCopy and EMC SRDF [CloseSync]
>Date: Thu, 26 Jul 2007 20:39:09 PDT >From: "Anton B. Rang" <rang at acm.org>>That said, I?m not sure exactly what this buys you for disk replication. What?s special about files >which have been closed? Is the point that applications might close a file and then notify some other >process of the file?s availability for use?Yes E.g. 1 Program starts output job,and completes job in OS Cache on Server A. Server A tells batch scheduling software on Server B, that job is complete. Server A Crashes, file no longer exists or is truncated due to what is left in the OS Cache. Server B Schedules the next job, on the assumption that the file creates on Server A is ok. E.g. 2 Program starts output job,and completes job in OS Cache on Server A. A DB on Server A running in a different ZFS Pool, updates a DB record to record the fact the output is complete (DB uses O_DSYNC) Server A Crashes, file no longer exists or is truncated due to what is left in the OS Cache. Server A DB contains information saying that the file is completed. I believe that sync-on-close should be the default. File systems integrity should be more than just being able to read a file which has been truncated due to a system crash/power failure etc. E.g. 3 (a bit cheeky -:) $ vi xxxx a file, save the file, system crashes, you look back at the screen and you say thank god, I save the file in time, because on your screen in the prompt $ again. This is all happening in the OS Cache file. When the system returns the file does not exist. (I am ignoring vi -r) $ vi xxxxx $ connection lost Therefore users should do $ vi xxxxx $ sleep 5 ; echo file xxxxx now on disk :-) $ echo add a line > xxxxx $ sleep 5; echo update to xxxxx complete UFS forcedirectio and VxFS closesync ensure that what ever happens your files will always exist if the program completes. Therefore with Disk Replication (sync) the file exists at the other site at its finished size. When you introduce DR with Disk Replication, general means you can not afford to lose any save data. UFS forcedirectio has a larger performance hit than VxFS closesync. Cheers