Add VFS Settings for the home directory

  • I added Shadow Copy and Server-Side Copy to my Samba Shares as VFS Settings, which is by the way pretty awesome.

    (I have my data on btrfs and create automated snapshots regulary, which can now be seen within windows as previos version of the files).


    I want to put these settings to the home directores of my user accounts as well.

    Under OMV I activated the "Home directories" under "Users" as well as under "SMB/CIFS".

    Unluckily I do not see any possibilies to add the VFS Settings, like I could do so under the SMB/CIFS "Shares".

    I can see the settings on the very end of the samba config file (/etc/samba/smb.conf) with the capital "Home Directories", but it is - like written in the file - overwritten every time I change something in samba.


    So is there a possiblity to add the VFS attributes for the home directories as well?

  • OK, thanks for your answer!


    so I could add the VDS Object "btrfs" via:


    omv-env set OMV_SAMBA_HOMES_VFSOBJECTS "btrfs"


    But as soon as I add more like the second argument:


    omv-env set OMV_SAMBA_HOMES_VFSOBJECTS "btrfs shadow_copy2"


    I get an error:


    And I would like to add the following lines:

    vfs objects = recycle btrfs shadow_copy2

    shadow:format = @GMT_%Y.%m.%d-%H.%M.%S

    shadow:sort = desc

    shadow:snapdir = .snapshots


    Is there a possibility?

    • Offizieller Beitrag

    But as soon as I add more like the second argument:


    omv-env set OMV_SAMBA_HOMES_VFSOBJECTS "btrfs shadow_copy2"


    I get an error:

    Uhhh, you found a bug: https://github.com/openmediava…cbb0814ab2a8c0ed792f428c4


    Yes, but you need towrite your own SLS file, see https://openmediavault.readthe…html#the-saltstack-states.


    Here is the origin of the Samba SLS files.


    https://github.com/openmediava…srv/salt/omv/deploy/samba

    https://github.com/openmediava…lt/omv/deploy/samba/files


    Please search the forum to find examples how to do that.


    One hint: You need to place a file called 31customhomes.sls in/srv/salt/omv/deploy/samba/.

  • Thanks.


    I saved the 30home.sls script with some changes as additional 31customhomes.sls with the reference of customhomes.j2 in the files directory. In customhomes.j2 I put all my needed arguments and it just works fine.


    But wouldn't it be much more straight-forward if we had an field in the gui with the "erweiteren optionen" like we have for every other samba share?

  • bjoern

    Hat das Label gelöst hinzugefügt.
    • Offizieller Beitrag

    But wouldn't it be much more straight-forward if we had an field in the gui with the "erweiteren optionen" like we have for every other samba share?

    I don't want to have such fields in OMV anymore, and there are plans to remove them from other pages in OMV6. The do not fit into the concept of OMV anymore. An no, OMV is not designed to allow the user to customize things, it's intention is to ship a configuration that matches 99,9% of the users requirements. Now with Salt it is easy to customize the system if needed, but i don't want to support that via UI anymore.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!