Help please - MacBook TimeMachine fails to attach smb volume on FreeNAS on first (or any) backup

rcs123

Cadet
Joined
Apr 11, 2019
Messages
9
I've been struggling for days to try and get TimeMachine from a MacBook Pro backing up to a SMB share on FreeNAS.
It works fine on a USB attached removable drive.

I used to have TimeMachine working fine on AFP shares, but that seemed to stop working over the last couple of months and then I've read up and found out that AFP is deprecated, so have tried to get it working on SMB shares. I can't get it working on AFP either.

macOS Big Sur 11.1
FreeNAS-11.3-U5

I've searched and found a number of guides and and trouble shooting that others have done, but despite trying everything I can't seem to get the backup to work.
I've tried both WiFi connectivity and Ethernet and get the same behaviour on both.
I've also moved from using a FQDN to the IP address when configuring TimeMachine via the command line.

Can anyone share a link to some instructions that work ? Any ideas what is wrong with what I'm doing in my setup please?


Using this command to follow the TimeMachine progress on my MacBook

Code:
% log stream --style syslog --predicate 'subsystem == "com.apple.TimeMachine"' --debug



The error I get is

Code:
2021-01-25 12:07:37.094184+0000  localhost backupd[343]: (TimeMachine) [com.apple.TimeMachine:General] Attempting to mount 'smb://george@192.168.1.20/TimeMachine'
2021-01-25 12:07:41.487528+0000  localhost backupd[343]: (TimeMachine) [com.apple.TimeMachine:General] Mounted 'smb://george@192.168.1.20/TimeMachine' at '/Volumes/.timemachine/192.168.1.20/A20092D4-1FE5-4DCD-AE30-07472949021A/TimeMachine'
2021-01-25 12:07:41.488324+0000  localhost backupd[343]: (TimeMachine) [com.apple.TimeMachine:General] Initial network volume parameters for 'TimeMachine' {disablePrimaryReconnect: 0, disableSecondaryReconnect: 0, reconnectTimeOut: 60, QoS: 0x0, attributes: 0x1C}
2021-01-25 12:07:41.694717+0000  localhost backupd[343]: (TimeMachine) [com.apple.TimeMachine:General] Configured network volume parameters for 'TimeMachine' {disablePrimaryReconnect: 0, disableSecondaryReconnect: 0, reconnectTimeOut: 30, QoS: 0x20, attributes: 0x1C}
2021-01-25 12:07:42.728106+0000  localhost backupd[343]: (TimeMachine) [com.apple.TimeMachine:General] Found matching sparsebundle 'george-macbook-pro.sparsebundle' with host UUID 'F90ABC45-02DA-5125-8B4B-08B1EC246A91' and MAC address '(null)'
2021-01-25 12:07:43.399726+0000  localhost backupd[343]: (TimeMachine) [com.apple.TimeMachine:General] Not performing periodic backup verification: no previous backups to this destination.
2021-01-25 12:07:43.633408+0000  localhost backupd[343]: (TimeMachine) [com.apple.TimeMachine:General] Mountpoint '/Volumes/.timemachine/192.168.1.20/A20092D4-1FE5-4DCD-AE30-07472949021A/TimeMachine' is still valid
2021-01-25 12:07:44.281219+0000  localhost backupd[343]: (TimeMachine) [com.apple.TimeMachine:General] Checking for runtime corruption on '/Volumes/.timemachine/192.168.1.20/A20092D4-1FE5-4DCD-AE30-07472949021A/TimeMachine/george-macbook-pro.sparsebundle'
2021-01-25 12:07:54.877286+0000  localhost backupd[343]: (TimeMachine) [com.apple.TimeMachine:General] Mountpoint '/Volumes/.timemachine/192.168.1.20/A20092D4-1FE5-4DCD-AE30-07472949021A/TimeMachine' is still valid
2021-01-25 12:07:54.901330+0000  localhost backupd[343]: (TimeMachine) [com.apple.TimeMachine:General] Runtime corruption check passed for '/Volumes/.timemachine/192.168.1.20/A20092D4-1FE5-4DCD-AE30-07472949021A/TimeMachine/george-macbook-pro.sparsebundle'
2021-01-25 12:08:04.281339+0000  localhost backupd[343]: (TimeMachine) [com.apple.TimeMachine:General] Failed to attach to '/Volumes/.timemachine/192.168.1.20/A20092D4-1FE5-4DCD-AE30-07472949021A/TimeMachine/george-macbook-pro.sparsebundle', error: 112 no mountable file systems


