-
Notifications
You must be signed in to change notification settings - Fork 72
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
filter out zero-sized devices by looking at "size" attribute in sysfs to avoid "no medium found" errors #13
Comments
The errors are produced when device nodes exist for devices that don't exist on the system. It's udev's job to create and remove device nodes at the right time, so maybe there's something odd happening with udev. To check if a command is actually reading a device you would need to run it with -vvvv and look at the debugging. (The open error could occur when lvm tries to open the device to check its size, for example, not necessarily to read it.) The lvm2-pvscan service should be running pvscan --cache |
The
Normally, the |
Actually, if it's Is there anything logged in dmesg/systemd journal about those devices? |
...so, yes, these There's some more info about this in this commit: Back to the report:
|
You're right @prajnoha. I've run
This is caused by a multicard reader I have plugged in. If I try to read from any empty slot I do have errors Do you want me to share the complete output of the command for completeness? |
Yes, that's it - the card... If you remove the card, there's still a device representation present on the system and we end up with "no media found" error (...the same would happen for CD/DVD/BD drives after removing the media). So this is all expected then. I got a bit mislead by the error message that was without the reason given:
I'd expect that to be:
Anyway, we know now... We do have an internal filter to filter out devices which do not have enough size to hold a PV. Thing is, that for this filter to work, we need to open the device and run We could possibly improve this by looking at
And we could make this a part of the lvm2/lib/filters/filter-usable.c Lines 108 to 164 in 420af27
lvm2/lib/filters/filter-usable.c Lines 94 to 106 in 420af27
I'll think about adding this... |
Cool. Many thanks for helping me to understand this. It's not big deal but a bit misleading because I totally forgot about that card reader hehe. |
Not sure if this is an issue or an expected behaviour, so let's ask.
If I run pvscan without
--cache
anduse_lvmetad
option is enabled in configuration, I'd expect second command from the example to not scan devices again, which looks like it's happening.Also, but not strictly related, is it normal that
[email protected]
unit in systemd runs without cache at boot? For some reason I started to see... open failed
messages during boot process.This is for lvm2 2.02.183 version on Arch Linux.
Thanks!
The text was updated successfully, but these errors were encountered: