udev rule enhancements for NetApp target
Resolves: RHEL-12566 Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
This commit is contained in:
parent
672fd8959f
commit
4e68270f1e
|
@ -0,0 +1,29 @@
|
|||
From 0782167f3a6709df232b746cdfa2a036c6207f7f Mon Sep 17 00:00:00 2001
|
||||
From: Martin George <marting@netapp.com>
|
||||
Date: Tue, 3 Oct 2023 16:05:23 +0530
|
||||
Subject: [PATCH] udev-rules: set ctrl_loss_tmo to -1 for ONTAP NVMe/TCP
|
||||
|
||||
Setting ctrl_loss_tmo to -1 for ONTAP NVMe/TCP controllers would enable
|
||||
indefinite reconnect attempts during a path loss and help avoid purging
|
||||
the path on the host, which otherwise may lead to mounted fs read-only
|
||||
behavior. So add a rule towards enabling the same.
|
||||
|
||||
Signed-off-by: Martin George <marting@netapp.com>
|
||||
---
|
||||
nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-netapp.rules.in | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-netapp.rules.in b/nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-netapp.rules.in
|
||||
index 299fe2251418..99b6a8ba0bf8 100644
|
||||
--- a/nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-netapp.rules.in
|
||||
+++ b/nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-netapp.rules.in
|
||||
@@ -1,3 +1,6 @@
|
||||
# Enable round-robin for NetApp ONTAP and NetApp E-Series
|
||||
ACTION=="add", SUBSYSTEM=="nvme-subsystem", ATTR{subsystype}=="nvm", ATTR{model}=="NetApp ONTAP Controller", ATTR{iopolicy}="round-robin"
|
||||
ACTION=="add", SUBSYSTEM=="nvme-subsystem", ATTR{subsystype}=="nvm", ATTR{model}=="NetApp E-Series", ATTR{iopolicy}="round-robin"
|
||||
+
|
||||
+# Set ctrl_loss_tmo to -1 for NetApp ONTAP NVMe/TCP
|
||||
+ACTION!="remove", SUBSYSTEM=="nvme", KERNEL=="nvme*", ATTR{transport}=="tcp", ATTR{model}=="NetApp ONTAP Controller", ATTR{ctrl_loss_tmo}="-1"
|
||||
--
|
||||
2.39.3
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
From 748a9ac050fb443b1204d06ce3b5b129b6a8afe2 Mon Sep 17 00:00:00 2001
|
||||
From: Martin George <marting@netapp.com>
|
||||
Date: Thu, 5 Oct 2023 12:12:46 +0530
|
||||
Subject: [PATCH] udev-rules: rename netapp udev rule
|
||||
|
||||
Rename 71-nvmf-iopolicy-netapp.rules.in to 71-nvmf-netapp.rules.in
|
||||
so as to make the name generic, since this not only sets the
|
||||
iopolicy here but also modifies the ctrl_loss_tmo.
|
||||
|
||||
Signed-off-by: Martin George <marting@netapp.com>
|
||||
---
|
||||
meson.build | 2 +-
|
||||
nvme.spec.in | 2 +-
|
||||
...71-nvmf-iopolicy-netapp.rules.in => 71-nvmf-netapp.rules.in} | 0
|
||||
3 files changed, 2 insertions(+), 2 deletions(-)
|
||||
rename nvmf-autoconnect/udev-rules/{71-nvmf-iopolicy-netapp.rules.in => 71-nvmf-netapp.rules.in} (100%)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 3d3fb08541ff..310ba1f83400 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -236,7 +236,7 @@ endforeach
|
||||
|
||||
udev_files = [
|
||||
'70-nvmf-autoconnect.rules',
|
||||
- '71-nvmf-iopolicy-netapp.rules',
|
||||
+ '71-nvmf-netapp.rules',
|
||||
]
|
||||
|
||||
foreach file : udev_files
|
||||
diff --git a/nvme.spec.in b/nvme.spec.in
|
||||
index fe4675a7bb0b..3eab9ff030ff 100644
|
||||
--- a/nvme.spec.in
|
||||
+++ b/nvme.spec.in
|
||||
@@ -31,7 +31,7 @@ touch %{buildroot}@SYSCONFDIR@/nvme/hostid
|
||||
@SYSCONFDIR@/nvme/discovery.conf
|
||||
%ghost @SYSCONFDIR@/nvme/config.json
|
||||
@UDEVRULESDIR@/70-nvmf-autoconnect.rules
|
||||
-@UDEVRULESDIR@/71-nvmf-iopolicy-netapp.rules
|
||||
+@UDEVRULESDIR@/71-nvmf-netapp.rules
|
||||
@DRACUTRILESDIR@/70-nvmf-autoconnect.conf
|
||||
@SYSTEMDDIR@/nvmf-connect@.service
|
||||
@SYSTEMDDIR@/nvmefc-boot-connections.service
|
||||
diff --git a/nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-netapp.rules.in b/nvmf-autoconnect/udev-rules/71-nvmf-netapp.rules.in
|
||||
similarity index 100%
|
||||
rename from nvmf-autoconnect/udev-rules/71-nvmf-iopolicy-netapp.rules.in
|
||||
rename to nvmf-autoconnect/udev-rules/71-nvmf-netapp.rules.in
|
||||
--
|
||||
2.39.3
|
||||
|
|
@ -3,13 +3,16 @@
|
|||
|
||||
Name: nvme-cli
|
||||
Version: 2.6
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: NVMe management command line interface
|
||||
|
||||
License: GPL-2.0-only
|
||||
URL: https://github.com/linux-nvme/nvme-cli
|
||||
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch0: 0001-udev-rules-set-ctrl_loss_tmo-to-1-for-ONTAP-NVMe-TCP.patch
|
||||
Patch1: 0002-udev-rules-rename-netapp-udev-rule.patch
|
||||
|
||||
BuildRequires: meson >= 0.50.0
|
||||
BuildRequires: gcc gcc-c++
|
||||
BuildRequires: libuuid-devel
|
||||
|
@ -30,6 +33,9 @@ nvme-cli provides NVM-Express user space tooling for Linux.
|
|||
#%%setup -qn %%{name}-%%{commit0}
|
||||
%setup -q
|
||||
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%meson -Dudevrulesdir=%{_udevrulesdir} -Dsystemddir=%{_unitdir} -Ddocs=all -Ddocs-build=true -Dhtmldir=%{_pkgdocdir}
|
||||
%meson_build
|
||||
|
@ -60,7 +66,7 @@ rm -rf %{buildroot}%{_pkgdocdir}/nvme
|
|||
%{_unitdir}/nvmf-connect.target
|
||||
%{_unitdir}/nvmf-connect@.service
|
||||
%{_udevrulesdir}/70-nvmf-autoconnect.rules
|
||||
%{_udevrulesdir}/71-nvmf-iopolicy-netapp.rules
|
||||
%{_udevrulesdir}/71-nvmf-netapp.rules
|
||||
# Do not install the dracut rule yet. See rhbz 1742764
|
||||
# Is this still true? Now that we support nvme-of boot, do we want to install this file?
|
||||
# /usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
|
||||
|
@ -84,6 +90,9 @@ if [ $1 -eq 1 ] || [ $1 -eq 2 ]; then
|
|||
fi
|
||||
|
||||
%changelog
|
||||
* Wed Nov 08 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.6-3
|
||||
- Fixes for RHEL-12566
|
||||
|
||||
* Mon Nov 06 2023 Maurizio Lombardi <mlombard@redhat.com> - 2.6-2
|
||||
- Rebuild for side-tag
|
||||
|
||||
|
|
Loading…
Reference in New Issue