mirror of
https://github.com/schoebel/mars
synced 2025-01-21 23:04:04 +00:00
infra: add new udev rules
This commit is contained in:
parent
85658c8157
commit
747d8cd0e0
22
userspace/udev/65-mars.rules
Normal file
22
userspace/udev/65-mars.rules
Normal file
@ -0,0 +1,22 @@
|
||||
# This file contains the rules to create named MARS devices.
|
||||
|
||||
# Although I want to clear the sticky bit explicitly via MODE=, it
|
||||
# does not work. This seems to be an undocumented feature; I found
|
||||
# only an changelog entry dealing with the sticky bit, which I did
|
||||
# not understand. Probably the RUN= can be made simpler.
|
||||
|
||||
# The following description is stolen from the DRBD udev rules.
|
||||
# The rule itself is very different, not stolen.
|
||||
# DO NOT WRAP THIS LINE
|
||||
#
|
||||
# old udev does not understand some of it,
|
||||
# and would end up skipping only some lines, not the full rule.
|
||||
# which can cause all sort of trouble with strange-named device nodes
|
||||
# for completely unrelated devices,
|
||||
# resulting in unusable network lookback, etc.
|
||||
#
|
||||
# in case this is "accidentally" installed on a system with old udev,
|
||||
# having it as one single line avoids those problems.
|
||||
#
|
||||
# DO NOT WRAP THIS LINE
|
||||
SUBSYSTEM=="block", KERNEL=="mars/*", MODE="00600", GROUP="disk", RUN="/bin/chmod -t /dev/$kernel"
|
26
userspace/udev/README
Normal file
26
userspace/udev/README
Normal file
@ -0,0 +1,26 @@
|
||||
TST August 2014
|
||||
|
||||
On some distros / versions, udev rules for MARS are needed.
|
||||
|
||||
Without any udev rules, /dev/mars/mydata is created with the sticky bit set.
|
||||
As a result, the device will not vanish when leaving primary state.
|
||||
|
||||
In turn, some commands like "marsadm secondary" will complain about that
|
||||
by means of timeouts.
|
||||
|
||||
On other distros / versions, catch-all rules are present which _would_
|
||||
prevent the sticky bit problem. However, some syntax errors prevent this.
|
||||
|
||||
This directory contains distro- and version-dependent stuff. I did not have
|
||||
the time to fully analyze all distros / distro versions and their udev
|
||||
rules.
|
||||
|
||||
Since I am not an expert in writing udev rules (and I just needed
|
||||
a quickfix for my own work), the files in this directoy should
|
||||
be regarded as examples.
|
||||
|
||||
For example, the file 65-mars.rules should be copied to /lib/udev/rules.d/
|
||||
on some newer Debian distros. OTOH, some elder Debians don't seem to
|
||||
need this (but may need debian-udev.patch).
|
||||
|
||||
Distro maintainers should improve on this and/or provide better solutions.
|
Loading…
Reference in New Issue
Block a user