Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Time Machine error -1, cannot access sparsebundle (but not a NAS or WD problem)

Hello, this is my first post here, so I'll try to make it a good one!

I've been wrestling with this problem ever since I bought my Core i7 iMac (SSD + 1TB HD) over a year ago. I have not gotten Time Machine to work during that whole time. Well, I got it to work backing up directly to my internal HD, but that was just a test; it's not what I want. So let me describe this in the most clear and consise way I can:


I want the Time Machine disk to be my Synology NAS. I've configured a share on it correctly. I have an older iMac running SnowLeopard backing up to the same share on the NAS with TimeMachine successfully. But, my iMac won't do it. Whether I create the sparsebundle manually, or I let TimeMachine create it, it always gives the same "error -1". I wrote a more detailed account of my symptoms here (my message is the reply), when I thought this was a NAS-specific issue.


New development: This is not a NAS issue. I found that out by trying an experiment:


First, I tried to back up my SSD using Time Machine to my internal 1TB disk - I selected the "1 TB Secondary Disk" as the Time Machine disk. I initiated the backup, and it worked fine, putting the time machine backup in the "Backups.backupsdb" directory structure at the root of the drive. I then turned off Time Machine and "removed" the 1TB as my backup disk.


Then, I created a sparsebundle at the root of the drive using this command:


hdiutil create -size 150g -fs HFS+J -volname "Time Machine" NAME_xxxxxxxxxxxx.sparsebundle


(where the "xxxxxxxxxxxx" is my ethernet MAC address). I then selected the "1 TB Secondary Disk" as the Time Machine disk again. Time Machine found my sparsebundle and started working with it... and got "error -1"! So even on a local drive, when Time Machine tries to use a sparsebundle for backing up, it still doesn't work.


Now, I have the console log entries that were written during the Time Machine backup attempt:


----------

1/1/13 12:53:59.511 PM com.apple.backupd[4460]: Starting manual backup

1/1/13 12:54:00.780 PM com.apple.backupd[4460]: Renaming /Volumes/1 TB Secondary Disk/NAME_3c07540fdd8c.sparsebundle to /Volumes/1 TB Secondary Disk/iMac.sparsebundle

1/1/13 12:54:00.871 PM com.apple.backupd[4460]: detach: could not open /dev/disk4

1/1/13 12:54:01.260 PM com.apple.backupd[4460]: Resizing backup disk image from 161.06 GB to 999.76 GB

1/1/13 12:54:02.940 PM com.apple.backupd[4460]: Waiting 60 seconds and trying again.

1/1/13 12:55:03.378 PM com.apple.backupd[4460]: Resizing backup disk image from 161.06 GB to 999.76 GB

1/1/13 12:55:06.013 PM com.apple.backupd[4460]: Waiting 60 seconds and trying again.

1/1/13 12:56:06.619 PM com.apple.backupd[4460]: Resizing backup disk image from 161.06 GB to 999.76 GB

1/1/13 12:56:09.255 PM com.apple.backupd[4460]: Giving up after 3 retries.

1/1/13 12:56:19.263 PM com.apple.backupd[4460]: Backup failed with error: 21

1/1/13 12:56:19.265 PM com.apple.backupd[4460]: [SnapshotUtilities mountPointForVolumeRef] FSGetVolumeInfo returned: -35

1/1/13 12:56:19.265 PM com.apple.backupd[4460]: Failed to eject volume (null) (FSVolumeRefNum: 0; status: -35; dissenting pid: -1)

1/1/13 12:56:19.265 PM com.apple.backupd[4460]: Failed to eject Time Machine disk image: /Volumes/1 TB Secondary Disk/iMac.sparsebundle

----------


So, here I see it tries to resize the sparsebundle to the full volume size, and fails. I don't think I want it to do this resize, because I don't want it to fill up my whole NAS share. I searched and found this post, which specifies how to set the permissions in the sparsebundle such that it won't be resized. I followed those instructions with a new sparsebundle, and see the same problem... tries to resize, and fails.


I do not have Western Digital software installed and never have.


I've tried everything on this page.


It seems like the attempt to resize is corrupting the sparsebundle. Before starting the backup, I can mount the sparsebundle and manually copy files to it. After attempting the backup, I can mount the sparsebundle, but I cannot copy anything to it manually. Note that I can mount the sparsebundle that the MacBook Pro uses for Time Machine, and manually copy files to and from it (in other words, the correct SnowLeopard configuration does allow manual copying).


I have tried repairing the sparsebundle using the Disk Utility, which restores the ability to manually copy files to it, but Time Machine once again renders it unwriteable when it attempts to back up.


Anyone know of anything else I can try? Thank you so much!


Dan

iMac (27-inch Mid 2011), OS X Mountain Lion (10.8.2)

