How to enable crossrename on TrueNAS Scale SMB

tank  feature@async_destroy          enabled                        local
tank  feature@empty_bpobj            active                         local
tank  feature@lz4_compress           active                         local
tank  feature@multi_vdev_crash_dump  enabled                        local
tank  feature@spacemap_histogram     active                         local
tank  feature@enabled_txg            active                         local
tank  feature@hole_birth             active                         local
tank  feature@extensible_dataset     active                         local
tank  feature@embedded_data          active                         local
tank  feature@bookmarks              enabled                        local
tank  feature@filesystem_limits      enabled                        local
tank  feature@large_blocks           enabled                        local
tank  feature@large_dnode            enabled                        local
tank  feature@sha512                 enabled                        local
tank  feature@skein                  enabled                        local
tank  feature@edonr                  enabled                        local
tank  feature@userobj_accounting     active                         local
tank  feature@encryption             active                         local
tank  feature@project_quota          active                         local
tank  feature@device_removal         enabled                        local
tank  feature@obsolete_counts        enabled                        local
tank  feature@zpool_checkpoint       enabled                        local
tank  feature@spacemap_v2            active                         local
tank  feature@allocation_classes     enabled                        local
tank  feature@resilver_defer         enabled                        local
tank  feature@bookmark_v2            enabled                        local
tank  feature@redaction_bookmarks    enabled                        local
tank  feature@redacted_datasets      enabled                        local
tank  feature@bookmark_written       enabled                        local
tank  feature@log_spacemap           active                         local
tank  feature@livelist               enabled                        local
tank  feature@device_rebuild         enabled                        local
tank  feature@zstd_compress          enabled                        local
tank  feature@draid                  enabled                        local

Are you running CORE or SCALE?

^^

2 Likes

I thought SCALE lost aux parameters?

In the GUI, yes.

Still available in the shell, if you really want to. Your question as to how the OP did it is quite valid though, as there is both a correct and an incorrect way of doing it.

1 Like

I think there’s a mix up.

Are you actually still on SCALE 22.x?

Your version of the Linux kernel and OpenZFS may in fact require an upgrade to leverage this improved behavior with SMB and moving files across datasets.

1 Like

Indeed. Hence why I was interested how the OP was trying to apply them.

@winnielinnie, Could you have a look at your /etc/smb*.conf if there is anything with crossrename in the vfs objects?
As you are using Core it could be a Scale specific thing.
In my config there is:

[_truenas]
        vfs objects = {'parsed': ['fruit', 'streams_xattr', 'shadow_copy_zfs', 'crossrename'], 'raw': 'fruit streams_xattr shadow_copy_zfs crossrename'}

That crossrename is there because I added it to the Advanced settings. Normally it is not there but it doesn’t seem to do its job. I’m wondering if you have something in your config.

Are you trying to apply this via the TrueNAS cli?

I guess maybe it was still available in the GUI in SCALE 22.##, I don’t recall anymore.

1 Like

Fair point. I honestly can’t remember but can’t remember it being there for a while.

Shoot, you guys are right, this is an old version. When I go to check for update it says “No update available”. But I guess I have to select something in the combobox first. Damn, my bad.

So I’ll upgrade and see what happens then. Do you think I can upgrade to the latest in one go or should I go with intermediate versions?

The advice is always to do them incrementally, one at a time.

Make sure you export your configuration first, including any encryption keys, just in case.

1 Like

None.

[test]
        ea support = No
        path = /mnt/mypool
        posix locking = No
        read only = No
        smbd max xattr size = 2097152
        vfs objects = streams_xattr shadow_copy_zfs ixnas zfs_core aio_fbsd
        nfs4:chown = true
        ixnas:dosattrib_xattr = false

Remember, I have a fully upgraded pool on OpenZFS 2.2.4.


I’m not saying it will solve your issue, but upgrading to the latest version of SCALE will get you a newer Linux kernel and more up-to-date OpenZFS. Even before you “upgrade” your pool features, the problem might resolve just from upgrading your version of SCALE.

EDIT: :warning: Going from SCALE 22.x → 24.10 is a major leap. A lot has been changed, added, and removed since then. I would try to assess the upgrade before jumping into it.

2 Likes

Thanks for your advice. I’ll upgrade one by one, it will take a while. I’ll report back with the result.

Read this warning, especially if you’re using “Apps” or “k3s” or have any existing Auxiliary Parameters elsewhere, which you will no longer be able to review or edit in the new SCALE GUI.


The “Boot Environments” should hopefully keep copies of older versions of SCALE if you need to revert to them for whatever reason. Just do not “upgrade” your pool features (yet).

Please don’t skip this part:

1 Like

@winnielinnie Really appreciate your warnings. I’ll take good care. By the way I usually follow the “Single-responsibility principle” so this is just a NAS and not much else.

This might be fixed in current versions of TrueNAS. Yours is quite old.

Folks, I’ve just upgraded to ElectricEel-24.10.2. I did a quick test and it seems the problem remains the same. I’m happy to have upgraded as this was long overdue, so I probably need some time anyway to check out all the new stuff and make sure everything works as before. So I’ll let it rest for now and try again somewhere next week.

Thanks all for helping me this far!

1 Like

I don’t recommend using vfs_crossrename in production. All it’s doing is hiding the fact that you’re copying then deleting files with the added bonus that it will potentially just delete your files.

That said, generally speaking well-designed SMB clients (like in Windows) will detect you’re trying to move across filesystems and switch to a copy operation.

1 Like