SnapRAID Plugin Rules Question

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • 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:

      Source Code

      1. # Rule selected from /srv/dev-disk-by-label-d1
      2. exclude /sftp/


      Looking at the SnapRAID documentation (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:



      Source Code

      1. # Rule selected from /srv/dev-disk-by-label-d1
      2. exclude /srv/dev-disk-by-label-d1/sftp/
      But this does not work.
      --
      Google is your friend and Bob's your uncle!

      RAID - Its ability to disappoint is inversely proportional to the user's understanding of it.

      ASRock Rack C2550D4I C0 Stepping - 16GB ECC - Silverstone DS380

      The post was edited 3 times, last by gderf ().

    • 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 5.2.3 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.1
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!