"Disk shares" shows up empty


Recommended Posts

So I wanted to use my unRAID box for backing up my MacBook and it seems like the best way of doing that, is by using a disk share. 

However, when I enable disk shares and browse to the page, it's totally blank. 

 

Looking at the HTML, it seems like uBlock could have done something with it (the element said something like ublock-blocked). So I tried disabling uBlock and tried from another browser as well. I do run a pihole DNS server at home, but when I tail the log file, nothing shows up when browsing to the disk share - also, every other page on the unRAID device works fine. 

 

Should I whitelist any IPs/address or is something else up? 

Link to comment
10 hours ago, diskplace said:

So if I understand it correctly, I would have to dedicate an entire drive to time machine backups?

You don't have to dedicate a whole disk. You can set a limit to the amount used by Time Machine in the AFP Security Settings for that share. Personally, I wouldn't use disk shares though. You could create a user share for Time Machine to use, but set Included Disks (it's on the same page, under Share Settings) to just the disk you want it to use, and also set Use cache disk to No.

Link to comment
10 hours ago, John_M said:

You don't have to dedicate a whole disk. You can set a limit to the amount used by Time Machine in the AFP Security Settings for that share. Personally, I wouldn't use disk shares though. You could create a user share for Time Machine to use, but set Included Disks (it's on the same page, under Share Settings) to just the disk you want it to use, and also set Use cache disk to No.

I always recommend not using Disk Shares. Anything you can do with a Disk Share you can do with a User Share with the appropriate settings.

Link to comment

Using a network share as a Time Machine destination is problematic, even using Apple's own Time Capsule. An external hard disk plugged into the USB port of your Mac is much faster and much more reliable. The weakness is in the use of the sparse bundle disk image. A sparse bundle consists of a containing folder, a few database files, a plist that stores the current state of the image and nested subfolders containing many many thousands of small (8 MiB) 'band' files. An image file has to be used in order to recreate the necessary HPFS+J file system that Time Machine requires to support hard linked folders on network storage, while using many small files to create the image rather than one huge monolithic file allows updates to be made at a usable speed. But sparse bundles have shown themselves to be fragile and often Time Machine will detect a problem, spend a long time checking the image for consistency and then give up, prompting the user that it needs to start over from scratch, losing all the previous backups. Because there's a disk image on a file server a double mount is involved. First the Mac has to mount the network share, then it has to mount the sparse bundle disk image. Once that is done it treats the disk image exactly as it would a locally connected hard disk that you have dedicated to Time Machine use. Sparse bundles grow by writing more band files so you have the opportunity to specify the maximum size of the image. If you don't it will eventually grow until it fills up all the space available on the share.

 

If you still want to do it, here's what I'd do.

 

First create a user on your Unraid server that's only going to be used for Time Machine. Let's call that user 'tm'. Set a password. Now enable user shares, disable disk shares and create a new user share. Let's call it 'TMBackups'. Include just one disk and set Use cache disk to No. You can set Minimum Free Space quite low (e.g. 10 MB) since the largest files in the share will be the 8 MiB band files. Allocation method and split level are irrelevant if your user share is restricted to a single disk.

 

Under SMB Security Settings for the share, turn Export off. Under NFS Security Settings, confirm that Export is off.

 

Under AFP Security Settings, turn Export on. If you want to restrict the size occupied by your Time Machine backups do so here. Even if you want it to be able to use all the disk it's worth setting a limit so that it doesn't become totally full. I fill up my Unraid disks but I like to leave about 10 GB free. Set Security to Private and give your new user 'tm' exclusive read/write access. Consider moving the Volume dbpath away from its default location (the root of the share) to somewhere faster, where it's less likely to get damaged. The Volume database is the .AppleDB folder that can be found in the root of an AFP share. It too is fragile and benefits from fast storage. I moved mine onto my cache pool by entering the path /mnt/user/system/AppleDB (i.e. a subfolder of the pre-existing Unraid 'system' share, which by default is of type cache:prefer). This will improve both the speed and reliability of AFP shares, so do it to any other user shares you have that are exported via AFP. The system will automatically create a sub-folder named for the share, so in this example the .AppleDB folder gets moved from the root of the share and placed in a folder called /mnt/user/system/AppleDB/TMBackups.

 

Now that the user share is set up, go to your Mac. Open a Finder window and in the left-hand pane under Shared, find Tower-AFP and click it. In the right hand pane make sure you connect as user 'tm', not as your regular macOS user and not as Guest. You'll need to enter the password associated with tm's account on your server. Check the box to store the credentials on your keyring. The TMBackups share should be displayed in the Finder window. Mount it. Now open Time Machine Preferences and click "Add or remove backup disk". Under Available Disks you will see "TMBackups on Tower-AFP.local". Choose it. If Time Machine ever asks you to provide credentials then enter those for the 'tm' user, not your regular macOS user. Enter a name for the disk image (say, "Unraid TM Backups") and do not choose the encryption option, and let Time Machine create the sparse bundle image, mount it and write out the initial full backup, which will take a long time. Once it has completed, Time Machine should unmount the Unraid TM Backups image but it will probably leave the TMBackups share mounted, since you mounted it manually in the first place. You can unmount it manually or leave it until you reboot your Mac. From then on, each time Time Machine runs it will automatically mount the user share (keeping it hidden), automatically mount the sparse bundle image, perform the backup and tidy up after itself, then it will unmount the image then unmount the share, all without your interaction.

 

The use of a dedicated 'tm' account offers a degree of security but if you want your backups to be encrypted then use unRAID's encrypted whole disk file system, not the encryption option offered by Time Machine.

 

Edited by John_M
typo
  • Like 4
Link to comment
  • 4 months later...
On 12/1/2018 at 4:27 PM, John_M said:

Using a network share as a Time Machine destination is problematic, even using Apple's own Time Capsule. An external hard disk plugged into the USB port of your Mac is much faster and much more reliable. The weakness is in the use of the sparse bundle disk image. A sparse bundle consists of a containing folder, a few database files, a plist that stores the current state of the image and nested subfolders containing many many thousands of small (8 MiB) 'band' files. An image file has to be used in order to recreate the necessary HPFS+J file system that Time Machine requires to support hard linked folders on network storage, while using many small files to create the image rather than one huge monolithic file allows updates to be made at a usable speed. But sparse bundles have shown themselves to be fragile and often Time Machine will detect a problem, spend a long time checking the image for consistency and then give up, prompting the user that it needs to start over from scratch, losing all the previous backups. Because there's a disk image on a file server a double mount is involved. First the Mac has to mount the network share, then it has to mount the sparse bundle disk image. Once that is done it treats the disk image exactly as it would a locally connected hard disk that you have dedicated to Time Machine use. Sparse bundles grow by writing more band files so you have the opportunity to specify the maximum size of the image. If you don't it will eventually grow until it fills up all the space available on the share.

 

If you still want to do it, here's what I'd do.

 

First create a user on your Unraid server that's only going to be used for Time Machine. Let's call that user 'tm'. Set a password. Now enable user shares, disable disk shares and create a new user share. Let's call it 'TMBackups'. Include just one disk and set Use cache disk to No. You can set Minimum Free Space quite low (e.g. 10 MB) since the largest files in the share will be the 8 MiB band files. Allocation method and split level are irrelevant if your user share is restricted to a single disk.

 

Under SMB Security Settings for the share, turn Export off. Under NFS Security Settings, confirm that Export is off.

 

Under AFP Security Settings, turn Export on. If you want to restrict the size occupied by your Time Machine backups do so here. Even if you want it to be able to use all the disk it's worth setting a limit so that it doesn't become totally full. I fill up my Unraid disks but I like to leave about 10 GB free. Set Security to Private and give your new user 'tm' exclusive read/write access. Consider moving the Volume dbpath away from its default location (the root of the share) to somewhere faster, where it's less likely to get damaged. The Volume database is the .AppleDB folder that can be found in the root of an AFP share. It too is fragile and benefits from fast storage. I moved mine onto my cache pool by entering the path /mnt/user/system/AppleDB (i.e. a subfolder of the pre-existing Unraid 'system' share, which by default is of type cache:prefer). This will improve both the speed and reliability of AFP shares, so do it to any other user shares you have that are exported via AFP. The system will automatically create a sub-folder named for the share, so in this example the .AppleDB folder gets moved from the root of the share and placed in a folder called /mnt/user/system/AppleDB/TMBackups.

 

Now that the user share is set up, go to your Mac. Open a Finder window and in the left-hand pane under Shared, find Tower-AFP and click it. In the right hand pane make sure you connect as user 'tm', not as your regular macOS user and not as Guest. You'll need to enter the password associated with tm's account on your server. Check the box to store the credentials on your keyring. The TMBackups share should be displayed in the Finder window. Mount it. Now open Time Machine Preferences and click "Add or remove backup disk". Under Available Disks you will see "TMBackups on Tower-AFP.local". Choose it. If Time Machine ever asks you to provide credentials then enter those for the 'tm' user, not your regular macOS user. Enter a name for the disk image (say, "Unraid TM Backups") and do not choose the encryption option, and let Time Machine create the sparse bundle image, mount it and write out the initial full backup, which will take a long time. Once it has completed, Time Machine should unmount the Unraid TM Backups image but it will probably leave the TMBackups share mounted, since you mounted it manually in the first place. You can unmount it manually or leave it until you reboot your Mac. From then on, each time Time Machine runs it will automatically mount the user share (keeping it hidden), automatically mount the sparse bundle image, perform the backup and tidy up after itself, then it will unmount the image then unmount the share, all without your interaction.

 

The use of a dedicated 'tm' account offers a degree of security but if you want your backups to be encrypted then use unRAID's encrypted whole disk file system, not the encryption option offered by Time Machine.

 

This is great! Thanks John for the easy write up.

My Time Machine External HD just crashed at 12:01 on April 1. I guess it was trying to tell me it wasn't an April Fools joke:

37532944_ScreenShot2019-04-04at11_25_59AM.png.ceb83e8dfb2e2eb3bdda40ae312cfe65.png

Anyways, I set it up the way you wrote it up with a few changes and have my backup running right now. Fingers crossed.

The only thing I did differently was leave Minimum Free Space to 0 and am using all disks for now until I buy some dedicated TM drives. Not enough space unfortunately.

Also, although I didn't do it, wouldn't setting Use Cache Disk to Yes be beneficial once the initial backup is done? For speed? Maybe even for the initial backup with a bunch of manual Mover invoking? Not sure if I'm over thinking that. 

 

On a separate note, I was looking at Carbon Copy Cloner for some time and just bit the bullet and bought it. I know that it's best used when cloning to an external HD/SSD; however, I was hoping to make CCC backups of only my Hackintosh 250 GB SSD to my UnRAID server; and in the case of a failure, be able to just buy another SSD, put the CCC backup on it and replace the old one.

 

I've been reading about sparse bundles, sparseimages, and other CCC & UnRAID related stuff here and on the CCC help pages, but I'm confused.

Would it be best to make an SMB User Share with Enhanced OSX Operability or should I make another AFP share and export without the Time Machine option?

And once that's done, what's the best way to set CCC to perform the backups? Sparse Bundle? Sparse Image?

Lastly, my Hackintosh is currently running El Capitan but I am planning to do an update as soon as I can get a good CCC cloned drive and the Nvidia drivers are updated for Mojave (or I buy a compatible gpu). I remember reading that pre Sierra machines may not work well with SMB in this use case? Not sure.

 

Thanks for the help!

 

On 12/1/2018 at 4:27 PM, John_M said:

An external hard disk plugged into the USB port of your Mac is much faster and much more reliable.

P.S. OSX offers an option to back up to multiple locations with disk rotation. When I went to select the UnRAID share, it asked if I wanted to replace the disk or backup to both. Could be a good option.

Edited by RevelRob
Included picture
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.