It fails to attach to the sparse volume. Yet I CAN browse to it in Finder. I can even mount it in the DiskUtility (when it mounts the sparse volume and the backup volume within it).

I have a workflow where I delete the time machine destination, clear out the files on FreeNAS (at the FreeNAS cmd line as root) and then initiate the backup with these commands:

Code:
sudo tmutil disable
tmutil destinationinfo
sudo tmutil removedestination <destination id from above>
sudo tmutil setdestination -ap smb://george@192.168.1.20/TimeMachine
tmutil destinationinfo
sudo tmutil startbackup --auto --destination <destination ID from second tmutil cmd>



I have set these options both at the Global and Share level for every share.
Code:
fruit:time machine = yes
fruit:nfs_aces = no
inherit permissions = yes


I've opened up all the permissions I can see to try and rule out any permissions issue
Code:
root@freenas:/mnt/tank/NewTimeMachine # getfacl .
# file: .
# owner: nobody
# group: allusers
            owner@:rwxpDdaARWcCos:fd-----:allow
            group@:rwxpDdaARWcCos:fd-----:allow
         everyone@:rwxpDdaARWc--s:fd-----:allow
         everyone@:--------------:fd-----:allow


My smb4.conf (/usr/local/etc/smb4.conf) on FreeNAS
Code:
[global]
        dns proxy = No
        aio max threads = 2
        max log size = 51200
        allocation roundup size = 0
        load printers = No
        printing = bsd
        disable spoolss = Yes
        dos filemode = Yes
        kernel change notify = No
        directory name cache size = 0
        nsupdate command = /usr/local/bin/samba-nsupdate -g
        unix charset = UTF-8
        log level = 1
        obey pam restrictions = True
        enable web service discovery = True
        username map = /usr/local/etc/smbusername.map
        username map cache time = 60
        logging = file
        server min protocol = SMB2_02
        unix extensions = No
        restrict anonymous = 2
        server string = FreeNAS Server
        fruit:nfs_aces =  no
        interfaces = 127.0.0.1 192.168.1.20
        bind interfaces only = Yes
        netbios name = freenas
        netbios aliases = samba
        server role = standalone
        workgroup = FREENASGROUP
        idmap config *: backend = tdb
        idmap config *: range = 90000001-100000000
        inherit permissions =  yes

        include = /usr/local/etc/smb4_share.conf


and smb4

Code:
[TimeMachine]
        read only = no
        vfs objects = catia fruit streams_xattr shadow_copy_zfs ixnas
        fruit:metadata = stream
        fruit:resource = stream
        fruit:time machine =  yes
        fruit:volume_uuid = 4c9ede2a-8c19-4d6e-a9dc-26b3279ebfe1
        nfs4:chown = true
        nfs4:acedup = merge
        aio write size = 0
        mangled names = illegal
        ea support = false
        fruit:nfs_aces =  no
        inherit permissions =  yes
        path = /mnt/tank/TimeMachine

[software]
        comment = SMB Software Share
        read only = no
        vfs objects = catia fruit streams_xattr shadow_copy_zfs ixnas
        fruit:metadata = stream
        fruit:resource = stream
        nfs4:chown = true
        nfs4:acedup = merge
        aio write size = 0
        mangled names = illegal
        ea support = false
        fruit:time machine =  no
        fruit:nfs_aces =  no
        inherit permissions =  yes
        path = /mnt/my_data/software


The data set options are as below.
Screenshot 2021-01-25 at 12.48.21.png


