Skip to main content

Device-mapper multipath

v0.1.4

Inspect device-mapper multipath: the multipath topology (multipath -ll), the effective config (multipath -t), and live path + map state queried from the running multipathd. Read-only.

4 allowed by default
Pack ID
multipath
Vendor
emisar
OS
linux
Actions
4
Required binaries. Install these on the host before relying on the pack — an action that calls a missing one fails at run time.
multipath multipathd

Install

emisar pack install fetches this pack, re-validates it, and verifies its content hash against the --hash below — the exact bytes this page was rendered against, so a tampered copy is rejected — before copying it into the runner's packs dir. The command reloads a running daemon itself; no manual restart.

on the runner host
sudo emisar pack install multipath --hash sha256:82fa3008872d9aecfdc36387fa6e590f73828f40fb6c799d7bcfc8c75de12274

Setup

Reads the local host's multipath topology and queries the running multipathd — no credentials needed. multipath and multipathd both need root (device-mapper + the daemon control socket).

Host access

Run these commands yourself on the runner host. Emisar shows and copies setup recipes; it never runs them.

Read device-mapper state and the multipathd control socket as root.

multipath.topologymultipath.configmultipath.daemon_pathsmultipath.daemon_maps

Run the Emisar service as root

Grant access
sudo install -d -m 0755 /etc/systemd/system/emisar.service.d
printf '%s\n' '[Service]' 'User=root' 'Group=root' | sudo tee /etc/systemd/system/emisar.service.d/10-multipath-host-access.conf >/dev/null
sudo systemctl daemon-reload
sudo systemctl restart emisar
Verify access
test "$(systemctl show emisar --property=User --value)" = root

Impact: Every Emisar action on this runner executes as root and can reach host block devices and the multipath daemon, including actions from other installed packs.

Notes

  • The multipathd show ... actions query the running daemon over its control socket; if multipathd isn't running they return an error.

Verify it works

Runs multipath.topology, a low-risk read that confirms the pack can reach its target. Run it on the host once the pack is installed; pack install runs it for you.

on the runner host
sudo emisar pack verify multipath

Install and configure a pack walks through the whole sequence on a host.

Actions 4 total

View on GitHub
  • multipath.config exec low Low — read-only or trivially reversible

    multipath -t

    Show effective multipathd configuration (merged built-in defaults + multipath.conf).

    View source on GitHub
  • multipath.daemon_maps exec low Low — read-only or trivially reversible

    multipathd show maps

    List multipath maps from the running multipathd (name, wwid, path count, queueing state).

    View source on GitHub
  • multipath.daemon_paths exec low Low — read-only or trivially reversible

    multipathd show paths

    Show per-path state from the running multipathd (dev, dm state, path checker, latency).

    View source on GitHub
  • multipath.topology exec low Low — read-only or trivially reversible

    multipath -ll

    Show full multipath topology — each multipath device (wwid, alias, vendor/product), its path groups, and per-path state (active/enabled, dm status, path checker result).

    View source on GitHub