Todd Nine
Dabbler
- Joined
- Nov 16, 2013
- Messages
- 37
Hey guys,
I'm a software engineer, and I'd like to contribute a solution to a common problem most Mac users seems to be experiencing with any ZFS data set and time machine (not just FreeNas)
I've run into the issue that several users have been reporting with Apple's Time Machine. It seems that every time the scrub process is executed by cron, it causes a corruption of the backup image of my time machine disk if it's mounted by the client and currently in use. I'm assuming this is due to some sort of internal checksum in the sparse image that fails after the scrub corrects the file that is the disk device (sparse image) for time machine.
In my configuration, each client has their own ZFS data set. I use this to enforce quota's per client, and permissions. Each zfs data set has it's own AFP network share. I would like to do the following every time a ZFS Scrub executes.
Pre hook
1) List all AFS shares for every time machine related ZFS data set. I'm not sure if there's a way to get this meta data from the share itself. Each share has the time machine compatibility enabled, so I'm sure it's just an awk/grep to get all the share points.
2) Stop all shares (force if necessary) returned from step 1
Job execution
3) Perform the scrub
Post hook
4) Re-enable all the hooks from 1)
I use Linux and OS X quite heavily, and I'm very comfortable with the command line. However, I'm not nearly as comfortable in the Free BSD os. If someone could give me some pointers to documentation on where I can integrate my pre and post hooks, as well as the commands to list/start/stop the shares I would really appreciate it.
Also, anything I create I would be more than happy to contribute back. It seems to be a common issue for most Mac users, and if I can contribute back to the community, that would be great!
Thanks,
Todd
I'm a software engineer, and I'd like to contribute a solution to a common problem most Mac users seems to be experiencing with any ZFS data set and time machine (not just FreeNas)
I've run into the issue that several users have been reporting with Apple's Time Machine. It seems that every time the scrub process is executed by cron, it causes a corruption of the backup image of my time machine disk if it's mounted by the client and currently in use. I'm assuming this is due to some sort of internal checksum in the sparse image that fails after the scrub corrects the file that is the disk device (sparse image) for time machine.
In my configuration, each client has their own ZFS data set. I use this to enforce quota's per client, and permissions. Each zfs data set has it's own AFP network share. I would like to do the following every time a ZFS Scrub executes.
Pre hook
1) List all AFS shares for every time machine related ZFS data set. I'm not sure if there's a way to get this meta data from the share itself. Each share has the time machine compatibility enabled, so I'm sure it's just an awk/grep to get all the share points.
2) Stop all shares (force if necessary) returned from step 1
Job execution
3) Perform the scrub
Post hook
4) Re-enable all the hooks from 1)
I use Linux and OS X quite heavily, and I'm very comfortable with the command line. However, I'm not nearly as comfortable in the Free BSD os. If someone could give me some pointers to documentation on where I can integrate my pre and post hooks, as well as the commands to list/start/stop the shares I would really appreciate it.
Also, anything I create I would be more than happy to contribute back. It seems to be a common issue for most Mac users, and if I can contribute back to the community, that would be great!
Thanks,
Todd