From b22b69e01deb56d7977e7e3128bb6edf3226f10c Mon Sep 17 00:00:00 2001 From: =?utf8?q?K=C3=A9vin=20Baillergeau?= Date: Tue, 28 Apr 2020 08:10:27 +0000 Subject: [PATCH] LU-13433 doc: fix lfs mirror "delete" and "split" doc MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Add --mirror-id and --component-id in "lfs mirror delete" usage Add examples with --comp-id in lfs mirror delete and split manpages Add --comp-id in lfs mirror delete and split manpages Test-Parameters: trivial Signed-off-by: Kévin Baillergeau Change-Id: Icdc010eec9141b2582f9d43418523643b11018e5 Reviewed-on: https://review.whamcloud.com/38394 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/doc/lfs-mirror-delete.1 | 9 ++++++--- lustre/doc/lfs-mirror-split.1 | 9 +++++++-- lustre/utils/lfs.c | 8 +++++--- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/lustre/doc/lfs-mirror-delete.1 b/lustre/doc/lfs-mirror-delete.1 index 93a4f11..00d4982 100644 --- a/lustre/doc/lfs-mirror-delete.1 +++ b/lustre/doc/lfs-mirror-delete.1 @@ -3,9 +3,9 @@ lfs mirror delete \- delete a specified mirror from an existing mirrored file .SH SYNOPSIS .B lfs mirror delete -{\fB\-\-mirror\-id\fR <\fImirror_id\fR> | \fB\-\-component\-id\fR|\fB\-I\fR -<\fIcomp_id\fR> |\fB\-\-pool\fR <\fIpool\fR>} -<\fImirrored_file\fR> +{\fB\-\-mirror\-id\fR <\fImirror_id\fR> | \fB\-\-component\-id\fR|\ +\fB\-\-comp\-id\fR|\fB\-I\fR <\fIcomp_id\fR> | +\fB\-\-pool\fR <\fIpool\fR>} <\fImirrored_file\fR> .SH DESCRIPTION This command deletes a mirror with mirror ID <\fImirror_id\fR> or containing a component with <\fIcomp_id\fR> or containing a component on <\fIpool\fR> @@ -36,6 +36,9 @@ The pool storing a component contained within a mirror. .B lfs mirror delete --mirror-id 2 /mnt/lustre/file1 Delete the mirror with ID 2 of /mnt/lustre/file1. .TP +.B lfs mirror delete --comp-id 65537 /mnt/lustre/file1 +Delete the mirror containing the component with ID 65537 of /mnt/lustre/file1. +.TP .B lfs mirror delete --pool ssd /mnt/lustre/file1 Split a mirror on pool ssd out of /mnt/lustre/file1 and destroy it. .SH AUTHOR diff --git a/lustre/doc/lfs-mirror-split.1 b/lustre/doc/lfs-mirror-split.1 index d250b7f..fb74f18 100644 --- a/lustre/doc/lfs-mirror-split.1 +++ b/lustre/doc/lfs-mirror-split.1 @@ -3,8 +3,9 @@ lfs mirror split \- split a specified mirror from an existing mirrored file .SH SYNOPSIS .B lfs mirror split -{\fB\-\-mirror\-id\fR <\fImirror_id\fR> | \fB\-\-component\-id\fR|\fB\-I\fR -<\fIcomp_id\fR> |\fB\-\-pool\fR <\fIpool\fR>} +{\fB\-\-mirror\-id\fR <\fImirror_id\fR> | \fB\-\-component\-id\fR|\ +\fB\-\-comp\-id\fR|\fB\-I\fR +<\fIcomp_id\fR> | \fB\-\-pool\fR <\fIpool\fR>} [\fB\-\-destroy\fR|\fB\-d\fR] [\fB\-f\fR <\fInew_file\fR>] <\fImirrored_file\fR> @@ -56,6 +57,10 @@ Split a mirror with ID 2 out of /mnt/lustre/file1 and destroy it. Split a mirror with ID 3 out of /mnt/lustre/file1 and store it into /mnt/lustre/file2. .TP +.B lfs mirror split --comp-id 65537 -d /mnt/lustre/file1 +Split a mirror containing the component with ID 65537 out of /mnt/lustre/file1 +and destroy it. +.TP .B lfs mirror split --pool lustre-nvme -d /mnt/lustre/file1 Split a mirror on pool lustre-nvme out of /mnt/lustre/file1 and destroy it. .SH AUTHOR diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index 1490ffe..b186841 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -298,8 +298,10 @@ command_t mirror_cmdlist[] = { "[SETSTRIPE_OPTIONS] ... ...\n" MIRROR_CREATE_HELP }, { .pc_name = "delete", .pc_func = lfs_mirror_delete, - .pc_help = "delete a mirror from a file.\n" - "usage: lfs mirror delete {--comp-id|-I |-p } ...\n" + .pc_help = "Delete a mirror from a file.\n" + "usage: lfs mirror delete {--mirror-id |\n" + "\t --component-id|--comp-id|-I |\n" + "\t -p } ...\n" }, { .pc_name = "extend", .pc_func = lfs_mirror_extend, .pc_help = "Extend a mirrored file.\n" @@ -310,7 +312,7 @@ command_t mirror_cmdlist[] = { { .pc_name = "split", .pc_func = lfs_mirror_split, .pc_help = "Split a mirrored file.\n" "usage: lfs mirror split <--mirror-id |\n" - "\t <--component-id|-I |-p > [--destroy|-d]\n" + "\t --component-id|-I |-p > [--destroy|-d]\n" "\t [-f ] ...\n" "\tmirror_id: The numerical unique identifier for a mirror. It\n" "\t can be fetched by lfs getstripe command.\n" -- 1.8.3.1