Hi,
I'm on the latest FFS (8.5) on macOS 10.12. I use FFS for syncing specific folders to an ZFS share (over AFP or NFS protocols) to a NAS server running FreeNAS 9.10.
My question is around the Fail-Safe File Copy option.
My understanding is that ZFS has a form of 'fail-safe file copy' built-in at file system level because its a copy-on-write filesystem. As my NAS share - and therefore the folder I'm syncing to - is on ZFS (RaidZ1) can I safely disable Fail-Sage File Copy?
Also, is there an advantage to doing so? As ZFS also uses the ZIL cache for transactional writes presumably this would mean far less write instructions and less writes to the disks which would speed up syncing considerably. It would also lower disk activity. At the moment it must be creating a .ffs copy in ZIL, then a copy of that to disk. Then checking the copy of the copy and deleting the original .ffs copy in ZIL before FFS checks the .ffs and then renames it to a non-.ffs which in ZFS means a non-.ffs copy is made and then checked against the verified .ffs before that .ffs is removed. Its like a double-layer of redundancy handshakes! Although I may have got completely the wrong end of the stick.
Any guidance would be greatly appreciated. I would just switch it off and see but I'm not 100% sure and tbh I don't want to screw up the dataset or mess something else up.
Cheers
Fail-Safe File Copy on ZFS shares
- Posts: 2
- Joined: 18 Oct 2016
- Site Admin
- Posts: 7282
- Joined: 9 Dec 2007
I don't know ZFS, but turning off fail-safe file copy is almost certainly a bad idea. When a file copy is terminated unexpectedly it will leave a garbage file behind. With "fail-safe file copy" this will be just a temporary file, without it it will have corrupted your production data.
- Posts: 2
- Joined: 18 Oct 2016
Thanks for the reply Zenju,
I think that's exactly what ZFS does on the filesystem basis. The initial copy is made to ZIL (a kind of write cache held in RAM). Once that copy is successfully made then the file is written across the zpool (in this case 3 disks in a RAIDZ1 (similar to RAID 5) configuration), checked against the copy in ZIL and if they're the same then the ZIL version is removed.
Now that I've said that I think I've answered my own question. As the ZIL is held in RAM and the extra operations are done there then having the extra layer between the disk and the network connection should have negligible effect.
I think that's exactly what ZFS does on the filesystem basis. The initial copy is made to ZIL (a kind of write cache held in RAM). Once that copy is successfully made then the file is written across the zpool (in this case 3 disks in a RAIDZ1 (similar to RAID 5) configuration), checked against the copy in ZIL and if they're the same then the ZIL version is removed.
Now that I've said that I think I've answered my own question. As the ZIL is held in RAM and the extra operations are done there then having the extra layer between the disk and the network connection should have negligible effect.