Compare commits

...

1 Commits

Author SHA1 Message Date
2dd9783d8c Set ownership of OSD partitions in a udev rule of its own
udev skips every key of a rule whose IMPORT{program} fails, OWNER and GROUP
included, and vitastor-disk udev exits 1 when it rejects the superblock. A
freshly added partition whose check failed stayed root:disk, and an OSD
opening it as user vitastor got EACCES. This happens with dm-multipath: the
dm partition's ready event is checked while by-partuuid still points at the
path partition. Assign ownership by partition type alone; the alias symlink
still needs a valid superblock.
2026-10-26 21:02:44 +03:00
2 changed files with 6 additions and 2 deletions

View File

@@ -1,5 +1,7 @@
# A separate rule: when IMPORT fails, udev drops every other key of its rule, OWNER included
SUBSYSTEM=="block", ENV{ID_PART_ENTRY_TYPE}=="e7009fac-a5a1-4d72-af72-53de13059903", \
OWNER="vitastor", GROUP="vitastor"
SUBSYSTEM=="block", ENV{ID_PART_ENTRY_TYPE}=="e7009fac-a5a1-4d72-af72-53de13059903", \
OWNER="vitastor", GROUP="vitastor", \
IMPORT{program}="/usr/bin/docker exec vitastor vitastor-disk udev $devnode", \
SYMLINK+="vitastor/$env{VITASTOR_ALIAS}"

View File

@@ -1,5 +1,7 @@
# A separate rule: when IMPORT fails, udev drops every other key of its rule, OWNER included
SUBSYSTEM=="block", ENV{ID_PART_ENTRY_TYPE}=="e7009fac-a5a1-4d72-af72-53de13059903", \
OWNER="vitastor", GROUP="vitastor"
SUBSYSTEM=="block", ENV{ID_PART_ENTRY_TYPE}=="e7009fac-a5a1-4d72-af72-53de13059903", \
OWNER="vitastor", GROUP="vitastor", \
IMPORT{program}="/usr/bin/vitastor-disk udev $devnode", \
SYMLINK+="vitastor/$env{VITASTOR_ALIAS}"