-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hook-mdev: better /dev/disk/by-id
via custom mdev script for wwid parsing and fallbacks
#227
hook-mdev: better /dev/disk/by-id
via custom mdev script for wwid parsing and fallbacks
#227
Conversation
Before this PR (Hook
|
Still not good enough for my USB-connected disks. Those have wwid with some |
5ef1d10
to
c10fd8a
Compare
Force-pushed fixed version. I had made a gross mistake (hardcoded This makes most disk devices at least appear in disk/by-id, even if they most probably won't match systemd's udev nomenclature, at least we have 'some' id. Using /dev/sdb et al directly is a recipe for disaster. |
This PR (after fixes), qemu
A different VM, using
|
/dev/disk/by-id
via custom mdev script & better by-label/uuid
via util-linux/dev/disk/by-id
via custom mdev script for wwid parsing and fallbacks
…s-literis) - original persistent-storage from upstream Alpine: - source https://gitlab.alpinelinux.org/alpine/mdev-conf/-/blob/master/persistent-storage?ref_type=heads - revision a21d1053dd5ca37538b0435d66c58a30cb273658 - this is being added as reference for future rebases; it will be shellfmt'ed and modified in later commits Signed-off-by: Ricardo Pardini <[email protected]>
… changes) - simple rename & shellfmt; separate commit for easy future rebasing Signed-off-by: Ricardo Pardini <[email protected]>
…der to produce /dev/disk/by-id entries by parsing `wwid` - this is still not-even-close to systemd's udev, but should at least add _something_ to by-id when Alpine's mdev wouldn't - if device reports model and serial, all was/is good; - introduce: - if model or serial missing, try parsing them from wwid; - falls back to using the sanitized wwid as serial if parsing fails - last resort: falls back to using 'noserial' as serial for devices that only have a model. - also adds `util-linux` related apks, which brings a more capable `blkid` - for context: https://gitlab.alpinelinux.org/alpine/mdev-conf/-/commits/master/?ref_type=HEADS - add a log of logging, which you can see with `cat /var/log/mdev.log` on Hook's console Signed-off-by: Ricardo Pardini <[email protected]>
c10fd8a
to
c361f85
Compare
hook-mdev: add
persistent-storage
script from upstream Alpine (ipsis-literis)hook-mdev: rename to
persistent-storage.sh
and shellfmt it (no real changes)hook-mdev: add customized
persistent-storage
script which tries harder to produce /dev/disk/by-id entries by parsingwwid
util-linux
related apks, which brings a more capableblkid
cat /var/log/mdev.log
on Hook's console