Time Machine/AFP help

Status
Not open for further replies.

wachen

Dabbler
Joined
Dec 28, 2012
Messages
17
I am at my wits' end trying to get this to work. I have read the manual and followed the direction but still no luck.
Any feedback/help is appreciated.

Here is my set up:
I am running FreeNAS-8.3.0-RELEASE on a home-built box. I have an iMac running OS X 10.6.8

I have created a RAIDZ1 volume with 5x1TB disks, named /mnt/HomeNas1, with Owner as nobody and Group as nobody, permission of 755.

I have created a user with the following settings:
User ID: 1002
Username: Maggie
Primary Group ID: HomeUsers
Home Directory: /mnt/HomeNas1/TMachine
Full Name: Maggie
Home Directory Mode: 755
Disable password login: unchecked
Lock user: unchecked

On my Mac, the admin user name is also Maggie. The password for Maggie on both FreeNas and Mac is the same.

I have created a dataset named /mnt/HomeNas1/TMachine with a quota of 80G.
Owner(user): Maggie
Owner(Group): HomeUsers
permission of 755

An AFP share with the name of TMachine as been created with:
Path: /mnt/HomeNas1/TMachine
Allow List: Maggie
Read-Write Access: Maggie
Disk Discovery: checked
Disk discovery mode: Time Machine

Services AFP has been configured as:
Server Name: freenas
Guest Access: unchecked


When I turn on Time Machine on my iMac, I see the AFP share that I created "TMachine on freenas". When I select it, the connection bar appears. Then it asks me for my username and password. After I enter the info, I get:

Time Machine can't access the backup disk "TMachine". The operation couldn't be completed. (OSStatus error 13.)

I have also created a NFS share for a different dataset. I can connect to the NFS share from my iMac without a problem.

Thanks. Any help is appreciated.
 

bollar

Patron
Joined
Oct 28, 2012
Messages
411
Hm.

First, I'd take out the Home Directory entry -- Maggie's Home Directory isn't the Time Machine Directory.

I'd also try turning on guest access to see if that works -- if so, at least you know the mount point is working correctly and then you can turn back to the permissions problem.
 

wachen

Dabbler
Joined
Dec 28, 2012
Messages
17
Hm.

First, I'd take out the Home Directory entry -- Maggie's Home Directory isn't the Time Machine Directory.

I'd also try turning on guest access to see if that works -- if so, at least you know the mount point is working correctly and then you can turn back to the permissions problem.


Thanks for the suggestion.

Setting Maggie's home directory to /nonexistent, I still get OSStatus error 13.
With Guest access turned on (Guest account set to nobody), I get OSStatus error 2.

Here is what the log says when I try to log in as Maggie:
Dec 28 15:45:16 freenas afpd[10861]: AFP3.3 Login by Maggie
Dec 28 15:45:16 freenas afpd[10861]: AFP logout by Maggie
Dec 28 15:45:16 freenas afpd[10861]: dsi_stream_read: len:0, unexpected EOF
Dec 28 15:45:16 freenas afpd[10861]: afp_over_dsi: client logged out, terminating DSI session
Dec 28 15:45:16 freenas afpd[10861]: AFP statistics: 0.60 KB read, 0.45 KB written

Here is what the log says for guest access:
Dec 28 15:44:17 freenas afpd[10378]: AFP3.3 Login by nobody
Dec 28 15:44:17 freenas afpd[10378]: AFP logout by nobody
Dec 28 15:44:17 freenas afpd[10378]: dsi_stream_read: len:0, unexpected EOF
Dec 28 15:44:17 freenas afpd[10378]: afp_over_dsi: client logged out, terminating DSI session
Dec 28 15:44:17 freenas afpd[10378]: AFP statistics: 0.15 KB read, 0.12 KB written
 

bollar

Patron
Joined
Oct 28, 2012
Messages
411
Okay.

