Time Machine over SMB -- Could not verify dataset

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
Gosh darn. After making the changes on this thread about 1-2 months ago, for FreeNAS 11.2-U7 things where working well for TimeMachine over SMB. Unfortunately I have two MacMachines backing up to FreeNAS using TM over SMB. Just this morning I was notified on both machines that the remote repositories were corrupted and backups needed to be recreated. As a comparison, the small arch linux Time Machine VM I spun up for comparison has had no corruption since creation about 1-2 months ago. I don't know, however at least as it stands right now, I'm not finding TM backups/SMB to be very robust with FreeNAS. On the flip side -- I'm also been concurrently running FreeNAS TM backups using AFP and yet have to have corruption notice given to me in last 1-2 months. I wish I could provide some log files to help debug the situation because situation with SMB is kind of frustrating.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Gosh darn. After making the changes on this thread about 1-2 months ago, for FreeNAS 11.2-U7 things where working well for TimeMachine over SMB. Unfortunately I have two MacMachines backing up to FreeNAS using TM over SMB. Just this morning I was notified on both machines that the remote repositories were corrupted and backups needed to be recreated. As a comparison, the small arch linux Time Machine VM I spun up for comparison has had no corruption since creation about 1-2 months ago. I don't know, however at least as it stands right now, I'm not finding TM backups/SMB to be very robust with FreeNAS. On the flip side -- I'm also been concurrently running FreeNAS TM backups using AFP and yet have to have corruption notice given to me in last 1-2 months. I wish I could provide some log files to help debug the situation because situation with SMB is kind of frustrating.

I merged in an experimental VFS module for 11.3 to help with these issues if users encounter them. "tmprotect". You'll have to wait until the actual release to use it (and it will need to be enabled through auxiliary parameters). Basically, it will take a ZFS snapshot on successful share disconnect, and has various options to auto-rollback to last snapshot if desired -- this is non-default behavior. There are also configurable parameters for snapshot retention.

Parameters currently are:
tmprotect:retention = <number of days> // defaults to 7
tmprotect:min_snaps = <minimum number of snapshots to keep> // defaults to 24
tmprotect:autorollback = "always, powerloss, never" // defaults to never

The way I envision this being used in a large environment is to use %U to automatically expand share paths so that each user gets a unique share connectpath, and enable "ixnas:zfs_auto_homedir". This will cause datasets to be automatically created for users as they connect to the share. Also set "ixnas:base_user_quota = 300G" (or whatever makes sense). This sets a userspace quota for the user on share connect, which automatically limits how large the time machine backup can grow. The tmprotect module will provide admins a way of rolling back a single user's backup to a known-good state as needed.
 
Last edited:

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
@anodos

Thanks for reply. I'm anxiously awaiting the 11.3 drop to try out the module. Thanks for your continued diligence on this issue and smb implementation within freenas
 
Top