-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add bcache-export-cached helper to export CACHED_UUID and CACHED_LABEL #1
Open
raharper
wants to merge
1
commit into
koverstreet:master
Choose a base branch
from
raharper:fix/bcache-missing-symlinks
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…L always Linux kernel bcache driver does not always emit a uevent[1] for when a backing device is bound to a bcacheN device. When this happens, the udev rule for creating /dev/bcache/by-uuid or /dev/bcache/by-label symlinks does not fire and removes any persistent symlink to a specific backing device since the bcache minor numbers (bcache0, 1, 2) are not guaranteed across reboots. This script reads the superblock of the bcache device slaves, ensuring the slave is a backing device via sb.version check, extracts the dev.uuid and dev.label values and exports them to udev for triggering the symlink rules in the existing rules file. 1. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1729145
Can we just fix the kernel to always emit the uevent? Has that been looked
at?
…On Feb 15, 2018 09:48, "Ryan Harper" ***@***.***> wrote:
Linux kernel bcache driver does not always emit a uevent[1] for when a
backing
device is bound to a bcacheN device. When this happens, the udev rule for
creating /dev/bcache/by-uuid or /dev/bcache/by-label symlinks does not fire
and removes any persistent symlink to a specific backing device since the
bcache
minor numbers (bcache0, 1, 2) are not guaranteed across reboots[2][3].
This script reads the superblock of the bcache device slaves, ensuring the
slave
is a backing device via sb.version check, extracts the dev.uuid and
dev.label
values and exports them to udev for triggering the symlink rules in the
existing
rules file.
1. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1729145
2. https://bugs.launchpad.net/bcache-tools/+bug/1728742
3. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890446
------------------------------
You can view, comment on, or merge this pull request online at:
#1
Commit Summary
- Add bcache-export-cached helper to export CACHED_UUID and
CACHED_LABEL always
File Changes
- *M* 69-bcache.rules
<https://github.com/koverstreet/bcache-tools/pull/1/files#diff-0> (7)
- *M* Makefile
<https://github.com/koverstreet/bcache-tools/pull/1/files#diff-1> (2)
- *A* bcache-export-cached
<https://github.com/koverstreet/bcache-tools/pull/1/files#diff-2> (31)
- *M* initcpio/install
<https://github.com/koverstreet/bcache-tools/pull/1/files#diff-3> (1)
- *M* initramfs/hook
<https://github.com/koverstreet/bcache-tools/pull/1/files#diff-4> (1)
Patch Links:
- https://github.com/koverstreet/bcache-tools/pull/1.patch
- https://github.com/koverstreet/bcache-tools/pull/1.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB5r7moaGvFIV3TyXyVdDcyS93SV2ecHks5tVEPIgaJpZM4SG9M3>
.
|
On Thu, Feb 15, 2018 at 10:09 AM, koverstreet <[email protected]>
wrote:
Can we just fix the kernel to always emit the uevent? Has that been looked
at?
Yes, we have.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1729145
Specifically:
https://launchpadlibrarian.net/348212191/0001-bcache-decouple-emitting-a-cached_dev-CHANGE-uevent.patch
It may, or may not make it back to much older kernels were bcache is in
use; so similar
to working around blkid versions which didn't detect bcache, it's still
useful to have a
user-space solution.
…
On Feb 15, 2018 09:48, "Ryan Harper" ***@***.***> wrote:
> Linux kernel bcache driver does not always emit a uevent[1] for when a
> backing
> device is bound to a bcacheN device. When this happens, the udev rule for
> creating /dev/bcache/by-uuid or /dev/bcache/by-label symlinks does not
fire
> and removes any persistent symlink to a specific backing device since the
> bcache
> minor numbers (bcache0, 1, 2) are not guaranteed across reboots[2][3].
>
> This script reads the superblock of the bcache device slaves, ensuring
the
> slave
> is a backing device via sb.version check, extracts the dev.uuid and
> dev.label
> values and exports them to udev for triggering the symlink rules in the
> existing
> rules file.
>
> 1. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1729145
> 2. https://bugs.launchpad.net/bcache-tools/+bug/1728742
> 3. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890446
>
> ------------------------------
> You can view, comment on, or merge this pull request online at:
>
> #1
> Commit Summary
>
> - Add bcache-export-cached helper to export CACHED_UUID and
> CACHED_LABEL always
>
> File Changes
>
> - *M* 69-bcache.rules
> <https://github.com/koverstreet/bcache-tools/pull/1/files#diff-0> (7)
> - *M* Makefile
> <https://github.com/koverstreet/bcache-tools/pull/1/files#diff-1> (2)
> - *A* bcache-export-cached
> <https://github.com/koverstreet/bcache-tools/pull/1/files#diff-2> (31)
> - *M* initcpio/install
> <https://github.com/koverstreet/bcache-tools/pull/1/files#diff-3> (1)
> - *M* initramfs/hook
> <https://github.com/koverstreet/bcache-tools/pull/1/files#diff-4> (1)
>
> Patch Links:
>
> - https://github.com/koverstreet/bcache-tools/pull/1.patch
> - https://github.com/koverstreet/bcache-tools/pull/1.diff
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#1>, or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
AB5r7moaGvFIV3TyXyVdDcyS93SV2ecHks5tVEPIgaJpZM4SG9M3>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKbJU7uxSGUgVl6qQ2MUgEYx60qhlvOCks5tVFa-gaJpZM4SG9M3>
.
|
For the record, here are the upstream kernel submission discussions: |
dahefanteng
pushed a commit
to dahefanteng/bcache-tools
that referenced
this pull request
Jun 2, 2020
From: Ryan Harper <[email protected]> koverstreet/bcache-tools#1 Add bcache-export-cached helper to export CACHED_UUID and CACHED_LABEL always Linux kernel bcache driver does not always emit a uevent[1] for when a backing device is bound to a bcacheN device. When this happens, the udev rule for creating /dev/bcache/by-uuid or /dev/bcache/by-label symlinks does not fire and removes any persistent symlink to a specific backing device since the bcache minor numbers (bcache0, 1, 2) are not guaranteed across reboots. This script reads the superblock of the bcache device slaves,ensuring the slave is a backing device via sb.version check, extracts the dev.uuid and dev.label values and exports them to udev for triggering the symlink rules in the existing rules file. 1. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1729145 Signed-off-by: Shaoxiong Li <[email protected]>
Please close this PULL REQUEST as it is outdated. Latest version is in: |
@raharper I amended your patch with the PATH change and will go from there. Keeping credits and all, just so you dont have to worry about following this closer. Doing the Debian & Ubuntu inner work now. |
dahefanteng
pushed a commit
to dahefanteng/bcache-tools
that referenced
this pull request
Aug 19, 2020
koverstreet/bcache-tools#1 Add bcache-export-cached helper to export CACHED_UUID and CACHED_LABEL always Linux kernel bcache driver does not always emit a uevent[1] for when a backing device is bound to a bcacheN device. When this happens, the udev rule for creating /dev/bcache/by-uuid or /dev/bcache/by-label symlinks does not fire and removes any persistent symlink to a specific backing device since the bcache minor numbers (bcache0, 1, 2) are not guaranteed across reboots. This script reads the superblock of the bcache device slaves,ensuring the slave is a backing device via sb.version check, extracts the dev.uuid and dev.label values and exports them to udev for triggering the symlink rules in the existing rules file. 1. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1729145 Signed-off-by: Shaoxiong Li <[email protected]>
andreatomassetti
pushed a commit
to andreatomassetti/bcache-tools
that referenced
this pull request
Mar 9, 2022
koverstreet/bcache-tools#1 Add bcache-export-cached helper to export CACHED_UUID and CACHED_LABEL always Linux kernel bcache driver does not always emit a uevent[1] for when a backing device is bound to a bcacheN device. When this happens, the udev rule for creating /dev/bcache/by-uuid or /dev/bcache/by-label symlinks does not fire and removes any persistent symlink to a specific backing device since the bcache minor numbers (bcache0, 1, 2) are not guaranteed across reboots. This script reads the superblock of the bcache device slaves,ensuring the slave is a backing device via sb.version check, extracts the dev.uuid and dev.label values and exports them to udev for triggering the symlink rules in the existing rules file. 1. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1729145 Signed-off-by: Shaoxiong Li <[email protected]> Signed-off-by: Coly Li <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Linux kernel bcache driver does not always emit a uevent[1] for when a backing
device is bound to a bcacheN device. When this happens, the udev rule for
creating /dev/bcache/by-uuid or /dev/bcache/by-label symlinks does not fire
and removes any persistent symlink to a specific backing device since the bcache
minor numbers (bcache0, 1, 2) are not guaranteed across reboots[2][3].
This script reads the superblock of the bcache device slaves, ensuring the slave
is a backing device via sb.version check, extracts the dev.uuid and dev.label
values and exports them to udev for triggering the symlink rules in the existing
rules file.