On my system, I have a separate Time Machine user account "timemachine" and I use this user for all of my TM backups. Put that Time Machine user in the allow list and try again. The reason I suggest this is from when I had a NAS that simply wouldn't work unless TM was logged into by someone other than the user trying to backup.

Also, make sure you don't have a share password. Doesn't sound like you do, but just checking.
 

wachen

Dabbler
Joined
Dec 28, 2012
Messages
17
Okay.

On my system, I have a separate Time Machine user account "timemachine" and I use this user for all of my TM backups. Put that Time Machine user in the allow list and try again. The reason I suggest this is from when I had a NAS that simply wouldn't work unless TM was logged into by someone other than the user trying to backup.

Also, make sure you don't have a share password. Doesn't sound like you do, but just checking.

hmmmm....
Thanks again. OK. I tried it. I created a new user, tmachineuser, on FreeNas. Put this user in the allowed list and removed Maggie from the allowed list. Now I cannot see freenas in Time Machine at all. (on my Mac, I am logged in as Maggie).

By the way, i don't have share password.

Anything else I should try?
 

bollar

Patron
Joined
Oct 28, 2012
Messages
411
hmmmm....
Thanks again. OK. I tried it. I created a new user, tmachineuser, on FreeNas. Put this user in the allowed list and removed Maggie from the allowed list. Now I cannot see freenas in Time Machine at all. (on my Mac, I am logged in as Maggie).

By the way, i don't have share password.

Anything else I should try?

Good, this is what you should expect -- not seeing Time Machine when you have a separate TM account. So now go to System Preferences: Time Machine and select "add or remove disk" Remove the backup you created and then add it back. When asked to authenticate, use the new tmachineuser account and let's see what happens.
 

wachen

Dabbler
Joined
Dec 28, 2012
Messages
17
Thanks bollar.

I can't find what you are describing. "TM Screen-1.jpg" attached is what i see when I go to System Preference: Time Machine. It has "Select Backup Disk..."

When I click on "Select Backup Disk" or click on the OFF-ON slider, "TM Screen-2.jpg" is what I see.

I figure perhaps I should go to Finder to mount the AFP share first. So, I go to Finder-Go-Connect to Server. I entered to Server Address afp://192.168.1.195. Entered tmachineuser as Name and the appropriate password. After clicking Connect, it asked me to "Enter the password for TMachine, on the file server freenas". It appears that it is asking for a share password, but I did not set a share password for TMachine dataset. Doesn't matter what I enter (or leave it blank), it tells me connection failed, "You do not have permission to access the server 192.168.1.195".
 

Attachments

  • TM Screen-1.jpg
    TM Screen-1.jpg
    36.7 KB · Views: 380
  • TM Screen-2.jpg
    TM Screen-2.jpg
    35.6 KB · Views: 353

bollar

Patron
Joined
Oct 28, 2012
Messages
411
Thanks bollar.

I can't find what you are describing. "TM Screen-1.jpg" attached is what i see when I go to System Preference: Time Machine. It has "Select Backup Disk..."

When I click on "Select Backup Disk" or click on the OFF-ON slider, "TM Screen-2.jpg" is what I see.

I figure perhaps I should go to Finder to mount the AFP share first. So, I go to Finder-Go-Connect to Server. I entered to Server Address afp://192.168.1.195. Entered tmachineuser as Name and the appropriate password. After clicking Connect, it asked me to "Enter the password for TMachine, on the file server freenas". It appears that it is asking for a share password, but I did not set a share password for TMachine dataset. Doesn't matter what I enter (or leave it blank), it tells me connection failed, "You do not have permission to access the server 192.168.1.195".

Okay, so TM isn't set up on that machine, which is fine. So, what should happen is that you click "select backup disk" and that second screen should show the TM share that you've setup on FreeNAS. You shouldn't need to log in separately. Have you tried turning the AFP service off and on in FreeNAS? Can you attach a screenshot of what the AFP and Time Machine share configurations look like in FreeNAS?
 

wachen

