-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
scripts: zfs.sh: unload zfs with rmmod #13353
Conversation
Use `rmmod` instead of `modprobe -r` in the zfs.sh script to unload the kmods. While `modprobe -r` is nicer, it can only be used when the kmods are installed on the system, if they're not the following error will always be returned. sudo modprobe -r zfs modprobe: FATAL: Module zfs not found. This reverts the switch to modprobe from commit 469b848. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#13274
Some ancient modprobes error out when provided with -r unloaded-module Signed-off-by: Ahelenia Ziemiańska <[email protected]> Supersedes openzfs#13353
I just gave #13356 a go on CentOS 8 (CentOS Linux release 8.2.2004 (Core)) and I am still getting the error @behlendorf described in this PR when doing |
CentOS 8 Stream (Stream 8)?, #13356:
Running #13356 with
as expected. |
Running #13356 with sh -x on RHEL 8.5 ends with:
This was with modprobe kmod version 25. It's entirely possible CentOS stream has moved to something newer.
I should have been more clear in my description, this
|
Hm. Right. Updated #13356 to use rmmod and remove all modules (including legacy ones). |
Motivation and Context
The
zfs.sh
script can no longer be used to remove the kmodswhen they are not installed on the system.
cc: @nabijaczleweli
Description
Use
rmmod
instead ofmodprobe -r
in the zfs.sh script to unloadthe kmods. While
modprobe -r
is nicer, it can only be used whenthe kmods are installed on the system, if they're not the following
error will always be returned.
This reverts the switch to modprobe from commit 469b848.
How Has This Been Tested?
Locally by building the source then loading and then unloading the
in-tree kmods.
Types of changes
Checklist:
Signed-off-by
.