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
multipathd starts after filesystem mounted
#35
Comments
|
Please test with the latest code. We had some fixes for SAS expanders in 0.8.6. |
|
I backported 0.8.8 which gets rid of the I'll try compiling 0.9.0 this week and see if it changes anything. |
No SAS end device for 'end_device-0:0'multipathd starts after filesystem mounted
|
Please set |
|
Please confirm which version you were using. |
Can you show me the content of this sysfs file? |
|
We also need the udev logs. The actual problem occurs in the udev rules, when evaluating "multipath -u". You should have verbose logs from multipath in your journal already after setting |
Hm, this would prevent ALUA support to be detected properly, but it shouldn't cause the path to be misdetected. |
0.8.8
The logs from earlier are from Let me get you full logs with udev logs in a bit. |
|
Full boot log with udev debugging |
|
|
The problem is bcache. It seems to set up devices early on without checking for multipath. This seems to happen before user space (systemd) is even started. |
|
Do you have bcache compiled into the kernel image? Probing bcache devices before user space starts up (systemd, udev, multipathd) can't work with multipath. |
I don't believe so.
That makes sense. I dug into it a bit more, but I'm not super familiar with how udev works in the initrd, but it doesn't look like the multipath udev rules exist in the initrd, but bcache rules do exist. The weird part is I don't see any udev logs that early, so I'm not sure if udev is loading the module or something else is. |
|
So I tried removing the bcache udev rule in the initrd and multipath now works as expected. However it's kind of hacky to have to rewrite the initrd by hand every time I do a kernel update. Is there a standard way to load multipath in the initrd? |
|
Ah, this is Debian. I'm not too familiar how initramfs works on Debian (I'm a SUSE guy). I suppose you need to seek help in the distro forums. By all means, you should make sure that multipath support is included in the initrd. It's certainly possible to configure this, but I am not familiar enough with the Debian environment to tell. It seems that (on your system at least) systemd isn't used in the initramfs. So there must be some other logic to make sure modules are loaded in the correct order.
Usually, the tools to create the initramfs have some logic to determine the modules needed to set up the storage stack. The logic seems to have failed for your multipath + bcache case. |
|
Could you share your /etc/multipath.conf file ? |
add "scsi_dh_alua scsi_dh_emc scsi_dh_rdac dm-multipath", ONE per line, to /etc/initramfs-tools/modules With lsinitramfs -l you can check/list its content |
|
That will load the kernel modules, but won't start multipathd in the initramfs, which would also be required in order to avoid the issue the OP described. Or am I overlooking anything? |
Ah that makes sense. For some reason I assumed That being said, is it even possible to run
There's no config. Everything is using the default built-ins. |
SUSE and RedHat use dracut. That's what I'm familiar with. But I have no experience with bcache and multipath under dracut, either.
That sounds pretty backward to me. It's what we used to do ~15y ago. The problem is: when do you call |
initram generation scripts "cleverly" do not include multipath files/modules if there is no at least one alive multipath device in the system. PD: multipath-tools-boot should be installed ONLY if the system is booting (root) from a multipath device, otherwise it MUST be removed. |
The Debian installer should do this automatically. You can test more recent live distros: I do not kown if "openSUSE Leap" runs multipathd by default, but "Fedora Server" does. |
multipath-tools is installed by default, but the service is only active after installation if multipath devices were present during installation. In this case the user will see a prompt whether multipath should be enabled, and if she chooses "yes", the service will be active after installation in both initramfs and installed system. But this is getting OT I fear. |
|
I think it's pretty clear this isn't an issue with multipath-tools. Hopefully this helps others who are running into the same issue. Thanks for diving into this! |
Version:
multipath-tools v0.8.5 (11/09, 2020)OS: Debian Bullseye
I'm getting
No SAS end device for 'end_device-0:0'when trying to set up multipath for drives connected to a SAS expander.Possibly related,
multipath -u /dev/sd*always outputsDM_MULTIPATH_DEVICE_PATH="0"and the devices always get mounted before multipath gets to them, despite the fact that multipath is listed before bcache in udev.60-multipath.rules<69-bcache.rulesNot sure what to look at from here. Any advice would be appreciated!
Thanks!
The text was updated successfully, but these errors were encountered: