Skip to content
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

Update provision/initramfs/detect #176

Open
bensallen opened this issue Feb 15, 2019 · 1 comment
Open

Update provision/initramfs/detect #176

bensallen opened this issue Feb 15, 2019 · 1 comment
Milestone

Comments

@bensallen
Copy link
Member

bensallen commented Feb 15, 2019

provision/initramfs/detect uses a fairly naive approach of matching device modalias against the kernel's modules.alias to find the kernel modules to load.

Example of detect's logic failing to find an Intel Optane drive to load the nvme kernel module:

$ PCI=/sys/bus/pci/devices/0000\:05\:00.0
$ VENDOR_1=`cat $PCI/vendor`
$ DEVICE_1=`cat $PCI/device`
$ ALIAS=`printf "v%08xd%08x\n" $VENDOR_1 $DEVICE_1`
$ echo $ALIAS
v00008086d00002701
$ grep -i "$ALIAS" /lib/modules/$(uname -r)/modules.alias | awk '{print $3}'
# grep nvme /lib/modules/$(uname -r)/modules.alias
alias pci:v*d*sv*sd*bc01sc08i02* nvme
alias pci:v0000144Dd0000A822sv*sd*bc*sc*i* nvme
alias pci:v0000144Dd0000A821sv*sd*bc*sc*i* nvme
alias pci:v00001C5Fd00000540sv*sd*bc*sc*i* nvme
alias pci:v00001C58d00000023sv*sd*bc*sc*i* nvme
alias pci:v00001C58d00000003sv*sd*bc*sc*i* nvme
alias pci:v00008086d00005845sv*sd*bc*sc*i* nvme
alias pci:v00008086d0000F1A5sv*sd*bc*sc*i* nvme
alias pci:v00008086d00000A55sv*sd*bc*sc*i* nvme
alias pci:v00008086d00000A54sv*sd*bc*sc*i* nvme
alias pci:v00008086d00000A53sv*sd*bc*sc*i* nvme
alias pci:v00008086d00000953sv*sd*bc*sc*i* nvme
alias nvmet-transport-254 nvme_loop
alias nvmet-transport-1 nvmet_rdma
# cat $PCI/modalias
pci:v00008086d00002701sv00008086sd00003905bc01sc08i02
  • The first nvme entry above alias pci:v*d*sv*sd*bc01sc08i02* nvme, actually matches on the full modalias.

Likely approach:

    find /sys/devices -name modalias -print0 \
        | xargs -0 sort -u \
        | xargs modprobe -a -q -b 2>/dev/null
@bensallen bensallen added this to the 3.9 milestone Feb 15, 2019
@renatopancheri
Copy link

same problem with a WD black,
kernel centos7.7 3.10.0-1062.18.1.el7.x86_64,
ALIAS = v000015b7d00005002
MODALIAS = pci:v000015B7d00005002sv000015B7sd00005002bc01sc08i02
and same entry matches, temporary solution used is:
drivers += kernel/drivers/nvme/host (saw from ohpc repo they added this one)
modprobe += nvme
in bootstrap.conf

I should have some days where i can do tests if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants