/usr/share/augeas/lenses/dist/multipath.aug is in augeas-lenses 1.10.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | (* Process /etc/multipath.conf *)
(* The lens is based on the multipath.conf(5) man page *)
module Multipath =
autoload xfm
let comment = Util.comment
let empty = Util.empty
let dels = Util.del_str
let eol = Util.eol
let ws = del /[ \t]+/ " "
let indent = del /[ \t]*/ ""
(* We require that braces are always followed by a newline *)
let obr = del /\{([ \t]*)\n/ "{\n"
let cbr = del /[ \t]*}[ \t]*\n/ "}\n"
let ikey (k:regexp) = indent . key k
let section (n:regexp) (b:lens) =
[ ikey n . ws . obr . (b|empty|comment)* . cbr ]
let kv (k:regexp) (v:regexp) =
[ ikey k . ws . store v . eol ]
(* FIXME: it would be much more concise to write *)
(* [ key k . ws . (bare | quoted) ] *)
(* but the typechecker trips over that *)
let qstr (k:regexp) =
let delq = del /['"]/ "\"" in
let bare = del /["']?/ "" . store /[^"' \t\n]+/ . del /["']?/ "" in
let quoted = delq . store /.*[ \t].*/ . delq in
[ ikey k . ws . bare . eol ]
|[ ikey k . ws . quoted . eol ]
let wwid = kv "wwid" (Rx.word|"*")
(* Settings that can be changed in various places *)
let common_setting =
qstr "path_selector"
|kv "path_grouping_policy" /failover|multibus|group_by_(serial|prio|node_name)/
|kv "path_checker" /tur|emc_clariion|hp_sw|rdac|directio|rdb|readsector0/
|kv "prio" /const|emc|alua|ontap|rdac|hp_sw|hds|random|weightedpath/
|qstr "prio_args"
|kv "failback" (Rx.integer | /immediate|manual|followover/)
|kv "rr_weight" /priorities|uniform/
|kv "flush_on_last_del" /yes|no/
|kv "user_friendly_names" /yes|no/
|kv "no_path_retry" (Rx.integer | /fail|queue/)
|kv /rr_min_io(_q)?/ Rx.integer
|qstr "features"
|kv "reservation_key" Rx.word
|kv "deferred_remove" /yes|no/
|kv "delay_watch_checks" (Rx.integer | "no")
|kv "delay_wait_checks" (Rx.integer | "no")
|kv "skip_kpartx" /yes|no/
(* Deprecated settings for backwards compatibility *)
|qstr /(getuid|prio)_callout/
(* Settings not documented in `man multipath.conf` *)
|kv /rr_min_io_rq/ Rx.integer
|kv "udev_dir" Rx.fspath
|qstr "selector"
|kv "async_timeout" Rx.integer
|kv "pg_timeout" Rx.word
|kv "h_on_last_deleassign_maps" /yes|no/
|qstr "uid_attribute"
|kv "hwtable_regex_match" /yes|no|on|off/
|kv "reload_readwrite" /yes|no/
let default_setting =
common_setting
|kv "polling_interval" Rx.integer
|kv "max_polling_interval" Rx.integer
|kv "multipath_dir" Rx.fspath
|kv "find_multipaths" /yes|no/
|kv "verbosity" /[0-6]/
|kv "reassign_maps" /yes|no/
|kv "uid_attrribute" Rx.word
|kv "max_fds" (Rx.integer|"max")
|kv "checker_timeout" Rx.integer
|kv "fast_io_fail_tmo" (Rx.integer|"off")
|kv "dev_loss_tmo" (Rx.integer|"infinity")
|kv "queue_without_daemon" /yes|no/
|kv "bindings_file" Rx.fspath
|kv "wwids_file" Rx.fspath
|kv "log_checker_err" /once|always/
|kv "retain_attached_hw_handler" /yes|no/
|kv "detect_prio" /yes|no/
|kv "hw_str_match" /yes|no/
|kv "force_sync" /yes|no/
|kv "config_dir" Rx.fspath
|kv "missing_uev_wait_timeout" Rx.integer
|kv "ignore_new_boot_devs" /yes|no/
|kv "retrigger_tries" Rx.integer
|kv "retrigger_delay" Rx.integer
|kv "new_bindings_in_boot" /yes|no/
(* A device subsection *)
let device =
let setting =
qstr /vendor|product|product_blacklist|hardware_handler|alias_prefix/
|default_setting in
section "device" setting
(* The defaults section *)
let defaults =
section "defaults" default_setting
(* The blacklist and blacklist_exceptions sections *)
let blacklist =
let setting =
wwid
|qstr "devnode"
|device in
section /blacklist(_exceptions)?/ setting
(* A multipath subsection *)
let multipath =
let setting =
wwid
|qstr "alias"
|common_setting in
section "multipath" setting
(* The multipaths section *)
let multipaths =
section "multipaths" multipath
(* The devices section *)
let devices =
section "devices" device
let lns = (comment|empty|defaults|blacklist|devices|multipaths)*
let xfm = transform lns (incl "/etc/multipath.conf" .
incl "/etc/multipath/conf.d/*.conf")
|