From patchwork Mon May 13 17:36:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 13663589 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 15E3B2E64B for ; Mon, 13 May 2024 17:36:54 +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=1715621816; cv=none; b=VtwOsWYvQg/7aeXhIUuVe1VT8VgBgxyAIMIO/qVOSeLz6QQtOgeHeW8HrNpT7kzlCVE//qIuCaJeAxBgHE2ULKWehNHapB0l4fVIk7yw9GddLr2tSCMcPBsfNOsD7wyzBX2pn7OsLZaMDP7A8nOYnPE3P5DbO9VTz7crzxOqeuQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715621816; c=relaxed/simple; bh=9H2aVRNfvWv1Qe9kaJ4Xl3q8fHaEl2DP5vBzUUtl7To=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=d0AShFQO2UToRArDxRQsdTgkCBZfkx+qCn0G61mtE/qNQgi6BUokj9b/gsLkLgLHuYjbPPsWeJbr9/hMZOh0/Xo4JJn0nfNDIUu/zjf5PtXjXhOXdOd0QmYOkzdF2Pc73LZaKXknEXFS6qmFQV4EKG9Tv1oY4jEl9BYrIUddP/c= 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=gdUGLYit; 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="gdUGLYit" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715621814; 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=sKWL5tx3+wSmAUBnOBo2JzGr51L/M1/BrUmjDlVGik0=; b=gdUGLYitv0BsCYosLJYo4j6XjXRXg0TKgqrPFTAQQBN1b1jQxVjD6Wzisa2R9jxJgmubLx ERS9jj6YqNywB3wUokV9IOPHYBANip8WKP6DtFthZGDXrSXNdu4ChycOpm/GnccO8MSgXB inkmGO4QaaxkEwe/hyG65LTpmNR5L/w= 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-257-bbxON6udPtSTcPmPRMBEpw-1; Mon, 13 May 2024 13:36:47 -0400 X-MC-Unique: bbxON6udPtSTcPmPRMBEpw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (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 4F9A03802266; Mon, 13 May 2024 17:36:47 +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 4658A200BD93; Mon, 13 May 2024 17:36:47 +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 44DHal3j094444 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 13 May 2024 13:36:47 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 44DHalsc094443; Mon, 13 May 2024 13:36:47 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Nitin Yewale Subject: [PATCH 1/7] libmultipath: remove pathgroup wildcard options Date: Mon, 13 May 2024 13:36:40 -0400 Message-ID: <20240513173646.94424-2-bmarzins@redhat.com> In-Reply-To: <20240513173646.94424-1-bmarzins@redhat.com> References: <20240513173646.94424-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.6 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 --- 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 Mon May 13 17:36:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 13663590 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 A603221342 for ; Mon, 13 May 2024 17:36:58 +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=1715621821; cv=none; b=Sk0k+POYRtgoKJ9S8bLSBCX7Lt6YZ0NCpL5pBeMJx194MIZ4zoodQxcWehDdEpBufEZLTTUdwj1bX9hl7lf7E8uPWVO+Ofl0etXN9vjaJOyQgRoIx29G2Qud34puo0G/Y4qrt0CHTLAfL8SI2Z7pMJcZSHn0d4/4JNJOQS0ttW8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715621821; c=relaxed/simple; bh=DCJiW4F6GKIPbtxZoJOL5c8rrMimdkWiLgsC/9Ff3yM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lE8yFW3W0exTJxA4IlKoth5a1LLx8fsDsj5aigvT0xZ15L0wjCOiDofYTYGbWTiVaZ/NlJWxikU5WjOdel6Mb6/ENdP0VK7GnIrHCGk1lMFhV1cSWIZuLF8KTKAcFsY11IQjzvU0I9tgDEHhbvXBthtQaNnFlxWc4kPzneYzjwk= 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=UIL/gZSD; 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="UIL/gZSD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715621815; 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=7O+2vIpuwi4H1sej82WHrazmT5ZqH2acdh7MazwzW1o=; b=UIL/gZSDu3oeoFQzuHJceDt2khONojacLhFS6BclIF+lFrEflLSGJ412zlY3XM+xlpXY7a 6yoCMibWbEBWjeQnwzlY9zrBg4Lvhaq85LVXGa7XVL+dAZY0x3T5bjBTWMTiwuM3ff62YN gaiKoS10zmtGgJtWKZolr36t5xTvaRs= 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-259-mboMOfjHPQSryCgmf-io6A-1; Mon, 13 May 2024 13:36:48 -0400 X-MC-Unique: mboMOfjHPQSryCgmf-io6A-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 747C4800656; Mon, 13 May 2024 17:36:47 +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 6D0202028B55; Mon, 13 May 2024 17:36:47 +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 44DHalvb094448 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 13 May 2024 13:36:47 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 44DHalhG094447; Mon, 13 May 2024 13:36:47 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Nitin Yewale Subject: [PATCH 2/7] multipath-tools man pages: don't assume multipath.socket is enabled Date: Mon, 13 May 2024 13:36:41 -0400 Message-ID: <20240513173646.94424-3-bmarzins@redhat.com> In-Reply-To: <20240513173646.94424-1-bmarzins@redhat.com> References: <20240513173646.94424-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.4 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 --- 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 Mon May 13 17:36:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 13663586 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 7485222331 for ; Mon, 13 May 2024 17:36:50 +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=1715621812; cv=none; b=mCseyqC93vt4FmICEaETj1k2CZ/fzBCtPyoHpYiPnfGWijZD13eu7pjCDAxokkfguWYYgvG7yYulAF0QKHxSjaMyCb3KOGJ5FH8XewxJ9q1kmFwfdI3p8bQN2nlogl+tSunvqYe4FWtl05SJfIPEmsCNRCVcGObz0ep1VrZGiW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715621812; c=relaxed/simple; bh=+fAKt390NpNcNL3sC77l3Oog2Isd365zFFrUV6KoDtM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=f2P/fEN2y8aQFgOS6Mizus+FV7Bwa6MOrDt+c8SE7Ks8fKMEgJaLyGulCCe2ewInl5MIfcixxvN7VsLR8OeIwJBcJ3ylvuqvij4GfN23qpMJO48BSFzr28d29e3b5fj8JXDOEssA+nwv95AdOtx8C1WidZJVsQ6YkWDoA5+peCM= 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=DRYW996g; 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="DRYW996g" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715621809; 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=FW8fgl7XMjEtORMNPFuPWgH9zqfwCf3tlHumymA2NeY=; b=DRYW996gtioSptIEMkzvckgt4+X2+8lRWd7zMEelxBo5bjdy0dipDPQgEC1fiPQmz98XLo yVEldYliJuW6JOkO3fQFpW+LDxB9tfb+xI9H9kZgRamXJv0dNldo7lG9At73DwknjRQyvX WHv377WMnp9If817rM8vlIjupQB0eP4= 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-531-V69wS147MpyH5gSMxYdcRw-1; Mon, 13 May 2024 13:36:47 -0400 X-MC-Unique: V69wS147MpyH5gSMxYdcRw-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 9B95529ABA00; Mon, 13 May 2024 17:36:47 +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 95AA7561A; Mon, 13 May 2024 17:36:47 +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 44DHaldi094452 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 13 May 2024 13:36:47 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 44DHalsg094451; Mon, 13 May 2024 13:36:47 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Nitin Yewale Subject: [PATCH 3/7] libmultipath: print all values in snprint_failback Date: Mon, 13 May 2024 13:36:42 -0400 Message-ID: <20240513173646.94424-4-bmarzins@redhat.com> In-Reply-To: <20240513173646.94424-1-bmarzins@redhat.com> References: <20240513173646.94424-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 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 --- libmultipath/print.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libmultipath/print.c b/libmultipath/print.c index 89813517..14e7e325 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, "%i", mpp->pgfailback); else return snprint_progress(buff, mpp->failback_tick, mpp->pgfailback); From patchwork Mon May 13 17:36:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 13663587 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 0D91221342 for ; Mon, 13 May 2024 17:36:50 +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=1715621812; cv=none; b=Dj9SMh+K/UZUgOmnD4yDnj96gsdQS4FhZYKWVj9FBkhVbn+42hzim100leW3f/9sYavFYofS2jVd2XzOIy+/fNA6s3gwufNr3R+WNIRl6NUQ+ICdy/brTxTlkoDgOMOIy512ckzEIDNtPOKrmsU2p0lLTzl3RC+BAdSVUxageLA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715621812; c=relaxed/simple; bh=XPOyhLpdzjfBjWMJQC++bWMFGB02RkWZmoU0GhkPD2U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dcLp+s/es6kefqYWkToeYG24tR7lfONgM6OdHY4PwlhfQBMfXoyFKQVlSOh65eEODhwq1hwHkscXO5P56LToxWObMDce+l85zdDoYABKet7sx7mUMYwEUOJjuKh0c7uCS8BLGs884vLo06RUrus2ev4zFO/C9lHxReBu0T69R7A= 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=aipRt1MI; 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="aipRt1MI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715621809; 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=5g7QJUMR1aKf71DwzBEMztPeWjUFXk7V/omvaIndiUU=; b=aipRt1MI4zTb8xMszVEd7QZ2QaaRlpie12E4sgPKA9uAcAajWTHhmmlQaAnMKWFgokhJ+s 9snN8oW5hKkYAmjIfSxaSF2qmM5w71Nss6UjpuodVTj7uXTOH+46LG2X/9BFKt6KB0Qyd+ RJadxID7qFwynAR1egEJmWd8IT/zzkk= 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-533-vfIP7DdiOGGspMNPMy8hUw-1; Mon, 13 May 2024 13:36:48 -0400 X-MC-Unique: vfIP7DdiOGGspMNPMy8hUw-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 C41873C0009C; Mon, 13 May 2024 17:36:47 +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 BE478562D; Mon, 13 May 2024 17:36:47 +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 44DHallH094456 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 13 May 2024 13:36:47 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 44DHalEj094455; Mon, 13 May 2024 13:36:47 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Nitin Yewale Subject: [PATCH 4/7] multipathd: Stop double counting map failures for no_path_retry > 0 Date: Mon, 13 May 2024 13:36:43 -0400 Message-ID: <20240513173646.94424-5-bmarzins@redhat.com> In-Reply-To: <20240513173646.94424-1-bmarzins@redhat.com> References: <20240513173646.94424-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 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 --- 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 Mon May 13 17:36:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 13663591 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 B38E23716D for ; Mon, 13 May 2024 17:37: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=1715621827; cv=none; b=YNQOiHNJ4LDYpvFF2l4iTIWIrFo3rMRTmnDu2xZ1zcgH+8kGJdN69TqaEvOY2x5vXZ3CYEoDPxeKIFnbtZqjmBz4MajI0piUaeufTjMFpSoN4AZwz0/btsmlfbZrf3qflTlGpvnNMhUpOeVC/HuOy5IAwm716k061FwJzuyj/wI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715621827; c=relaxed/simple; bh=qXVEVyZjJHYJku5vEGUiA8ObYhf47fdMtMghGIXNiMM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tKkQjBBD5t9kJiUQC7RtKICid/sC3nmiZHzNj/XmyiS/Rrc8kbl6G35l4uOud2iixesCaSf6yOEGzI9gtLB6JDJVk0xq0urmxZeqJgP9NWYBxVTgcTRR8rq6IOdELU0oV+7l5AGEtjErB2EbBtiUeVtLLDn/e4Y/ifV0X08g650= 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=M/v6+rFk; 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="M/v6+rFk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715621824; 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=9A82VgKvY1q/pCveZ33h8nsqvOpqWF4gTSg6BcCUNlc=; b=M/v6+rFkIlbutN5Orw1SnYDHCIW/ryU5NVrVXYCz/9QjklHTdLgyf+b9JJtxh2w6i+qD/v ttLqxZr8OQVt2sZYMcjyxsCuNLAuErIAjRJVB3RscWE3hYjmHA2+LGpwD+jxw+qu0gOWmO 4gyyT23/EoHT6AUUP/Y/Pq3W9zsoH30= 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-494-akaIE3ecNRqzV0XyEH1B8g-1; Mon, 13 May 2024 13:36:48 -0400 X-MC-Unique: akaIE3ecNRqzV0XyEH1B8g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 EF49885A58C; Mon, 13 May 2024 17:36:47 +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 E7790C15BF6; Mon, 13 May 2024 17:36:47 +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 44DHalrY094460 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 13 May 2024 13:36:47 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 44DHalC4094459; Mon, 13 May 2024 13:36:47 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Nitin Yewale Subject: [PATCH 5/7] multipath-tools man pages: add missing multipathd commands Date: Mon, 13 May 2024 13:36:44 -0400 Message-ID: <20240513173646.94424-6-bmarzins@redhat.com> In-Reply-To: <20240513173646.94424-1-bmarzins@redhat.com> References: <20240513173646.94424-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.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Also, the description for "del map $map" was incorrect. Signed-off-by: Benjamin Marzinski --- 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 Mon May 13 17:36:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 13663593 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 7E32322331 for ; Mon, 13 May 2024 17:43:00 +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=1715622181; cv=none; b=iluUnWIxEjbjSjd/zfBsdofYNI0Pu3v0X2BaohEnKMRGPSD6PuEFMCqOCyV2KhycEojwOFiqeIQ0KvZ904mDvTXqMCDtTjL0wSXBIkKvyMvFntm4XA1s/ywxygU/4gs128do06k3Y3v2xc1zPCpKLPBURkfKiNS0X64KlQWBPpg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715622181; c=relaxed/simple; bh=jmzuC1EqGn6tkNKVwy7hoh7FaiwSY2YkYARM+bZP02w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=g/BMWA7aIglVcZDwCr/DgYSx7t+w4pbZ8JEC0Z+sM1XDhjJTwCekxO7qnmVBMYUkFl8DvEjQ83cNeZE5fjCESMNR5pjS8S7YboOV8lW4jVoUc4p+DCiu+W3xfsUO0GOmWHZParpyWoFinN5JCfNBiMKre9tAoK3pvdxdzM+n1D8= 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=T6ecaRgw; 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="T6ecaRgw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715622179; 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=lSAYs1lyvz0S+7Cz7Aq7FZQAgPSfyFAB8xvdA7+q4B0=; b=T6ecaRgwwJcRgYFkHcUoFBhxQ3BFSUWTuDVYYmcXhwUG9qIMcglEM1CI07SrPuSPVPImGy 5njhpk03SHQwCI2Mu+0aMQBAITqdZM/RvC5DGe20BrqqdenTYHvFeHnQJapYf3DFmycdyq AwvQlUSWVle/6HnW99WGi4Tt2zp3HgE= 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-512-dhA2q_j5Nr-YkI5YSqsF6Q-1; Mon, 13 May 2024 13:36:48 -0400 X-MC-Unique: dhA2q_j5Nr-YkI5YSqsF6Q-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 263D83C0C891; Mon, 13 May 2024 17:36:48 +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 1D639C15983; Mon, 13 May 2024 17:36:48 +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 44DHalAu094464 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 13 May 2024 13:36:48 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 44DHaluQ094463; Mon, 13 May 2024 13:36:47 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Nitin Yewale Subject: [PATCH 6/7] libmultipath: change the vend/prod/rev printing Date: Mon, 13 May 2024 13:36:45 -0400 Message-ID: <20240513173646.94424-7-bmarzins@redhat.com> In-Reply-To: <20240513173646.94424-1-bmarzins@redhat.com> References: <20240513173646.94424-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.8 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 --- libmultipath/print.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libmultipath/print.c b/libmultipath/print.c index 14e7e325..cccfe5a3 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 Mon May 13 17:36:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 13663588 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 091CB2D058 for ; Mon, 13 May 2024 17:36:52 +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=1715621814; cv=none; b=Da9wlrXr8YdOg+o7rXj3trIss0c+bNOOEiuf+8yty8XkN+Dh+YE/xmoUsSC8Mn9JycJ7Y+3/g7zTNpI/zJ7hA10Wbu1ahbKqjzg4M0RBPvdeq0qRWZbLOPzq8j8X/1vrMLjbYbu2bEit08TV4QdFR/rGY7o6yZpVxqUhX94i4g4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715621814; c=relaxed/simple; bh=QQrJAwm15f3jXW0J+jQ75Uwljj2DPtmT7hvtpJT3eKA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kUhTn4i9QwW8GG3b7Oz6bBlUaY8okmPnfgxWxfGvMbqysT4Q8mZ5FIGdDVT9g7lLarGJ9pli/BhocTm7RTPQv2gL3CeJ9MalTCOVZHY7AoLketOEeROHSwG360pOg1JJRIsVqk0tkTX7sMlHRqEsJqOfafYXb6+CBpE/bUhj9K4= 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=Q1A65SQ7; 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="Q1A65SQ7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1715621811; 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=l1dS2HujO1J4f+UTaB+Go3TPIaorbbi8ZZEVLw0wQ6U=; b=Q1A65SQ7Kt6qjk1PDSo+4VO07dlVfjDcQvdIInKxm/QxMUOtDxTmDAFd+E70dYkN6Q16O2 C9j8PGUXbnEu/ZkZE/OMiziBMkz38N9+oQh/7bI3Ypzh9i75xd24Id+1Rb5oc68SG6Izaj NvgSHYTJ04LLkKXNc3wYoCauwEov7k0= 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-369-0Z0v5kNSPXyXE0WhP9jX2Q-1; Mon, 13 May 2024 13:36:48 -0400 X-MC-Unique: 0Z0v5kNSPXyXE0WhP9jX2Q-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 517688016E9; Mon, 13 May 2024 17:36:48 +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 4533D400F390; Mon, 13 May 2024 17:36:48 +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 44DHamMv094468 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 13 May 2024 13:36:48 -0400 Received: (from bmarzins@localhost) by bmarzins-01.fast.eng.rdu2.dc.redhat.com (8.17.2/8.17.2/Submit) id 44DHamOF094467; Mon, 13 May 2024 13:36:48 -0400 From: Benjamin Marzinski To: Christophe Varoqui Cc: device-mapper development , Martin Wilck , Nitin Yewale Subject: [PATCH 7/7] multipath-tools man pages: Add format wildcard descriptions Date: Mon, 13 May 2024 13:36:46 -0400 Message-ID: <20240513173646.94424-8-bmarzins@redhat.com> In-Reply-To: <20240513173646.94424-1-bmarzins@redhat.com> References: <20240513173646.94424-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 Suggested-by: Nitin Yewale Signed-off-by: Benjamin Marzinski --- multipathd/multipathd.8.in | 211 ++++++++++++++++++++++++++++++++++++- 1 file changed, 207 insertions(+), 4 deletions(-) diff --git a/multipathd/multipathd.8.in b/multipathd/multipathd.8.in index 32976052..ff150f3d 100644 --- a/multipathd/multipathd.8.in +++ b/multipathd/multipathd.8.in @@ -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,207 @@ 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 +print the configured time if a deferred failback is not in progress, or +it will show the current progress of a deferred failback. +.TP +.B %Q +The device \fBno_path_retry\fR setting. If no_path_retry is set to a +number of retires, 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 device-mapper state of the device, either \fIsuspend\fR or \fIactive\fR. +.TP +.B %S +The device size. +.TP +.B %f +The device table features string. +.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. +.TP +.B %g +Data from vendor specific vpd pages for the device, if any. +.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 +.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 +Whether the device is \fIoffline\fR or \fIrunning\fR. +.TP +.B %T +The multipathd path checker state of the device. +.TP +.B %s +The vendor/product/revision string for the device. +.TP +.B %c +The device's path checker name. +.TP +.B %C +The progress towards the next path checker run on the device. +.TP +.B %p +The device priority. +.TP +.B %S +The device size. +.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. +.TP +.B %N +The host World Wide Node Name (WWNN) of the device. +.TP +.B %n +The target World Wide Node Name (WWNN) of the device. +.TP +.B %R +The host World Wide Port Name (WWPN) of the device. +.TP +.B %r +The target World Wide Port Name (WWPN) of the device. +.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 paths of native +device-mapper multipath devices. +.TP +.B %g +Data from vendor specific vpd pages for the device, if any. +.TP +.B %0 +The number of times this device has failed. +.TP +.B %P +The device protocol. This output can be used for \fIprotocol\fR blacklist +entries. +.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 +.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" .\" ---------------------------------------------------------------------------- .