When the share is mounted (by the backupd process on the MacBook I can see the options reported as
Code:
sudo smbutil statshares -a

==================================================================================================
SHARE                         ATTRIBUTE TYPE                VALUE
==================================================================================================
TimeMachine                   
                              SERVER_NAME                   192.168.1.20
                              USER_ID                       0
                              SMB_NEGOTIATE                 SMBV_NEG_SMB1_ENABLED
                              SMB_NEGOTIATE                 SMBV_NEG_SMB2_ENABLED
                              SMB_NEGOTIATE                 SMBV_NEG_SMB3_ENABLED
                              SMB_VERSION                   SMB_3.02
                              SMB_SHARE_TYPE                DISK
                              SIGNING_SUPPORTED             TRUE
                              EXTENDED_SECURITY_SUPPORTED   TRUE
                              UNIX_SUPPORT                  TRUE
                              LARGE_FILE_SUPPORTED          TRUE
                              OS_X_SERVER                   TRUE
                              DFS_SUPPORTED                 TRUE
                              FILE_LEASING_SUPPORTED        TRUE
                              MULTI_CREDIT_SUPPORTED        TRUE
                              ENCRYPTION_SUPPORTED          TRUE



I'm on the verge of giving up so grateful for any help.

Are there any other commands / approach I can use to diagnose? What log files on the MacBook should I look at ?

Thank you in advance for your help !
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703

rcs123

Cadet
Joined
Apr 11, 2019
Messages
9
I gone back to the documentation and tried to follow it through. It jumps about a bit, and isn't specific about what is needed to configure an SMB TimeMachine share.

Later on it suggests that there is a problem creating sparse bundles on a network share, so I've followed the instructions linked to https://community.netgear.com/t5/St...ne-could-not-complete-the-backup/td-p/294697#
to create a Sparse Bundle and copy it to me SMB share.

It found it and was all looking more promising but the same errors "no mountable file systems" was reported.

I definitely have access to the share.

I used a reduced set of options, and made sure I restarted samba service by stopping it and disconnecting my Mac from the network and reconnecting it (its the only way I found to get it to quickly forget the user / connections) and then reconnect and restart the samba service.

What logs, or what else can I check ?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
inherit permissions should not be set on our server. That's a POSIX ACLs hack. PM me a debug and I'll take a look at it (system->advanced->save debug).
 

rcs123

Cadet
Joined
Apr 11, 2019
Messages
9
I very grateful for your help.

There is quite a lot of info in there, I'd rather not send it all. Are there specific files that are most useful ?

I've noticed a RDONLY lock via smbstatus. I can definitely write to the share though so what does this mean?

Code:
# smbstatus -n

Samba version 4.10.18
PID     Username     Group        Machine                                   Protocol Version  Encryption           Signing             
----------------------------------------------------------------------------------------------------------------------------------------
42924   1001         1001         192.168.1.20 (ipv4:192.168.1.20:52877) SMB3_02           -                    partial(AES-128-CMAC)

Service      pid     Machine       Connected at                     Encryption   Signing     
---------------------------------------------------------------------------------------------
T2TimeMachine 42924   192.168.1.20 Mon Jan 25 18:23:24 2021 GMT     -            -           
TimeMachine  42924   192.168.1.20 Mon Jan 25 18:22:37 2021 GMT     -            -           

Locked files:
Pid          User(ID)   DenyMode   Access      R/W        Oplock           SharePath   Name   Time
--------------------------------------------------------------------------------------------------
42924        1001       DENY_NONE  0x100081    RDONLY     NONE             /mnt/tank/T2TimeMachine   .   Mon Jan 25 18:24:51 2021



# sharesec T2TimeMachine -v
REVISION:1
CONTROL:SR|DP
OWNER:
GROUP:
ACL:S-1-1-0:ALLOWED/0x0/FULL
 

rcs123

Cadet
Joined
Apr 11, 2019
Messages
9
inherit permissions should not be set on our server. That's a POSIX ACLs hack. PM me a debug and I'll take a look at it (system->advanced->save debug).
I've sent you a direct conversation with a debug output from a test system.

Thanks
 

rcs123

Cadet
Joined
Apr 11, 2019
Messages
9
I think I've found the problem. After many hours of trying everything and building a new test NAS to try out, I finally decided (I should have tried this before, though I did disable it and that didn't help) to uninstall the Sophos Home AV I run on my Mac.

Low and behold the backup proceeds... Its not finished yet but it has gone way beyond where it previously did so I'm pretty confident. That and I found this on Sophos' web site....

 
Top