WannabeMKII Posted February 15, 2017 Share Posted February 15, 2017 Been using TimeMachine for a month or so without any major issues, but one has popped up a couple of times. I get a 'Backup in use' or similar message which stops time machine from running. I click more info and it say's the sparse bundle is being used. The only way I can resolve the issue is to restart unraid. Anyone any ideas what may be causing the issue and how I can resolve, hopefully without having to restart the server? Thanks. Quote Link to comment
John_M Posted February 15, 2017 Share Posted February 15, 2017 (edited) There's a wealth of Time Machine information here. EDIT: The above URL is no longer valid. The author of the site died a number of years ago and the domain registration has since expired. However it is archived here. Although the information is several years old now most of it is still relevant. Edited August 14, 2018 by John_M Update of URL Quote Link to comment
jademonkee Posted August 17, 2017 Share Posted August 17, 2017 Sorry to dig up an old thread, but did you ever solve the issue? I'm having the same problem now. Quote Link to comment
WannabeMKII Posted August 17, 2017 Author Share Posted August 17, 2017 (edited) I can't actually remember what I did, but I've not had a problem for about 6 months now. Fingers crossed it stays that way and sorry I can't be of more help. Edited August 17, 2017 by WannabeMKII Quote Link to comment
jademonkee Posted August 17, 2017 Share Posted August 17, 2017 Hah ok. I'll keep looking for solutions, then. If you remember at all, please let me know. Quote Link to comment
Jorgen Posted August 21, 2017 Share Posted August 21, 2017 @jademonkee, Timely coincidence. I just had this happen on my system for the first time that I can remember (been using unRAID as a Time Machine target for at least 2 years) and remember seeing this post. Decided to do some troubleshooting. From the unRAID console, I ran this command to find all files opened on my Time Machine share (named "TimeMachine"): lsof | grep TimeMachine Which gave me this (abbreviated, there were about 50 very similar lines owned by these three processes): shfs 7747 7749 root 7u REG 9,4 8388608 5255019797 /mnt/disk4/TimeMachine/Jorgen’s MacBook Pro.sparsebundle/bands/169 afpd 24546 jorgen 11ur REG 0,30 8388608 110480 /mnt/user/TimeMachine/Jorgen’s MacBook DIR 0,30 4096 Pro.sparsebundle/bands/169 cnid_dbd 25478 nobody cwd DIR 8,17 169 470203911 /mnt/cache/system/TimeMachine/.AppleDB Which all looks normal for an AFP share being in use by Time Machine. Three processes have files open: shfs (unRAID share system), afpd (AFP, Apple's fileshare protocol) and cnidb (also part of AFP). You can see that the afpd process is started by the user name that my MacBook is using to connect to the TimeMachine share. The other two are unRAID system accounts. I suspect the files in use by either the afpd or the cnid_dbd are the ones that the error messages refers to. Now the problem is of course that the share ISN'T actually in use by the MacBook or any other Mac on my network. My best guess is that something interrupted the previous TimeMachine backup in a way that prevented the process to exit cleanly on the unRAID side. In my case, I suspect the MacBook was put to sleep mid-backup. Easy to do if you don't pay attention to the Time Machine status when you shut the laptop lid. Naturally I'd blame other family members for this... Anyhow, with a bit of research I figured out that I could kill the afpd and cnid_dbd processes by restarting AFP on unRAID. So I made sure I ejected all unRAID shares from the Macs on my network, then in the unRAID web UI went to Settings / AFP, changed Enable AFP to No and clicked Apply. I then ran the lsof command again and it came back with no results, as expected. Good, whatever had the files in use was gone. Went back to Settings and enabled AFP again. Then I kicked off another Time Machine backup form my MacBook and it completed successfully. No error message, happy days. So I don't know for sure what caused the problem, but at least I found a workaround that helped in my case. Hope this helps 1 Quote Link to comment
jademonkee Posted August 21, 2017 Share Posted August 21, 2017 Great to know, thanks! Quote Link to comment
jademonkee Posted August 22, 2017 Share Posted August 22, 2017 It happened to me again today. Further testing is needed, but I suspect it might be related to me changing network interfaces - ie moving from wifi to ethernet. I know that Timemachine should only run when it's connected to power, though, and if I connect my laptop to power, it's also going to be connected to ethernet, so Timemachine should never run while it's on wifi. But nonetheless, I suspect that when I remove my Macbook from ethernet and run it on wifi for a time, then later plug it into power + ethernet, it will then cause the 'disk in use error.' I just tried your workaround and it worked, thanks. I'll keep an eye on the happenings and see if I can nail down the cause. Cheers. Quote Link to comment
petecemi Posted August 8, 2019 Share Posted August 8, 2019 I am currently in my evaluation period of UnRaid but am facing this issue, never had any issues with my Apple TimeCapsule. I tried disabling AFP and then enabling again, but still I do not see the backup disk, not sure what else to try. Quote Link to comment
d3fault Posted August 8, 2019 Share Posted August 8, 2019 (edited) If user are using apfs you must use smb for time machine. https://support.apple.com/en-us/HT208018 SMB is in every way no the better choice for share but make sure to enable the enhanced osx functions in the smb setting. Edited August 8, 2019 by d3fault Quote Link to comment
petecemi Posted August 10, 2019 Share Posted August 10, 2019 Thanks for that d3fault, I didn't see that 'hidden' setting before and eventually managed to stop my array to enable this option, but the SMB backup share does not appear in the list of time machine available backup disks. I have set the SMB export share to Yes/Time Machine. Quote Link to comment
jademonkee Posted August 10, 2019 Share Posted August 10, 2019 I had to mount the server (I think also the time machine share) in Finder before TimeMachine would see it. You only have to mount it the first time - it'll find it automatically every time it runs after that. Quote Link to comment
d3fault Posted August 10, 2019 Share Posted August 10, 2019 You can check SpaceInvaders awesome guide for that. I had it configured this way and it works without problems. Quote Link to comment
petecemi Posted August 11, 2019 Share Posted August 11, 2019 Thanks for the help guys, the video helped. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.