SnapRAID Plugin Rules Question

  • My intention is to exclude the directory sftp which I have on my disk volume d1.


    Using the Rules tab in the Plugin I select Volume d1, and use the browser in the Rule box to select the directory sftp from the displayed tree structure, and then select Rule type Exclude. This results in the following comment and rule being written to /etc/snapraid.conf:


    Code
    # Rule selected from /srv/dev-disk-by-label-d1
    
    
    exclude /sftp/


    Looking at the SnapRAID documentation (https://www.snapraid.it/manual), Section 8 Pattern, my interpretation of the created rule is that it applies only to the directory sftp in the root directory of the filesystem, not to the directory sftp in the root of Volume d1.


    Does anyone agree with my interpretation, or if not have another? Please look at the documentation before answering.


    It is my belief that it would be best if created rules used absolute paths, but since the box the Rule box is editable, one could make changes to arrive at different results. For example:


    sftp/ would match any directory sftp anywhere on the machine and would match multiple instances of that directory if more than one exists.


    A rule matching my exact intentions, and that seems to be in agreement with the documentation would be:




    Code
    # Rule selected from /srv/dev-disk-by-label-d1
    
    
    exclude /srv/dev-disk-by-label-d1/sftp/

    But this does not work.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

    3 Mal editiert, zuletzt von gderf ()

    • Offizieller Beitrag

    The following line is the most helpful


    Note that when you specify an absolute path starting with /, it's applied at the array root dir and not at the local file-system root dir.


    So, /sftp/ would never be an absolute path. It would be in the root of each drive in the snapraid array. And since /sftp is not on any data disk, snapraid configured by the plugin should never look at the absolute path of /sftp/. This is why the folder browser shows the path relative to the volume and not a root folder browser showing the entire OS filesystem.


    To exclude /srv/dev-disk-by-label-d1/sftp/, your exclude rule should just be /sftp/

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

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