From patchwork Thu May 30 16:54:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 13680601 X-Patchwork-Delegate: christophe.varoqui@free.fr Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADF23446B4 for ; Thu, 30 May 2024 16:55:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717088108; cv=none; b=DcyFW1QjidqbG2epnOA9Qzk/IYfkzTJoUXHRuOH0FWRT0cYoF2yfdDCTLGUGgUgkhirThDLSCj7vFGyMnixysJH6xnmtiiCR+OD73I6pRyd/Fwu5spMsFxvwZDzaA/0Cr6yCf7N5sE0XCPHzwv/w/LwK00ozOJlpWLbh7oMkuTA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717088108; c=relaxed/simple; bh=hiuj3jldCEfNxomYAAgolFX0VOmKbHBrnAv9Ahcps2M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QLv8F/pywZtCrRlq1qFciXzzzMt+kAGCeYeEb4pDfdHM0ofPssaPyia8YZGVX+ZVK4BRISK9AHhTHt+9p519tGOHO9Yjplx8jJ046zGDBXXRy7QiI0INxap52FfH6OemSk2r8JS4Ti1KsEcOV4NvKll164qphDrdzIxlJR9pLmM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=OsaI8MMu; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OsaI8MMu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717088105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6oD3Z8hkztPhypNRmqje2BZdyLuA/Ki1jkowDgBA7b0=; b=OsaI8MMu53NoV/Oo9NnlfGOSqJO99A7UN8ks/XzNScF8u5n3AszM1YGk9Z8NZpMd9NvL4i JsjflTdCxTryANRSSBKtfEbHWO+NidGKn+2FyfI5UI0QZ6KiPuva6lB/K5ZioknPL1ARLK p3cHOkyDMG4P389OVuTw3sLpn2sfpdc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-498-oKCzCPL8PPG3I7oHfdRTmQ-1; Thu, 30 May 2024 12:55:02 -0400 X-MC-Unique: oKCzCPL8PPG3I7oHfdRTmQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1FCA2101A525; Thu, 30 May 2024 16:55:02 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (bmarzins-01.fast.eng.rdu2.dc.redhat.com [10.6.23.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 134CA40C6EB7; Thu, 30 May 2024 16:55:02 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (localhost [127.0.0.1]) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.1) with ESMTPS id 44UGt1L7397029 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 30 May 2024 12:55:01 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 44UGt1MG397028; Thu, 30 May 2024 12:55:01 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Nitin Yewale , Martin Wilck Subject: [PATCH v2 1/7] libmultipath: remove pathgroup wildcard options Date: Thu, 30 May 2024 12:54:54 -0400 Message-ID: <20240530165500.397009-2-bmarzins@redhat.com> In-Reply-To: <20240530165500.397009-1-bmarzins@redhat.com> References: <20240530165500.397009-1-bmarzins@redhat.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com From: Nitin Yewale The multipathd command "multipathd show wildcards" shows the pathgroup format wildcards, but there is no way to use them in a multipathd command. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- libmultipath/print.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libmultipath/print.c b/libmultipath/print.c index efd5a16a..89813517 100644 --- a/libmultipath/print.c +++ b/libmultipath/print.c @@ -912,13 +912,6 @@ int snprint_wildcards(struct strbuf *buff) pd[i].wildcard, pd[i].header)) < 0) return rc; - if ((rc = append_strbuf_str(buff, "\npathgroup format wildcards:\n")) < 0) - return rc; - for (i = 0; i < ARRAY_SIZE(pgd); i++) - if ((rc = print_strbuf(buff, "%%%c %s\n", - pgd[i].wildcard, pgd[i].header)) < 0) - return rc; - return get_strbuf_len(buff) - initial_len; } From patchwork Thu May 30 16:54:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 13680603 X-Patchwork-Delegate: christophe.varoqui@free.fr Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D22044375 for ; Thu, 30 May 2024 16:55:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717088108; cv=none; b=OnLK4ohRoI+pZeDvu8ww8R4jSAvjMwPEwjTJ+mszR7AF3SPM1keg+reQIbi6T0bIEtb2HZVfXwRevS70L/NVUvcoWsWdgGsi1rbi5quwIefaK6cGftffSfHqBIgMkjroBC5RE9Pm/UGNYqkhT2CFr8NhNnf2cbGkIqyGzbjQL0k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717088108; c=relaxed/simple; bh=vXrltSBhcOl8RUM2XpdpAQ5qbnRaVDNhQE4mloGHMSY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=I1FpzVLJauqNHBY7F9zrzhhTMHJ5nuNcncHNyF89xkSWNKMbsaFTRGU3dI5o7ln+lC6z0jELTQouAc7j1x8RCNX1uGR1KMgISe4fqR+EJ6pi+VC2YMfM5YdDpo8C0zDM8pPq7GdfJxUk7UP8G2rIg6I3M9m4Tvk04Eh6riuwla0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=doiZMOrb; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="doiZMOrb" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717088106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FyF3tCF9P6FravQ9QIhim5/Q5lbmC5LjVXK55dnTMec=; b=doiZMOrbALIPBNSomYvrIGTTq0pXLccjx6RmjxJoiPRVjdftqcBMjGFZvic7Qmbeddex9n WJ4kcBRvZZRy4pMFud+SQHSgGR+loZBET6lMYVQOgVg8s9XiUugXOGT9U7+xGUib3PE4JL ZpCNueX3N3V23yJJsA4abauC5TFPEhA= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-665-VRlvktPEPdiaLMFbQe5TVQ-1; Thu, 30 May 2024 12:55:02 -0400 X-MC-Unique: VRlvktPEPdiaLMFbQe5TVQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 45B8229AA381; Thu, 30 May 2024 16:55:02 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (bmarzins-01.fast.eng.rdu2.dc.redhat.com [10.6.23.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C17F3C27; Thu, 30 May 2024 16:55:02 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (localhost [127.0.0.1]) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.1) with ESMTPS id 44UGt2dM397033 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 30 May 2024 12:55:02 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 44UGt2ol397032; Thu, 30 May 2024 12:55:02 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Nitin Yewale , Martin Wilck Subject: [PATCH v2 2/7] multipath-tools man pages: don't assume multipath.socket is enabled Date: Thu, 30 May 2024 12:54:55 -0400 Message-ID: <20240530165500.397009-3-bmarzins@redhat.com> In-Reply-To: <20240530165500.397009-1-bmarzins@redhat.com> References: <20240530165500.397009-1-bmarzins@redhat.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Add "If enabled, " to the sentence about multipathd.socket, since it is no longer enabled by default. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- multipathd/multipathd.8.in | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/multipathd/multipathd.8.in b/multipathd/multipathd.8.in index 12b77156..06d91c06 100644 --- a/multipathd/multipathd.8.in +++ b/multipathd/multipathd.8.in @@ -339,12 +339,13 @@ Stop multipathd. .\" ---------------------------------------------------------------------------- . When compiled with systemd support two systemd service files are installed, -\fImultipathd.service\fR and \fImultipathd.socket\fR The \fImultipathd.socket\fR -service instructs systemd to intercept the CLI command socket, so that any call -to the CLI interface will start-up the daemon if required. -The \fImultipathd.service\fR file carries the definitions for controlling the -multipath daemon. The daemon itself uses the \fBsd_notify\fR(3) interface to -communicate with systemd. The following unit keywords are recognized: +\fImultipathd.service\fR and \fImultipathd.socket\fR. If enabled, the +\fImultipathd.socket\fR service instructs systemd to intercept the CLI command +socket, so that any call to the CLI interface will start-up the daemon if +required. The \fImultipathd.service\fR file carries the definitions for +controlling the multipath daemon. The daemon itself uses the \fBsd_notify\fR(3) +interface to communicate with systemd. The following unit keywords are +recognized: . .TP .B WatchdogSec= From patchwork Thu May 30 16:54:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 13680602 X-Patchwork-Delegate: christophe.varoqui@free.fr Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2DB953D3BC for ; Thu, 30 May 2024 16:55:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717088108; cv=none; b=pXlLcqS/ESq7pbIaEGV60bBcxDhjqC9Y6SKVrK6qj50Cr6tkJcuDZpJIpxHmQgqdt889CnQXgx21QStKnQqkCVeLNTtGtJoIHEYM4vdjNnvYegQASoePa2cLLdyVJH0MFT0RGXdKUB9EDd2zDCn2jscN94yPWOkQ8+SRNQKUDUA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717088108; c=relaxed/simple; bh=88anZiaL1RaDT+IvtBQ6M1Z+v3s1OSB7M0TWXCM+tCI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jZhxK5MPozdFKEyXkjcX+DJC9AN+nhEVu0kmX3Vo5swTHPRg1mQ5SthyQGSE//g0F89FyxIIdyTawF0Y+AYxY8NAUGqPiGvwJi/GRedeuIdyd9XBJACAmQVDqIBE30Sc+pa6HM8NsapN66Ho8uR4OzOt50idjdrPjCLgPH00JgA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ijInwBqu; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ijInwBqu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717088106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sJD+23/W8/yjBaWOiBHOpLb8a0NBDn7pgvBwA1mCHRE=; b=ijInwBquB0KFouVhS/nnpQn0pRWKNcVgBB49hDTMAKVRCYh2xIMnn5fj+mkUerc6wAnlbY HdxNUpqmaOJmEUJEKN81zGG+f96A1XdYPVF2exVbNj/K6NuhB/An8S0OnpWsAh+7xfCezq 9rP1btFpZ/UWZ0FoKXF8+7N+/hyWAYM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-78-_AClHzRFMwaYhHR-myNWaQ-1; Thu, 30 May 2024 12:55:02 -0400 X-MC-Unique: _AClHzRFMwaYhHR-myNWaQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6B23181227E; Thu, 30 May 2024 16:55:02 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (bmarzins-01.fast.eng.rdu2.dc.redhat.com [10.6.23.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 627A528E6; Thu, 30 May 2024 16:55:02 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (localhost [127.0.0.1]) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.1) with ESMTPS id 44UGt28Q397037 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 30 May 2024 12:55:02 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 44UGt2Y6397036; Thu, 30 May 2024 12:55:02 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Nitin Yewale Subject: [PATCH v2 3/7] libmultipath: print all values in snprint_failback Date: Thu, 30 May 2024 12:54:56 -0400 Message-ID: <20240530165500.397009-4-bmarzins@redhat.com> In-Reply-To: <20240530165500.397009-1-bmarzins@redhat.com> References: <20240530165500.397009-1-bmarzins@redhat.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Add the missing output for manual failback and print the defferral time for deferred failbacks, if one isn't currently in progress. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- libmultipath/print.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libmultipath/print.c b/libmultipath/print.c index 89813517..0e3225ef 100644 --- a/libmultipath/print.c +++ b/libmultipath/print.c @@ -218,9 +218,13 @@ snprint_failback (struct strbuf *buff, const struct multipath * mpp) return append_strbuf_str(buff, "immediate"); if (mpp->pgfailback == -FAILBACK_FOLLOWOVER) return append_strbuf_str(buff, "followover"); + if (mpp->pgfailback == -FAILBACK_MANUAL) + return append_strbuf_str(buff, "manual"); + if (mpp->pgfailback == FAILBACK_UNDEF) + return append_strbuf_str(buff, "undef"); if (!mpp->failback_tick) - return append_strbuf_str(buff, "-"); + return print_strbuf(buff, "deferred:%i", mpp->pgfailback); else return snprint_progress(buff, mpp->failback_tick, mpp->pgfailback); From patchwork Thu May 30 16:54:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 13680600 X-Patchwork-Delegate: christophe.varoqui@free.fr Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9721C44393 for ; Thu, 30 May 2024 16:55:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717088107; cv=none; b=aBetu0tAxCprZJgnmyY5YYxeGcVrSzLyQVx5NSjU56FC71ch2yhb04fn1nN1O+F1agPMmEa0TkpLX898LvUEaRKkwpLDrcuVwZHgk39yKbi8qDu3QzKb+LriDjh9AWfXxVSwQH7AcZuQmuV2BhAeeDeyUuvvt0bzod7+koP+gyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717088107; c=relaxed/simple; bh=LURPUF2Z5TZRdCUVfcF1hw9NuRGf6L4qV+hb+p0wV7E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lRbmdUu/J4b4wwSuGgA1A0WMKQvNjDM1J+kOj2vhKOl37JofGLZaSjwlCoeqbzJojutSvVOCH/77j7E95yFqreeNcro7PKuvZPCBt1U+kb5DESUl6vpmgdwftllN+iTLqpN4bZdBPmujV8RwGjASaNg5LxUv+tSkD8lKAzrIJCg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=MrOcOHMy; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MrOcOHMy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717088104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xmZ41vxVifDU+JfQKqrcHNS0nV/QryfMIDYtY/loE5E=; b=MrOcOHMygbjIsjSeGLU//8NO6AhKFTurKGmmKDevUxJpP0xX7Xzj4nXa8blBXEbHAE5Qc5 nk/t0zEsryWx+hKntoAelqAqzJyvRZBjwTmMA7pCI02qCEkPjDrTBsbeiRGs/0MYOL3fUA /L4KwKEiPhiNxw5JH2Ouo823w6TLpWg= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-80-Gt_S5nAgMBeXDs9u_fGWfQ-1; Thu, 30 May 2024 12:55:02 -0400 X-MC-Unique: Gt_S5nAgMBeXDs9u_fGWfQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 97B463806701; Thu, 30 May 2024 16:55:02 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (bmarzins-01.fast.eng.rdu2.dc.redhat.com [10.6.23.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8BDE1492BC6; Thu, 30 May 2024 16:55:02 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (localhost [127.0.0.1]) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.1) with ESMTPS id 44UGt2Dn397041 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 30 May 2024 12:55:02 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 44UGt2Pg397040; Thu, 30 May 2024 12:55:02 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Nitin Yewale , Martin Wilck Subject: [PATCH v2 4/7] multipathd: Stop double counting map failures for no_path_retry > 0 Date: Thu, 30 May 2024 12:54:57 -0400 Message-ID: <20240530165500.397009-5-bmarzins@redhat.com> In-Reply-To: <20240530165500.397009-1-bmarzins@redhat.com> References: <20240530165500.397009-1-bmarzins@redhat.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com If no_path_retry was greater than 0, multipathd was counting a map failure when recovery mode was entered, and again when queueing was disabled. The first one is incorrect, since the map is still queueing. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- libmultipath/structs_vec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c index c0c5cc90..ccc4efc7 100644 --- a/libmultipath/structs_vec.c +++ b/libmultipath/structs_vec.c @@ -844,10 +844,13 @@ int verify_paths(struct multipath *mpp) void update_queue_mode_del_path(struct multipath *mpp) { int active = count_active_paths(mpp); + bool is_queueing = mpp->features && + strstr(mpp->features, "queue_if_no_path"); if (active == 0) { enter_recovery_mode(mpp); - if (mpp->no_path_retry != NO_PATH_RETRY_QUEUE) + if (mpp->no_path_retry == NO_PATH_RETRY_FAIL || + (mpp->no_path_retry == NO_PATH_RETRY_UNDEF && !is_queueing)) mpp->stat_map_failures++; } condlog(2, "%s: remaining active paths: %d", mpp->alias, active); From patchwork Thu May 30 16:54:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 13680604 X-Patchwork-Delegate: christophe.varoqui@free.fr Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8345D44C76 for ; Thu, 30 May 2024 16:55:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717088109; cv=none; b=l6YV26p/qcQ+oPws//JDJL91xvnokdRp+fefGWKg6a3GmIAOaGVxObpac7P3YQVrZCY0PkIb8VZw0FvnjCSeXyI6+9/tBWWWzVsQ1AvBWmSSQxvCP4cgukHoMGmaHTTwwfQIKuSftToFm/fa6aMBU0C74zPaweBIALLQa70aWWY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717088109; c=relaxed/simple; bh=T29x4ddHRnf3FvV5chhdCmxh/NecPz15yapgN3NFGZs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=p/i6vzKwG/RjxebGggDgQxAh6d6h9rdfGga/6/g63wq3uY/Cy4xGqlqs3JMtW/5Kvf/i4rV5uGnmHeikeXhxyof+32MOjxUM9/FuzAeR25tSVHXfp+h9XINSMsbmSGyZQ/gdt3z4D1HyDQlpIdjHqeR4981mtU5nv6WbMNf10+Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=akz2rL9Z; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="akz2rL9Z" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717088106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2KHCmvLmkLcThjWPa+zkoivDz59NtHiAmpDgS4Pp6y8=; b=akz2rL9ZYLwnYItSWSIt0Gni6lKgcawelV60Aei1R2/8D4yPagBUA0Ib3Uj2tI1aF6/yCa 33Xdl+FlYVZaQphLN/SJhU5J7exgg7bHM0SpB6oMFSxSgqSRkCrOI5IV9v6rOwNRMqfBCH 3/sLfTAooC13EPQaquqzYtu2O8pUjjQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-80-LbMgLUYQM0u8X8k-yxv-yg-1; Thu, 30 May 2024 12:55:03 -0400 X-MC-Unique: LbMgLUYQM0u8X8k-yxv-yg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BBD4880118E; Thu, 30 May 2024 16:55:02 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (bmarzins-01.fast.eng.rdu2.dc.redhat.com [10.6.23.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B48EB40C6EB7; Thu, 30 May 2024 16:55:02 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (localhost [127.0.0.1]) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.1) with ESMTPS id 44UGt2ot397045 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 30 May 2024 12:55:02 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 44UGt2lT397044; Thu, 30 May 2024 12:55:02 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Nitin Yewale , Martin Wilck Subject: [PATCH v2 5/7] multipath-tools man pages: add missing multipathd commands Date: Thu, 30 May 2024 12:54:58 -0400 Message-ID: <20240530165500.397009-6-bmarzins@redhat.com> In-Reply-To: <20240530165500.397009-1-bmarzins@redhat.com> References: <20240530165500.397009-1-bmarzins@redhat.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Also, the description for "del map $map" was incorrect. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- multipathd/multipathd.8.in | 42 +++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/multipathd/multipathd.8.in b/multipathd/multipathd.8.in index 06d91c06..32976052 100644 --- a/multipathd/multipathd.8.in +++ b/multipathd/multipathd.8.in @@ -114,18 +114,24 @@ The following commands can be used in interactive mode: Show the paths that multipathd is monitoring, and their state. . .TP -.B list|show paths format $format +.B list|show paths [raw] format $format Show the paths that multipathd is monitoring, using a format string with path -format wildcards. +format wildcards. Adding \fIraw\fR will remove the headers and alignment +padding from the ouput. +. +.TP +.B list|show path $path +Show whether path $path is offline or running. . .TP .B list|show maps|multipaths Show the multipath devices that the multipathd is monitoring. . .TP -.B list|show maps|multipaths format $format +.B list|show maps|multipaths [raw] format $format Show the status of all multipath devices that the multipathd is monitoring, -using a format string with multipath format wildcards. +using a format string with multipath format wildcards. Adding \fIraw\fR will +remove the headers and alignment padding from the output. . .TP .B list|show maps|multipaths status @@ -138,6 +144,10 @@ Show some statistics of all multipath devices that the multipathd is monitoring. .TP .B list|show maps|multipaths topology Show the current multipath topology. Same as '\fImultipath \-ll\fR'. +.TP +. +.B list|show maps|multipaths json +Show information about all multipath devices in JSON format. . .TP .B list|show topology @@ -149,6 +159,16 @@ Show topology of a single multipath device specified by $map, for example 36005076303ffc56200000000000010aa. This map could be obtained from '\fIlist maps\fR'. . .TP +.B list|show map|multipath $map [raw] format $format. +Show the status of multipath device $map, using a format string with multipath +format wildcards. Adding \fIraw\fR will remove the headers and alignment +padding from the output. +. +.TP +.B list|show map|multipath $map json +Show information about multipath device $map in JSON format. +. +.TP .B list|show wildcards Show the format wildcards used in interactive commands taking $format. . @@ -182,6 +202,14 @@ paths, and whether multipathd is currently handling a uevent. Show the current state of the multipathd daemon. . .TP +.B reset maps|multipaths stats +Reset the statistics of all multipath devices. +. +.TP +.B reset map|multipath $map stats +Reset the statistics of multipath device $map. +. +.TP .B add path $path Add a path to the list of monitored paths. $path is as listed in /sys/block (e.g. sda). . @@ -197,8 +225,12 @@ for the multipath device (e.g. mpath1) or the uid of the multipath device (e.g. 36005076303ffc56200000000000010aa). . .TP +.B remove|del maps|multipaths +Remove all multipath devices. +. +.TP .B remove|del map|multipath $map -Stop monitoring a multipath device. +Remove the multipath device $map. . .TP .B resize map|multipath $map From patchwork Thu May 30 16:54:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 13680605 X-Patchwork-Delegate: christophe.varoqui@free.fr Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D644E44C86 for ; Thu, 30 May 2024 16:55:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717088109; cv=none; b=N6jSf6OzXVaCTXYZc2uMkHs9WtqAPeSBuKKNOiIgzbiH7dBn3ftYXBBY0AsHZshl6FdrfDmKCTWgsliH0rWudNrBci94HwozbQFKnD2XS3aPv2c9fxVKBCl1hJCbY6nTX+6L6mwbszA0nThj9TUdlxgUBn+1FRfCj5gerw9XzHM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717088109; c=relaxed/simple; bh=0c/1WuvUhY6TC9WiaUsW6ZIn1T/ttD84laTbPQOsqhc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=o8tgII3bXJzMt4LJuCbCPSllsOJaB/1iiucMbJCy3aVT89KTzjJ3JP4jE9RguI1JKE8QmrQq7gr1z3Fb30H2asfoXxEjgDInH0xmWzq93LJ8uIptx7EroQUFkBVWu2BL2/dklKNWWzmFPiXFM/jxwFd4eCRYkPsETPsiFvJUKv8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=XZbDvoTO; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XZbDvoTO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717088106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FbqBDGcw/eydMf01TDrl36Dyj4EGPpW1pHLRTjQ1aSQ=; b=XZbDvoTOdJ5kplzGIMK17DwjtpYuxsyEb9TnPU547NZxMbdAeU7XG7eDhZdxOtKW/0xmo0 wkI0fl22vzAax4Pvfd1jqhf3CdvFybvYLJKn2OQ8AID35yjKJ61lt0bDnu+7jihvq6aK+o dNIEtCIUcejefp4GI6cBBcpEK4CWBuo= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-615-ORts6-CbOH205WE5weLg0A-1; Thu, 30 May 2024 12:55:03 -0400 X-MC-Unique: ORts6-CbOH205WE5weLg0A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E6D483C025B2; Thu, 30 May 2024 16:55:02 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (bmarzins-01.fast.eng.rdu2.dc.redhat.com [10.6.23.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DC0FB3C27; Thu, 30 May 2024 16:55:02 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (localhost [127.0.0.1]) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.1) with ESMTPS id 44UGt2pv397049 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 30 May 2024 12:55:02 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 44UGt2fs397048; Thu, 30 May 2024 12:55:02 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Nitin Yewale , Martin Wilck Subject: [PATCH v2 6/7] libmultipath: change the vend/prod/rev printing Date: Thu, 30 May 2024 12:54:59 -0400 Message-ID: <20240530165500.397009-7-bmarzins@redhat.com> In-Reply-To: <20240530165500.397009-1-bmarzins@redhat.com> References: <20240530165500.397009-1-bmarzins@redhat.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com The %s multipath and path wildcards both say they print the device vend/prod/rev string, but neither of them do. The multipath wildcards already provide a way to print the revision string and the %s wildcard is used in the multipath -l output, so leave the wildcard output alone, and change the description to only mention the vendor and product. There is no other way to print the revision by path, and the path %s wildcard is only used in the verbose multipath output, so make it actually print the revision. Also check for unset strings, and print "##" instead of nothing. Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- libmultipath/print.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libmultipath/print.c b/libmultipath/print.c index 0e3225ef..d592001d 100644 --- a/libmultipath/print.c +++ b/libmultipath/print.c @@ -330,7 +330,7 @@ snprint_multipath_uuid (struct strbuf *buff, const struct multipath * mpp) } static int -snprint_multipath_vpr (struct strbuf *buff, const struct multipath * mpp) +snprint_multipath_vp (struct strbuf *buff, const struct multipath * mpp) { struct pathgroup * pgp; struct path * pp; @@ -591,7 +591,10 @@ static int snprint_initialized(struct strbuf *buff, const struct path * pp) static int snprint_vpr (struct strbuf *buff, const struct path * pp) { - return print_strbuf(buff, "%s,%s", pp->vendor_id, pp->product_id); + return print_strbuf(buff, "%s,%s,%s", + strlen(pp->vendor_id) ? pp->vendor_id : "##", + strlen(pp->product_id) ? pp->product_id : "##", + strlen(pp->rev) ? pp->rev : "##"); } static int @@ -849,7 +852,7 @@ static const struct multipath_data mpd[] = { {'2', "map_loads", snprint_map_loads}, {'3', "total_q_time", snprint_total_q_time}, {'4', "q_timeouts", snprint_q_timeouts}, - {'s', "vend/prod/rev", snprint_multipath_vpr}, + {'s', "vend/prod", snprint_multipath_vp}, {'v', "vend", snprint_multipath_vend}, {'p', "prod", snprint_multipath_prod}, {'e', "rev", snprint_multipath_rev}, From patchwork Thu May 30 16:55:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 13680606 X-Patchwork-Delegate: christophe.varoqui@free.fr Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1335544C8F for ; Thu, 30 May 2024 16:55:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717088110; cv=none; b=aEiJ/ZCZIW3tPT2l8W2lnEKupTI8JUWLarsH6EEK7UkCSyisZ4PT1yEgoVz8f/PlLaBt/sTbNbqrePQ7N39wpFY3LQdlJeoLWgHBoicmFjsEfSB7mtqQ7hS22f9sHNaABnN2def6EB/bI8cgGlWCaIUYwz8wBkIwV2O//p+PUcM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717088110; c=relaxed/simple; bh=Uny8hd+0tKMyalmkqIs+eAqgwtZF3mIl9Enr1Dl+Lao=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JFpKWNPLf2f5rjA9ZVnC5AlIBuoGMmeiTrM8l0t7cMa0cI0C3WOxGsJrTX5trofNtIZCByH6SVWPRYSjbbZGzjmRZEcKIF4Y/HpdgNy09EP8e/dQlpE5qX5WiAYsgKmg50C9y/sZc2ZYWNso6YeNezJsUOCmdFf5h8nh6Bm1Qiw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=YuqCmSTG; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YuqCmSTG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717088107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nK9PSwSlfUG9CqLMe8hBM1IlGxlbch8UFhFBJ7we/Ik=; b=YuqCmSTGLjcf0Zpe1m0mmiTJAPKdpIRXc/lliUKL/p94OUWGuDne8gtoZW5dede8RcN5gV V4UNRseHJgB6lRJcvk7n1eM+PN8mdLxHVJnmIV19mYkrcIvwx2G+oycknHUXKMlBwZZZFJ nVuDykiSTRXSVDuE1d7r8bZv36Tl5+c= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-607-pxHLPNJlPbmXI_5r1Sp95Q-1; Thu, 30 May 2024 12:55:03 -0400 X-MC-Unique: pxHLPNJlPbmXI_5r1Sp95Q-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 17BDE1C0512A; Thu, 30 May 2024 16:55:03 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (bmarzins-01.fast.eng.rdu2.dc.redhat.com [10.6.23.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 10C49492BC6; Thu, 30 May 2024 16:55:03 +0000 (UTC) Received: from bmarzins-01.fast.eng.rdu2.dc.redhat.com (localhost [127.0.0.1]) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.1) with ESMTPS id 44UGt2is397053 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 30 May 2024 12:55:02 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 44UGt2pm397052; Thu, 30 May 2024 12:55:02 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Nitin Yewale Subject: [PATCH v2 7/7] multipath-tools man pages: Add format wildcard descriptions Date: Thu, 30 May 2024 12:55:00 -0400 Message-ID: <20240530165500.397009-8-bmarzins@redhat.com> In-Reply-To: <20240530165500.397009-1-bmarzins@redhat.com> References: <20240530165500.397009-1-bmarzins@redhat.com> Precedence: bulk X-Mailing-List: dm-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Suggested-by: Nitin Yewale Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck --- multipathd/multipathd.8.in | 260 ++++++++++++++++++++++++++++++++++++- 1 file changed, 255 insertions(+), 5 deletions(-) diff --git a/multipathd/multipathd.8.in b/multipathd/multipathd.8.in index 32976052..4bcf0572 100644 --- a/multipathd/multipathd.8.in +++ b/multipathd/multipathd.8.in @@ -6,7 +6,7 @@ .\" Update the date below if you make any significant change. .\" ---------------------------------------------------------------------------- . -.TH MULTIPATHD 8 2023-12-19 Linux +.TH MULTIPATHD 8 2024-05-29 Linux . . .\" ---------------------------------------------------------------------------- @@ -117,7 +117,7 @@ Show the paths that multipathd is monitoring, and their state. .B list|show paths [raw] format $format Show the paths that multipathd is monitoring, using a format string with path format wildcards. Adding \fIraw\fR will remove the headers and alignment -padding from the ouput. +padding from the output. See "Path format wildcards" below. . .TP .B list|show path $path @@ -131,7 +131,8 @@ Show the multipath devices that the multipathd is monitoring. .B list|show maps|multipaths [raw] format $format Show the status of all multipath devices that the multipathd is monitoring, using a format string with multipath format wildcards. Adding \fIraw\fR will -remove the headers and alignment padding from the output. +remove the headers and alignment padding from the output. See "Multipath +format wildcards" below. . .TP .B list|show maps|multipaths status @@ -162,7 +163,7 @@ Show topology of a single multipath device specified by $map, for example .B list|show map|multipath $map [raw] format $format. Show the status of multipath device $map, using a format string with multipath format wildcards. Adding \fIraw\fR will remove the headers and alignment -padding from the output. +padding from the output. See "Multipath format wildcards" below. . .TP .B list|show map|multipath $map json @@ -170,7 +171,8 @@ Show information about multipath device $map in JSON format. . .TP .B list|show wildcards -Show the format wildcards used in interactive commands taking $format. +Show the format wildcards used in interactive commands taking $format. See +"Format Wildcards" below. . .TP .B list|show config @@ -367,6 +369,254 @@ Stop multipathd. . . .\" ---------------------------------------------------------------------------- +.SH "Format Wildcards" +.\" ---------------------------------------------------------------------------- +. +Multipathd commands that take a $format option require a format string. This +string controls how a device is printed and should include format wildcards. +When the devices are printed, these wildcards will be replaced by the +appropriate device information. The following wildcards are supported. +.TP +.B Multipath format wildcards +.RS +.TP 12 +.B %n +The device name. +.TP +.B %w +The device WWID (uuid). +.TP +.B %d +The device sysfs name (dm-). +.TP +.B %F +The device \fBfailback\fR setting. For deferred failbacks, it will either +include the configured time if a deferred failback is not in progress, or +it will show the current progress of a deferred failback in seconds. +.TP +.B %Q +The device \fBno_path_retry\fR setting. If no_path_retry is set to a +number of retries, it will either print the configured number of checker +retries if the device is not in recovery mode, the number of seconds until +queueing is disabled if the device is queueing in recovery mode, or \fIoff\fR +if the device has disabled queueing. +.TP +.B %N +The number of active paths for the device. +.TP +.B %r +The device write-protect setting, either \fIro\fR or \fIrw\fR. +.TP +.B %t +The state of the device in device-mapper. \fIsuspend\fR if the devices is +suspended, and \fIactive\fR otherwise. +.TP +.B %S +The device size, using the suffixes \fBK\fR, \fBM\fR, \fBG\fR, \fBT\fR, +and \fBP\fR, to stand for kilobytes, megabytes, gigabytes, terabytes, +and petabytes, respectively. +.TP +.B %f +The "features" string of the device-mapper table in the kernel. +.TP +.B %x +The number of times the device has entered a state where it will fail IO. +This is an alias for the \fB%4\fR wildcard. +This value can be reset with the '\fIreset map $map stats\fR' command. +.TP +.B %h +The device table hardware handler string. +.TP +.B %A +The last action multipathd took on the device. This wildcard is for debugging +use, as understanding its meaning requires looking at the code. +.TP +.B %0 +The number of times a path in the device has failed. +This value can be reset with the '\fIreset map $map stats\fR' command. +.TP +.B %1 +The number of times multipathd has initiated a pathgroup switch for the device. +This value can be reset with the '\fIreset map $map stats\fR' command. +.TP +.B %2 +The number of times multipathd has loaded a new table for the device. +This value can be reset with the '\fIreset map $map stats\fR' command. +.TP +.B %3 +The approximate number of seconds that multipathd has spent queueing with +no usable paths. This value can be reset with the '\fIreset map $map stats\fR' +command. +.TP +.B %4 +The number of times the device has entered a state where it will fail IO. +This is an alias for the \fB%x\fR wildcard. +This value can be reset with the '\fIreset map $map stats\fR' command. +.TP +.B %s +The vendor/product string for the device. +.TP +.B %v +The array vendor string for the device. +.TP +.B %p +The array product string for the device. +.TP +.B %e +The array firmware revision string for the device. +.TP +.B %G +The foreign library used for the device, or \fB--\fR for native device-mapper +multipath devices. See "FOREIGN MULTIPATH SUPPORT" in +.BR @CONFIGFILE@ (5). +.TP +.B %g +Data from vendor specific vpd pages for the device, if any. Currently +multipathd supports VPD page 0xc0 for HPE 3PAR / Primera / Alletra storage +arrays. +.TP +.B %k +The actual max_sectors_kb setting for the device (which may be different from +the configured one). +.RE +. +. +.TP +.B Path format wildcards +.RS +.TP 12 +.B %w +The device WWID (uuid). +.TP +.B %i +The device Host:Channel:Id:Lun for SCSI devices. The device "Controller Instance +Number":"Controller ID":"Namespace Instance Number":"Namespace ID" for NVMe +devices. The Controller and Namespace Instance Numbers match the NVMe device +name: "nvmen" +.TP +.B %d +The device sysfs name. +.TP +.B %D +The device major:minor +.TP +.B %t +The device-mapper state of the device, either \fIactive\fR or \fIfailed\fR. +.TP +.B %o +The offline state of the device. This shows "offline" if the device's "state" +attribute in sysfs is "offline" (for SCSI) or "dead" (for NMVe). For all other +sysfs states, it shows "running". +.TP +.B %T +The multipathd path checker state of the device. The possible states are: +.RS +.TP 12 +.I ready +The device is ready to handle IO. +.TP +.I faulty +The device is unusable. +.TP +.I shaky +The device is not able to handle IO but can still be accesed to check the +priority. +.TP +.I ghost +The device is in stand-by state. +.TP +.I i/o pending +The checker is in the process of determining the device state. +.TP +.I i/o timeout +The path checker has timed out, failing the device. +.TP +.I delayed +The device appears usable, but it being delayed for marginal path checking. +.TP +.I undef +The device either is not part of a multipath device, or its path checker has +not yet run. +.PP +.RE +.TP +.B %s +The vendor/product/revision string for the device. +.TP +.B %c +The name of the device's path checking algorithm +.TP +.B %C +The progress towards the next path checker run on the device in seconds. +.TP +.B %p +The device priority. +.TP +.B %S +The device size, using the suffixes \fBK\fR, \fBM\fR, \fBG\fR, \fBT\fR, +and \fBP\fR, to stand for kilobytes, megabytes, gigabytes, terabytes, +and petabytes, respectively. +.TP +.B %z +The device serial number. +.TP +.B %M +The device marginal state, either \fImarginal\fR or \fInormal\fR. +.TP +.B %m +The multipath device that this device is a path of, or \fI[orphan]\fR if +it is not part of any multipath device. +.TP +.B %N +The host World Wide Node Name (WWNN) of the device, if any. +.TP +.B %n +The target World Wide Node Name (WWNN) of the device, if any. +.TP +.B %R +The host World Wide Port Name (WWPN) of the device, if any. +.TP +.B %r +The target World Wide Port Name (WWPN) of the device, if any. +.TP +.B %a +The host adapter name for the device (only SCSI devices). +.TP +.B %G +The foreign library used for the device, or \fB--\fR for native device-mapper +multipath devices. See "FOREIGN MULTIPATH SUPPORT" in +.BR @CONFIGFILE@ (5). +.TP +.B %g +Data from vendor specific vpd pages for the device, if any. Currently +multipathd supports VPD page 0xc0 for HPE 3PAR / Primera / Alletra storage +arrays. +.TP +.B %0 +The number of times this device has failed. +.TP +.B %P +The device protocol. See +.BR @CONFIGFILE@ (5). +.TP +.B %I +The device initialization state. Devices that have been fully initialized +are shown as \fIok\fR. +.TP +.B %L +The device SCSI LUN ID in hexadecimal format. This is only meaningful for +SCSI devices. +.TP +.B %A +The ALUA Target Port Group ID for the device, if applicable. +.TP +.B %k +The actual max_sectors_kb setting for the device (which may be different than +the configured one). +.RE +. +. +.\" ---------------------------------------------------------------------------- .SH "SYSTEMD INTEGRATION" .\" ---------------------------------------------------------------------------- .