Posted on Jan 1, 2013 2:59 PM

Reply
9 replies

Jan 2, 2013 6:35 PM in response to dan.aylward

dan.aylward wrote:


Hi Pondini,


Thank you for your input, but I've already gone through all of those options, as I stated in my main post:


"I've tried everything on this page." (which links to your #C17 page)

Ah, I wondered what that link was supposed to be -- it doesn't link to anything. 😟


The link you posted is quite old. It mentions 10.6.3; on 10.6.3 and 10.6.4 only, Time Machine resizes the sparse bundle any time it's changed. But it doesn't do that anymore -- it sometimes resizes it on the first backup, but then leaves it alone.


It's not entirely clear if it failed when you let Time Machine create the sparse bundle, and you don't change the permissions (or anything else). If not, or if you're not sure, try that again. Don't even open the sparse bundle while TM is trying to create or back up to it, just to be sure. If you can get it working, you can limit the size of the sparsebundle via the procedure in #A8 of Time Machine - Troubleshooting.


You also mention copying files to the sparse bundle manually; if you're doing that as a test, fine, but don't do that with one you want to back up to.

Jan 2, 2013 9:53 PM in response to Pondini

Yeah, sorry about the broken link. I noticed that link wasn't working after I replied, then I edited my earlier reply. Also, yes, copying the files was just meant as a test; I created new clean sparsebundles for other tries.


Anyway, I'm not too worried about the resizing for now; first things first, let's just get Time Machine working with a sparsebundle at all.


I don't know how to make Time Machine create its own sparsebundle on my local drive; if there isn't a manually created sparsebundle at the root, it just puts everything in the "Backups.backupsdb" directory structure without a sparsebundle. However, it of course does create its own sparsebundle when I point it to my NAS share (as I understand it, Time Machine knows the NAS filesystem doesn't support everything it needs, so it creates the sparsebundle to emulate the correct filesystem). As I have always gotten the same "error -1" when using the NAS share as I did when using the local sparsebundle, I was assuming the same problem was happening in both cases... but now I've checked the console log after doing a backup attempt on the NAS share, and I see different stuff:


------

1/2/13 9:21:12.000 PM kernel[0]: AFP_VFS afpfs_mount: /Volumes/TM Backups, pid 9615

1/2/13 9:21:12.000 PM kernel[0]: AFP_VFS afpfs_mount : succeeded on volume 0xffffff8148d5b008 /Volumes/TM Backups (error = 0, retval = 0)

1/2/13 9:21:13.000 PM kernel[0]: AFP_VFS afpfs_unmount: /Volumes/TM Backups, flags 0, pid 9624

1/2/13 9:21:13.000 PM kernel[0]: AFP_VFS afpfs_unmount : We are the last mnt/sbmnt using volume /Volumes/TM Backups 0xffffff8148d5b008

1/2/13 9:21:13.000 PM kernel[0]: AFP_VFS afpfs_unmount : We are the last volume using socket /Volumes/TM Backups 0xffffff8148d5b008

1/2/13 9:21:49.647 PM com.apple.backupd[9623]: Starting manual backup

1/2/13 9:21:49.737 PM com.apple.backupd[9623]: Attempting to mount network destination URL: afp://dan@NASty.local/TM%20Backups

1/2/13 9:22:00.060 PM com.apple.backupd[9623]: Mounted network destination at mount point: /Volumes/TM Backups using URL: afp://dan@NASty.local/TM%20Backups

1/2/13 9:22:00.000 PM kernel[0]: AFP_VFS afpfs_mount: /Volumes/TM Backups, pid 9630

1/2/13 9:22:00.000 PM kernel[0]: AFP_VFS afpfs_mount : succeeded on volume 0xffffff8148ffb008 /Volumes/TM Backups (error = 0, retval = 0)

1/2/13 9:22:15.323 PM com.apple.backupd[9623]: Creating disk image /Volumes/TM Backups/iMac.sparsebundle

1/2/13 9:22:46.397 PM com.apple.backupd[9623]: Failed to hide extension on /Volumes/TM Backups/iMac.sparsebundle, error: Error Domain=NSCocoaErrorDomain Code=4 "The file “iMac.sparsebundle” doesn’t exist." UserInfo=0x7fe881407700 {NSURL=file://localhost/Volumes/TM%20Backups/iMac.sparsebundle/, NSFilePath=/Volumes/TM Backups/iMac.sparsebundle, NSUnderlyingError=0x7fe8814073c0 "The operation couldn’t be completed. No such file or directory"}.

1/2/13 9:23:10.209 PM com.apple.backupd[9623]: Failed to eject volume /Volumes/TM Backups (FSVolumeRefNum: -153; status: -47; dissenting pid: 0)

1/2/13 9:23:10.210 PM com.apple.backupd[9623]: Waiting 60 seconds and trying again.

1/2/13 9:24:10.241 PM com.apple.backupd[9623]: Network destination already mounted at: /Volumes/TM Backups

1/2/13 9:24:56.305 PM com.apple.backupd[9623]: Failed to eject volume /Volumes/TM Backups (FSVolumeRefNum: -153; status: -47; dissenting pid: 0)

1/2/13 9:24:56.305 PM com.apple.backupd[9623]: Waiting 60 seconds and trying again.

1/2/13 9:25:56.326 PM com.apple.backupd[9623]: Network destination already mounted at: /Volumes/TM Backups

1/2/13 9:26:40.171 PM com.apple.backupd[9623]: Failed to eject volume /Volumes/TM Backups (FSVolumeRefNum: -153; status: -47; dissenting pid: 0)

1/2/13 9:26:40.171 PM com.apple.backupd[9623]: Giving up after 3 retries.

1/2/13 9:26:50.177 PM com.apple.backupd[9623]: Backup failed with error: 21

1/2/13 9:26:50.178 PM com.apple.backupd[9623]: [SnapshotUtilities mountPointForVolumeRef] FSGetVolumeInfo returned: -35

1/2/13 9:26:50.178 PM com.apple.backupd[9623]: Failed to eject volume (null) (FSVolumeRefNum: 0; status: -35; dissenting pid: -1)

1/2/13 9:26:50.178 PM com.apple.backupd[9623]: Failed to eject Time Machine disk image: /Volumes/TM Backups/iMac.sparsebundle


------


So... looking through this, it does some mounting, which all works fine, then it does a create sparsebundle, which appears to work fine, but then it tries to "hide extension", but it can't because it can't find the sparsebundle that it supposedly created. Then it tries three times to eject the NAS share ('TM Backups'), and fails, and gives up. At this time I get the "error -1" pop up on my monitor, and check the NAS share (using the disk utility on the NAS managment page), and sure enough there is the sparsebundle "iMac.sparsebundle". So why does it create it, but then not be able to use it?


Skiing tomorrow, must sleep now. :-)

Jan 2, 2013 10:22 PM in response to dan.aylward

dan.aylward wrote:

. . .

I don't know how to make Time Machine create its own sparsebundle on my local drive;

No, it won't. It doesn't use sparsebundles on internal or directly-connected internal HDs. It just puts the Backups.backupdb folder at the top level of the partition.


If you partition the drive (or use an external), it should work just fine, without a sparse bundle.


However, it of course does create its own sparsebundle when I point it to my NAS share (as I understand it, Time Machine knows the NAS filesystem doesn't support everything it needs, so it creates the sparsebundle to emulate the correct filesystem).

Yes, it does that for any network backup, whether to a Time Capsule, USB drive connected to a Time Capsule or other Mac, or a NAS.



So... looking through this, it does some mounting, which all works fine, then it does a create sparsebundle, which appears to work fine, but then it tries to "hide extension", but it can't because it can't find the sparsebundle that it supposedly created.


Actually, it first creates the sparsebundle with a temporary name (apparently while it's formatting and/or placing the control files inside it), then renames it. Failing to hide the extension is odd, but common.


Perhaps there's something about the Synology NAS that's preventing some of that. I don't have one, or know much about them, but what instructions does Synology have for setting-up Time Machine? Some NASs say to let Time Machine make it, others give instructions for you to do it manually, and I think some have a separate option on the NAS that you have to run.



Three things to try when you get the time:


Since you have a Mac running Snow Leopard that works with the NAS, it sounds like you may have had the NAS for a while. There were some changes in Time Machine when Lion came out, so be sure the NAS software is up to date. That might be all you need.


If not, after it fails, go to the Time Machine Preferences window, de-select your NAS as the backup destination, and disconnect from the NAS. Then delete the /Library/Preferences/com.apple.TimeMachine.plist file. Go back to the TM Prefs window and try to select the NAS again. If you can select it, TM should start a backup to it (it will wait 120 seconds if the prefs window is active). Do not attempt to look at the sparse bundle until it gets started copying data, to prevent access conflicts.


If still no success, try following Synology's instructions. Many folks do get it to work, but I have no idea which models and software versions work with which versions of OSX.



Once you get it to work, of course, use the procedure in #A8 of Time Machine - Troubleshooting to resize the sparse bundle.

Jan 4, 2013 9:49 AM in response to Pondini

Skiing was fun yesterday. Now back to wrestling with time machine (I call that "work").


First, I'm a little embarrassed to realize that this might be a NAS-specific issue after all, in which case it may be off-topic a bit in this forum, and I should be pursuing this on the Synology message board thread. But no one has been paying attention to me there, so I'll take my chances here.


So, regarding updates to the NAS software/firmware, I've long thought that my problem might be solved by either a Synology DSM update or an Apple MountainLion update, so I religiously install updates whenever I notice they're available. So far, obviously, no dice.


Your second suggestion gave me hope - I tried every combination I could think of, disconnecting the share, rebooting, even rebooting into safe mode, deleting the com.apple.TimeMachine.plist file, trying the backup with the sparsebundle already there (from a previous failed attempt), and also with it deleted, and i always get the same thing. When the sparsebundle isn't there, the first error in the console log is that it can't hide the extension on the iMac.sparsebundle, but if it is there, the first error is:


1/4/13 9:15:19.025 AM com.apple.backupd[44]: Failed to eject volume /Volumes/TM Backups (FSVolumeRefNum: -110; status: -47; dissenting pid: 0)


Googling that error, I found a suggestion that it could be caused by Spotlight trying to index the network share, so I used this command to tell Spotlight to leave the share alone:


touch .metadata_never_index


Still no success; the same errors appear in log every time Time Machine runs.


Regarding following Synology's instructions, I have done that as carefully as I can - The Synology DSM allows you to create many shares, but specify only one of them as a "Time Machine" share. When I do that, the share magically appears in the list to choose from when clicking "Select Disk" in the Time Machine prefs, and that's exactly what I've done. It certainly seems like it's intended to work.


Even with the precautions I've taken to ensure access conflicts are not occurring, my best guess based on the error is that there is still some other process/entity accessing or locking the share or the sparsebundle. Is there any way to display network file locks (without risking a Heisenberg-like problem, where the check affects the result)?

Jan 4, 2013 10:20 AM in response to dan.aylward

dan.aylward wrote:

. . .

Googling that error, I found a suggestion that it could be caused by Spotlight trying to index the network share, so I used this command to tell Spotlight to leave the share alone:


touch .metadata_never_index

As I understand it, you have to create a file named .metadata_never_index on the volume in question. Since the dot means it's a hidden file, and most apps won't let you use a dot as the first character, that's not easy. And, as far as I know, and according to the man page, all the touch command does is change creation and/or modification dates.


Try this instead: Go to System Preferences > Spotlight > Privacy, and drag the share to it from a Finder window.


Even if either of those works, it won't completely stop indexing, as Time Machine will index the backups -- it won't work properly otherwise. And it shouldn't be necessary anyhow.


The Synology DSM allows you to create many shares, but specify only one of them as a "Time Machine" share.

How is that done -- with a command on the Mac, via an option on the NAS, or ?



Even with the precautions I've taken to ensure access conflicts are not occurring, my best guess based on the error is that there is still some other process/entity accessing or locking the share or the sparsebundle. Is there any way to display network file locks (without risking a Heisenberg-like problem, where the check affects the result)?

Not that I know of. 😟 Are there any other Macs (or even PCs) on your network that might be trying to access it?



This is all very odd. A number of Synology users here have gotten it to work, fairly easily from what they've posted, so I don't know what gremlin you may have run across.

Jan 4, 2013 11:12 AM in response to Pondini

Touch creates a file if it doesn't exist, and I used "ls -a" to make sure it was there after creating it. The file is also visible in the Synology DSM UI file browser.


The Time Machine share is specified in the Synology DSM UI. On the Synology control panel, select "Win/Mac/NFS", go to the "Mac File Service" tab, make sure "Enable Mac File Service" is checked, then choose the desired time machine share from the dropdown titled "Time Machine".


The one other computer on my network is asleep the whole time I've been trying this. It's the one that backs up successfully to the same share (when it's not sleeping, of course).


Sigh... Thank you so much, Pondini, for spending this time to try to help me out. If I figure out a solution someday, I'll be sure to post it here.

Jan 4, 2013 11:35 AM in response to dan.aylward

dan.aylward wrote:


Touch creates a file if it doesn't exist

Oh, you're right -- I've only used it a couple of times, never for that, and completely forgot. 😊



The Time Machine share is specified in the Synology DSM UI. On the Synology control panel, select "Win/Mac/NFS", go to the "Mac File Service" tab, make sure "Enable Mac File Service" is checked, then choose the desired time machine share from the dropdown titled "Time Machine".

Ah, ok, so it is Synology's code, that aparently works fine for others.


The only other long shot I can think of is, something damaged in the installation of OSX on that Mac. You might try installing a fresh copy. Takes a while to download (unless you saved the installer), and probably won't help, but might be worth a try.


And/or, maybe with the holidays over, you'll get some help on Synology's forum.

Time Machine error -1, cannot access sparsebundle (but not a NAS or WD problem)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.