Ad Widget

Collapse

LLD macros and regexprs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cscott
    Junior Member
    • Jul 2012
    • 16

    #1

    LLD macros and regexprs

    I want to get auto discovery to check both the fs type and name via a regexp

    The systems in question are zfs and have many fs, and I want to exclude part of the tree and the psuedo fs

    My regexps work individually but when I try to combine them they fail, or rather the macros arent generating the string I think they are.


    eg
    regexpr is

    FS_discovery
    1 » (btrfs|ext2|ext3|ext4|jfs|reiser|xfs|ffs|ufs|jfs|j fs2|vxfs|hfs|ntfs|fat32|zfs) [Result is TRUE]
    2 » .(el-)*archive-[0-9]+.* [Result is FALSE]

    when I use the macro {$FSTYPE} on its own i get just zfs fs but all of them as expected.

    If i use {$FSNAME} as the macro i get all pseudo fs as well as zfs except ones under the path matching line 2 (in this case /archive-1/)

    this proves both bits of the regexpr works.

    However when I try to use both the macros in the filer box i dont get anything working on the 2nd macro

    eg if i have the following in the LLD filter macro field i only get part 1 of the regexpr kicking in, and vice versa if I swap them around

    {#FSTYPE},{#FSNAME}

    I am pretty sure the problem lies with the string im trying to generate with the macros isnt working like i think it supposed to (not done many macros yet, so its probably my cluelessness)

    I am expecting to to generate a string like the following

    zfs,/rpool
    zfs,/
    zfs,/archive-1/
    etc

    what am i missing here?
    Last edited by cscott; 12-07-2012, 11:09.
  • cscott
    Junior Member
    • Jul 2012
    • 16

    #2
    I have tried a global user macro combining the output of{#FSTYPE} and {#FSNAME} but it didnt seem to help 8(

    Comment

    • hrens
      Junior Member
      • Jul 2012
      • 1

      #3
      I'm also interested in the solution.
      I'm added "zfs" to FSTYPE regexp, but some exclusions by FSNAME needed.
      Are combining both filters (by FSTUPE and FSNAME) possible ?

      Comment

      • cscott
        Junior Member
        • Jul 2012
        • 16

        #4
        I have had to create a huge regexpr to filter out all the psuedo file systems from bsd, linux, and solaris, and others I want to drop out and not use the FSTYPE. Its not elegant but it does work, but will need some maintainance if i find it misses some special cases in the future. Having it filter on FSNAME and FSTYPE would be far more robust

        Comment

        • jvandenbroek
          Junior Member
          • Oct 2011
          • 15

          #5
          I'll second this. I'd like to filter some Windows drive letters, but also make sure it doesn't include CDROM drive letters. Is there some other way to achieve this?

          Comment

          Working...