From 6fe8d6083263e0fdbce0b6ba9e59ed10ebd932e6 Mon Sep 17 00:00:00 2001 From: "M. Vefa Bicakci" Date: Wed, 30 Mar 2022 13:39:01 -0400 Subject: [PATCH] kernel: Disable NVMe multi-path kconfig option This commit disables the NVMe multi-path kernel configuration option, which was introduced with kernel v4.15-rc1, and is included in StarlingX's v5.10-based kernel. This feature exposes block devices such as "nvme0c0n1" in /sys/class/block with the "hidden" attribute set to 1; however, the older anaconda installer and user-space packages that StarlingX inherits from CentOS 7 were not programmed to ignore such hidden block devices. This results in anaconda reporting an error when probing the disks on the system and aborting the installation. Similarly, the "lsblk" program reports warnings about unrecognized block devices. Both of these issues were fixed upstream with the following commits: - https://github.com/storaged-project/blivet/commit/8957eb1f82a37542ea1ae3990b6068b3cf90a3be - https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/commit/?id=c8487d854ba5cf5bfcae78d8e5af5587e7622351 Given the difficulty of auditing all of CentOS 7's user-space for potential incompatibilities with NVMe multi-path support, this commit disables this feature. The following options were considered to disable this option: - Unset CONFIG_NVME_MULTIPATH (implemented in this commit) - Use the kernel command line argument nvme_core.multipath=0 - Use a modprobe.d configuration file with the following contents: "options nvme_core multipath=0". Of these options, the first was chosen to ensure non-error-prone consistency across all StarlingX configurations, even though the latter two options are more flexible. Verification - The issue was confirmed to exist on a standalone server with NVMe multi-path support, by attempting to install StarlingX using an ISO image built from StarlingX's master branch, in All-in-One simplex mode. - An ISO image was successfully built with this commit using a monolithic incremental build procedure. - The built ISO image was used to install StarlingX succcessfully onto the same standalone server in All-in-One simplex mode. - Basic disk operations were carried out by creating a partition and a file system on the NVMe drive, as well as using dd in a loop to write zero bytes to a file created in the same file system. (Note that the same test procedure was not repeated with a server that has unaffected NVMe controllers due to lab availability constraints. Inspection of the kernel's NVMe multi-path support code indicates that the kernel falls back to non-multi-path code paths when an NVMe controller does not support this feature.) Closes-Bug: 1967190 Change-Id: I791cfb6d7bc141e2114dea5e7f8d648b6df81f14 Signed-off-by: M. Vefa Bicakci --- kernel-rt/files/kernel-x86_64-rt.config.tis_extra | 2 ++ kernel-std/files/kernel-x86_64.config.tis_extra | 2 ++ 2 files changed, 4 insertions(+) diff --git a/kernel-rt/files/kernel-x86_64-rt.config.tis_extra b/kernel-rt/files/kernel-x86_64-rt.config.tis_extra index 78522c5e..a8548e31 100644 --- a/kernel-rt/files/kernel-x86_64-rt.config.tis_extra +++ b/kernel-rt/files/kernel-x86_64-rt.config.tis_extra @@ -1091,3 +1091,5 @@ CONFIG_GVE=m # CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set # CONFIG_BNXT is not set + +# CONFIG_NVME_MULTIPATH is not set diff --git a/kernel-std/files/kernel-x86_64.config.tis_extra b/kernel-std/files/kernel-x86_64.config.tis_extra index be4879b6..ae2d3381 100644 --- a/kernel-std/files/kernel-x86_64.config.tis_extra +++ b/kernel-std/files/kernel-x86_64.config.tis_extra @@ -1599,3 +1599,5 @@ CONFIG_PCI_REALLOC_ENABLE_AUTO=y # CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set # CONFIG_BNXT is not set + +# CONFIG_NVME_MULTIPATH is not set