SMB Time Machine on 12.0-BETA

ler

Dabbler
Joined
Jul 4, 2015
Messages
49
I'm getting:

The network backup disk does not support the required capabilities.

when I try to use time machine to back up to my SMB share that was working fine on 11.3U3.2.

What piece(s) am I missing?

freenas# testparm -s
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
aio max threads = 2
bind interfaces only = Yes
disable spoolss = Yes
dns proxy = No
enable web service discovery = Yes
interfaces = 127.0.0.1 192.168.200.2 2600:1700:210:b180:230:48ff:fecf:2b1c
kernel change notify = No
load printers = No
logging = file
max log size = 51200
nsupdate command = /usr/local/bin/samba-nsupdate -g
registry shares = Yes
restrict anonymous = 2
server role = standalone server
server string = FreeNAS Server
unix extensions = No
idmap config *: range = 90000001-100000000
fruit:nfs_aces = No
idmap config * : backend = tdb
directory name cache size = 0
dos filemode = Yes


[smb-tm]
ea support = No
path = /mnt/data/smb-tm
read only = No
vfs objects = zfs_space zfsacl streams_xattr
fruit:resource = stream
fruit:metadata = stream
fruit:time machine = yes
nfs4:chown = true
freenas# smbstatus -b

Samba version 4.12.3
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
freenas# smbstatus -b

Samba version 4.12.3
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
freenas# smbstatus -b

Samba version 4.12.3
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
3800 ler ler 2600:1700:210:b180:c14a:dd5f:ad59:7491 (ipv6:2600:1700:210:b180:c14a:dd5f:ad59:7491:55856) SMB3_02 - partial(AES-128-CMAC)
freenas#
 

c77dk

Patron
Joined
Nov 27, 2019
Messages
468
The section for (quite fast, yay!) TM in my setup is:

[TimeMachine]
ea support = No
kernel share modes = No
path = /mnt/vault/TimeMachine/%U
posix locking = No
read only = No
vfs objects = aio_fbsd tmprotect fruit streams_xattr shadow_copy_zfs ixnas
ixnas:default_user_quota = 1T
ixnas:zfs_auto_homedir = true
tmprotect:auto_rollback = powerloss
fruit:resource = stream
fruit:metadata = stream
fruit:time machine = yes
nfs4:chown = true
 

ler

Dabbler
Joined
Jul 4, 2015
Messages
49
Thanks, @c77dk this seems(!) to allow the backup:
[smb-tm]
ea support = No
path = /mnt/data/smb-tm
read only = No
vfs objects = aio_fbsd tmprotect fruit streams_xattr shadow_copy_zfs ixnas
tmprotect:auto_rollback = powerloss
fruit:resource = stream
fruit:metadata = stream
fruit:time machine = yes
nfs4:chown = true
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
@anodos ideas here?
Looks like the migration to 12.0 stripped vfs_fruit.
vfs objects = zfs_space zfsacl streams_xattr
12 does away with the "vfs objects" portion of the SMB share config in favor of certain pre-defined presets. We migrate shares based off new standard configuration in 11.3 carefully to place in new preset-based config (and checkboxes). Older shares kind of becomes best-effort to migrate in auxiliary parameters. In this particular edge case best-effort was evidently not quite good enough.
 

ler

Dabbler
Joined
Jul 4, 2015
Messages
49
Thanks, @anodos for the explanation. My backups still seem slow (1G interfaces, 1500 MTU)/SMB share.

What else is missing? What else would be helpful?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Thanks, @anodos for the explanation. My backups still seem slow (1G interfaces, 1500 MTU)/SMB share.

What else is missing? What else would be helpful?
Well, the time machine backup is going to be repeatedly calling aio_fsync(). Check zilstat for zil activity and maybe test along that line to see if the fsync is bottlenecking performance for you.
 

ler

Dabbler
Joined
Jul 4, 2015
Messages
49
Doesn't LOOK to me like it. (but I'm NO expert):

Code:
freenas# zilstat -M -t -p data -l 30 txg
waiting for txg commit...
TIME                        txg       N-MB     N-MB/s N-Max-Rate       B-MB     B-MB/s B-Max-Rate    ops  <=4kB 4-32kB >=32kB
2020 Jul  7 21:47:52   10735206          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:47:57   10735207          0          0          0          3          0          3     36      7      0     29
2020 Jul  7 21:48:02   10735208          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:48:08   10735209          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:48:13   10735210          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:48:18   10735211          0          0          0          3          0          3     38      1      2     35
2020 Jul  7 21:48:23   10735212          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:48:28   10735213          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:48:33   10735214          0          0          0          1          0          1     28      7      0     21
2020 Jul  7 21:48:38   10735215          0          0          0          1          0          0     21      3      2     16
2020 Jul  7 21:48:43   10735216          0          0          0          2          0          2     31      7      1     23
2020 Jul  7 21:48:48   10735217          0          0          0          3          0          3     38      8      2     28
2020 Jul  7 21:48:53   10735218          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:48:58   10735219          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:49:03   10735220          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:49:08   10735221          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:49:13   10735222          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:49:18   10735223          1          0          1          3          0          3     40      8      2     30
2020 Jul  7 21:49:23   10735224          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:49:28   10735225          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:49:33   10735226          0          0          0          1          0          1     50     29      4     17
2020 Jul  7 21:49:38   10735227          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:49:43   10735228          0          0          0          2          0          2     34      8      3     23
2020 Jul  7 21:49:48   10735229          0          0          0          3          0          3     37      8      2     27
2020 Jul  7 21:50:01   10735230          0          0          0          0          0          0      1      1      0      0
2020 Jul  7 21:50:06   10735231          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:50:11   10735232          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:50:16   10735233          0          0          0          0          0          0     10      1      2      7
2020 Jul  7 21:50:21   10735234          0          0          0          1          0          1     23      0      0     23
2020 Jul  7 21:50:26   10735235          0          0          0          0          0          0      0      0      0      0
TIME                        txg       N-MB     N-MB/s N-Max-Rate       B-MB     B-MB/s B-Max-Rate    ops  <=4kB 4-32kB >=32kB
2020 Jul  7 21:50:31   10735236          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:50:36   10735237          0          0          0          0          0          0      0      0      0      0
2020 Jul  7 21:50:41   10735238          0          0          0          0          0          0      0      0      0      0
^C
2020 Jul  7 21:50:46   10735239          0          0          0          3          0          1     36      7      0     29