Dabbler
Joined
Dec 28, 2012
Messages
17
Okay, so TM isn't set up on that machine, which is fine. So, what should happen is that you click "select backup disk" and that second screen should show the TM share that you've setup on FreeNAS. You shouldn't need to log in separately. Have you tried turning the AFP service off and on in FreeNAS? Can you attach a screenshot of what the AFP and Time Machine share configurations look like in FreeNAS?

I turned the service off and back on in FreeNAS. The share did show up in Time Machine (at least some success)! However, I am getting the same error (OSStatus error 13) even using the different user name I created.

Here are some screen shots of the configurations. Please take a look.

I really appreciate all the help.

Volumes-1.jpg

AFP Share-1.jpg

AFP Share -2.jpg

Permission dataset.jpg

Permission - ZFS Volume.jpg

AFP Service.jpg

user.jpg
 

bollar

Patron
Joined
Oct 28, 2012
Messages
411
I think what I would do is change the dataset permissions:

First, try changing the permissions to include "recursively" -- stop/start the afp service -- try another TM Backup

If that doesn't work... Try changing the permissions to add write access to group and other recursively -- stop/start the afp service -- try another TM Backup

If that doesn't work... Start over. Turn off TM sharing on this dataset in AFP sharing. Then create another dataset with the settings that are supposed to work. stop/start the afp service, etc....

I really hope you don't get to step 3, but if the first two don't work, it's worth a try.
 

wachen

Dabbler
Joined
Dec 28, 2012
Messages
17
I think what I would do is change the dataset permissions:

First, try changing the permissions to include "recursively" -- stop/start the afp service -- try another TM Backup

If that doesn't work... Try changing the permissions to add write access to group and other recursively -- stop/start the afp service -- try another TM Backup

If that doesn't work... Start over. Turn off TM sharing on this dataset in AFP sharing. Then create another dataset with the settings that are supposed to work. stop/start the afp service, etc....

I really hope you don't get to step 3, but if the first two don't work, it's worth a try.

Thanks.

First two are not working. I guess I will need to start over and see if that works. Will report back later.
 

bollar

Patron
Joined
Oct 28, 2012
Messages
411
Bummer. All I can say is that I have successfully set this up here, so I know you'll eventually get a configuration that works.
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
Same here - works fine, did from the start.

My config: I have a dataset with a 1Tb quota. All other settings are at the default, as are the parent volume's settings.
The dataset is owner "tm" group "tm", mode 777 (All boxes ticked), ACL type Unix.
I share using AFP, no password, allow "tm", deny/readonly blank, disk discovery yes, mode time machine, blank database path, CR/LF no, Windows filenames no, .AppleDouble yes, AFP3 no, file perms 755, directory perms 644.

Generally I think all I did was set up the dataset with a quota, set the owner to "tm", then took the defaults for pretty much everything except discovery mode.
 

ciscoflin

Cadet
Joined
Jan 1, 2013
Messages
1
Hi,

I have the identical problem.
Any resolve the problem???? any update???

Thank you.
 

wachen

Dabbler
Joined
Dec 28, 2012
Messages
17
Success!
Just reporting back to close the loop on this thread.

After trying various things with the help of bollar, as can be seen on this thread, I finally did the last thing suggested....

I started over by removing existing TM dataset and created a new one. I removed the existing share and created a new one. And I stopped the service and set up a new one.

I basically followed section 7.1.2 of the manual to set up AFP share with guest access. Then went to the Time Machine on my Mac to select the disk. "Magically" everything just worked.
Last time, I followed section 7.1.3 of the manual, a section specifically dealing with using FreeNAS with Time Machine. Perhaps I missed a tiny thing somewhere. Who knows. It is now working.

Thanks bollar for all the help. JaimieV, thanks for the info.
ciscoflin, try 7.1.2, if you haven't already. It works for me.
 

bollar

Patron
Joined
Oct 28, 2012
Messages
411
I'm glad you got it working! I'm also annoyed that the solution was to start over with a new share, especially after all the work you went through to fix the original one.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'm sure that it could have been fixed without starting over. Of course, it could have involved alot more google searching and time spent trying to find the problem than it took to recreate everything from scratch.
 

