Time Machine on ZFS Pool failing

Status
Not open for further replies.

simonmason

Dabbler
Joined
Oct 24, 2012
Messages
26
I keep having issues with my ZFS volume and Time Machine on my Macs. The backup fails telling me that the sparesebundle is already in use. I have checked the wiki (http://doc.freenas.org/index.php/Apple_(AFP)_Shares) and it does reference the issue and points me to this site (http://www.garth.org/archives/2011,...ine-sparsebundle-nas-based-backup-errors.html). When running these commands - the first one works, the second fails telling me that the volume is not mounted.

I did point one of my Macs to a volume on the FreeNAS that is not a ZFS pool and this works fine. Only problem - this volume is only one drive so if it fails I will have to go to the backups to get the data.

Reading the posts online it seems that there is a nightly process that "refreshes" the ZFS pool that in turn does something to the Mac sparsebundle file - causing Time Machine to think that it is corrupted.

Has anyone had any luck getting this to work? Thanks.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
I'm backing up two machines over TimeMachine with only rare errors. I haven't had to replace the sparse bundles in quite a long time.

I do occasionally get an error along the lines of the volume already being in use, but that is fixed by restarting the AFP service.

I'm one of those that cannot see how a scrub could possibly corrupt the backup and have never experienced this myself.
 

simonmason

Dabbler
Joined
Oct 24, 2012
Messages
26
Interestingly all of the backups started working again two days ago. I will try restarting the AFP service if if becomes an issue again. It does appear to be related to the ZFS setup because I tried backing up one Mac on a non-ZFS volume in my FreeNAS and had no issues.
 

ser_rhaegar

Patron
Joined
Feb 2, 2014
Messages
358
If I put my MacBook to sleep (close the lid) mid backup, it will cause the backup to stay in use and next time I won't be able to backup ("backup in use already" error) until I reset the AFP service.

My solution was to turn off automatic backups on my laptop and I backup manually instead.

Never happened outside of sleeping during a backup. Scrubs never cause the issue for me.
 

simonmason

Dabbler
Joined
Oct 24, 2012
Messages
26
The issues are with the laptops so it must be that they are going to sleep while backing up. Now, assuming that this must happen to lots of other people with MacBooks and Time machine. What is unique about storing the backup on a FreeNAS ZFS pool that causes this issue?
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
My guess would be that it's not all that uncommon, but when the issue shows up on a board devoted to ZFS and FreeNAS it's assumed to be a ZFS / FreeNAS problem. I had the same issue when I was backing up to a Drobo that was shared by another Mac. In that case though, I would just restart the backup. With FreeNAS I have the control to restart the AFP service or rollback a snapshot to a valid backup. I could restart the service on the other Mac, but I either didn't encounter that specific problem (not using Netatalk) or didn't realize the connection. I only made the connection here because I was following instructions on how to fix the backup problem that included a ton of steps that seemed redundant. I tried restarting the service on a lark and found it worked.

I should really just use cron to restart the service periodically.
 

simonmason

Dabbler
Joined
Oct 24, 2012
Messages
26
Thanks for the suggestions. I have tested and indeed restarting the AFP service does cause the Time Machine backup to start again. What is the exact syntax I would need to put in the chron job to restart the service? Thanks.
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
I'm guessing, and haven't had a chance to verify this at all, but I'm guessing it'd be "service netatalk restart". I'm not sure if that would put the GUI out of sync or not.

Doesn't hurt to try ;-)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Yeah.. I wouldn't try restarting the service from the CLI. You do not need to confuse the WebGUI by doing things manually...
 
Status
Not open for further replies.
Top