freenas#
 

ChrisChros

Patron
Joined
Nov 24, 2018
Messages
218
Looks like the migration to 12.0 stripped vfs_fruit.
vfs objects = zfs_space zfsacl streams_xattr
12 does away with the "vfs objects" portion of the SMB share config in favor of certain pre-defined presets. We migrate shares based off new standard configuration in 11.3 carefully to place in new preset-based config (and checkboxes). Older shares kind of becomes best-effort to migrate in auxiliary parameters. In this particular edge case best-effort was evidently not quite good enough.
Hello,
I changed now also to the Beta of TrueNAS 12 and I figured also the problem with the not working TimeMachine Backups.
How can I now bring it back to work?
For me it looks like I have to change the "vfs object" line to "aio_fbsd tmprotect fruit streams_xattr shadow_copy_zfs ixnas". But where can I do this?

If I try to change the /usr/local/etc/smb4.conf by editing the "vfs object" line, save everything and restart the smb service it will not adopt my changes.

Regards Chris
 
Last edited:

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Edit the properties of your Time Machine share:

1595797050179.png
 

ChrisChros

Patron
Joined
Nov 24, 2018
Messages
218
Thanks @Samuel Tai
unfortunately at the moment its not working in my case.

Code:
[Time Machine Backup]
    comment = Time Machine Backup
    ea support = No
    path = /mnt/TankDrive/TMB
    read only = No
    vfs objects = aio_fbsd tmprotect fruit streams_xattr shadow_copy_zfs ixnas
    streams_xattr:store_stream_type = no
    streams_xattr:prefix = user.
    fruit:locking = netatalk
    fruit:resource = file
    fruit:metadata = netatalk
    fruit:time machine = yes
    nfs4:chown = true


Changes are accepted but still not able to connect to my TMB.
Any other suggestions how to bring time machine back to work?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Did you restart SMB after making the changes?
 

ChrisChros

Patron
Joined
Nov 24, 2018
Messages
218
Yes I restarted the service. TMB is also asking for User and password. I then see only the "connecting with" window and that's it.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
fruit:locking = netatalk
^^^ This feature in VFS fruit can cause the smbd process for the client session to crash. I don't believe I got the fix into BETA1, but it should be fixed in BETA2 and nightlies. Try removing the AFP share.
 

ChrisChros

Patron
Joined
Nov 24, 2018
Messages
218
@anodos
At the moment I do not have any AFP share, also the AFP service is not running at the moment.

I have created a bug report.
 
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
@anodos
At the moment I do not have any AFP share, also the AFP service is not running at the moment.

I have created a bug report.
Regardless of whether an AFP share is configured, Time Machine backups will fail in 12.0 if "fruit:locking = netatalk".
Code:
commit ab17b8be61441892733d72ee4fdc95f7486f97ae
Author: Andrew Walker <awalker@ixsystems.com>
Date:   Tue Jul 14 12:06:33 2020 -0400

    Samba s3:locking:share_mode_lock - fix crash in freeing shared mode lock
    
    Samba crashes during time machine backup when trying to TALLOC_FREE the
    static shared mode lock data. This is because in the particular code
    path in question, the static share mode is not allocated via talloc as
    consequeunce of dbwrap abstractions. Address this issue by getting the
    static shared mode data via alternative means and continuing. Also add
    an extra check to see whether the memory for the data is talloc'ed before
    free.


Unfortunately, the fix isn't in BETA1. So you will need to remove the fruit:locking parameter. I requested a debug file in your bug ticket so that I can investigate why the multi-protocol AFP/SMB config options are being added in your case.
 

ChrisChros

Patron
Joined
Nov 24, 2018
Messages
218
got it working. In the past I had an AFP Share for TMB. This was still enabled under Sharing -> AFP. After disabling this share fruit:locking changed to stream.
Code:
[Time Machine Backup]
    comment = Time Machine Backup
    ea support = No
    path = /mnt/TankDrive/TMB
    read only = No
    vfs objects = aio_fbsd tmprotect fruit streams_xattr shadow_copy_zfs ixnas
    fruit:resource = stream
    fruit:metadata = stream
    fruit:time machine = yes
    nfs4:chown = true
 
Last edited:

andrema2

Explorer
Joined
Aug 3, 2011
Messages
83
What I'm seeing is TMs BKPs failing from time to time. Looks like the share is not found anymore. I have to stop and restart the service.

I haven't done any change on the parameters as you seem to be done.
 

c77dk

Patron
Joined
Nov 27, 2019
Messages
468
What I'm seeing is TMs BKPs failing from time to time. Looks like the share is not found anymore. I have to stop and restart the service.

I haven't done any change on the parameters as you seem to be done.
This is on 12-BETA? Sounds like how I experienced the stability in 11.x - in 12-BETA and a fresh install I haven't had any problems with TM at all.
 
Top