Skip to content

Commit

Permalink
feat(mdadm): set configfile paths to /var/lib/mdadm
Browse files Browse the repository at this point in the history
  • Loading branch information
thoro committed Oct 11, 2024
1 parent 1be0b97 commit 5e2f1b9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion storage/mdadm/files/udev-md-raid-arrays.rules
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ TEST!="md/array_state", GOTO="md_end"
ATTR{md/array_state}=="clear*|inactive", GOTO="md_end"
LABEL="md_ignore_state"

IMPORT{program}="/usr/local/sbin/mdadm --detail -c /var/run/mdadm/mdadm.conf --no-devices --export $devnode"
IMPORT{program}="/usr/local/sbin/mdadm --detail -c /var/lib/mdadm/mdadm.conf --no-devices --export $devnode"
ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
Expand Down
2 changes: 1 addition & 1 deletion storage/mdadm/files/udev-md-raid-assembly.rules
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ LABEL="md_inc"

# remember you can limit what gets auto/incrementally assembled by
# mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
ACTION=="add|change", IMPORT{program}="/usr/local/sbin/mdadm --incremental -c /var/run/mdadm/mdadm.conf --export $devnode --offroot $env{DEVLINKS}"
ACTION=="add|change", IMPORT{program}="/usr/local/sbin/mdadm --incremental -c /var/lib/mdadm/mdadm.conf --export $devnode --offroot $env{DEVLINKS}"
ACTION=="remove", ENV{ID_PATH}=="?*", RUN+="/usr/local/sbin/mdadm -If $name --path $env{ID_PATH}"
ACTION=="remove", ENV{ID_PATH}!="?*", RUN+="/usr/local/sbin/mdadm -If $name"

Expand Down
2 changes: 1 addition & 1 deletion storage/mdadm/patches/change-sysconfdir.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
PKG_CONFIG ?= pkg-config

-SYSCONFDIR = /etc
+SYSCONFDIR = /var/run/mdadm/
+SYSCONFDIR = /var/lib/mdadm/
CONFFILE = $(SYSCONFDIR)/mdadm.conf
CONFFILE2 = $(SYSCONFDIR)/mdadm/mdadm.conf
MAILCMD =/usr/sbin/sendmail -t

0 comments on commit 5e2f1b9

Please sign in to comment.