sisyphus99

Cadet
Joined
Jan 6, 2013
Messages
2
So you're now performing you backups as guest with no authentication on your share?

Success!
Just reporting back to close the loop on this thread.

After trying various things with the help of bollar, as can be seen on this thread, I finally did the last thing suggested....

I started over by removing existing TM dataset and created a new one. I removed the existing share and created a new one. And I stopped the service and set up a new one.

I basically followed section 7.1.2 of the manual to set up AFP share with guest access. Then went to the Time Machine on my Mac to select the disk. "Magically" everything just worked.
Last time, I followed section 7.1.3 of the manual, a section specifically dealing with using FreeNAS with Time Machine. Perhaps I missed a tiny thing somewhere. Who knows. It is now working.

Thanks bollar for all the help. JaimieV, thanks for the info.
ciscoflin, try 7.1.2, if you haven't already. It works for me.

I guess if that's the only way to get it to work, I'll end up going that route, but I'd much rather have some sort of authentication myself. I'm getting same error as you after following the guide:

http://www.freenas.org/images/resou...as8.3_guide.html#__RefHeading__9150_381758029

I really don't get what the purpose of attempting to perform the user account suggestion in this step is:

A user account was created as follows:
Username: user1
Home Directory: /mnt/data/backup_user1
the Full Name, E-mail, and Password fields were set where the Username and Password match the values for the user on the Mac OS X system

The implication of that is that credentials of the OS X user are passed along when accessing the share, but that doesn't seem to be the case as is evident from the login prompt. I even tried matching the uid between FreeNAS and Lion to see if that helped. It's also worth noting that when I do receive the login prompt, my full name is present in the username field vs. the actual user id. I've tried using both thinking perhaps there is some mapping that occurs between fullname and username with AFP.

I also noticed JamieV mentioned he had AFP3 perms off in his list of settings, so I tried that, too, as it stuck out to me as a difference between his settings and defaults. Didn't work.

Going to mess around with my setup a little more and will respond with what I find.
 

sisyphus99

Cadet
Joined
Jan 6, 2013
Messages
2
Well, I was prepared to start hacking away at the configs as mentioned in this article as I noticed some differences between his suggestions and what the FreeNAS webgui writes to them:

http://thomas.pelletier.im/2012/01/freebsd-afp-timemachine-updated/

But after recreating my share w/o specifying a user in the rw access field, only the allow list (the example entry in /usr/local/etc/AppleVolumes.default from the article only specified this:

/home/thomas/tm/ "Time Machine" allow:thomas cnidscheme:dbd options:usedots,upriv,tm

So in summary, my setup is as follows:

Dataset w/ quota set to roughly 1.5x my MacBook's drive (arbitrary limit to allow for a full backup, plus some historical deltas and not take up all of my volume).
Dataset owner and group set to a user I created for myself, default perms. (755 I believe).
Share:
Name - Time Machine
Path - /mnt/path/to/dataset
Allow List - theuser
Disk Discovery - on
DD Mode - Time Machine
Enable .AppleDouble - On
AFP3 Unix Privs - Off

I suppose there's no real advantage of this over what was suggested previously (guest user squashed to nobody) with password on the share, but just sharing an alternate config known to work. Be nice to get SSO working, but at the moment I guess I'll just login.
 

James Snell

Explorer
Joined
Jul 25, 2013
Messages
50
I was having this problem and now have had some success. Not quite sure exactly what has let me in.. But here's the last few things I've done..

For my raw share - I noticed the owner was set to the user who'd created the volume. So I changed it to my owner user to my share user for Time Machine. And added write permissions to the group.

For my AFP share's settings - I removed my TM user from the 'write access' group.

I reset my AFP service.

Time Machine now seems satisfied on my machine and is now creating a backup for me.. Huh...
 
Status
Not open for further replies.
Top