Whamcloud - gitweb
LU-930 doc: add lctl-lcfg man pages 87/48887/7
authorTimothy Day <timday@amazon.com>
Wed, 29 Mar 2023 20:16:19 +0000 (20:16 +0000)
committerOleg Drokin <green@whamcloud.com>
Tue, 18 Apr 2023 03:22:07 +0000 (03:22 +0000)
Add "lctl lcfg_clear", "lctl lcfg_erase", and "lctl lcfg_fork"
as aliases for "clear_conf", "erase_lcfg", and "fork_lcfg"
respectively, for more consitent naming.

Add separate man pages for lctl-lcfg_clear, lctl-lcfg_erase,
lcfg-lcfg_fork, lctl-erase_lcfg, lctl-fork_lcfg, lctl-clear_conf.

Remove the combined man page for lctl-lcfg.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I9daf2efc0cf0f9a2b549d8513098729151178207
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48887
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/doc/Makefile.am
lustre/doc/lctl-clear_conf.8 [new file with mode: 0644]
lustre/doc/lctl-erase_lcfg.8 [new file with mode: 0644]
lustre/doc/lctl-fork_lcfg.8 [new file with mode: 0644]
lustre/doc/lctl-lcfg.8 [deleted file]
lustre/doc/lctl-lcfg_clear.8 [new file with mode: 0644]
lustre/doc/lctl-lcfg_erase.8 [new file with mode: 0644]
lustre/doc/lctl-lcfg_fork.8 [new file with mode: 0644]
lustre/utils/lctl.c

index c0e4031..55cb1b9 100644 (file)
@@ -212,7 +212,12 @@ SERVER_MANFILES =                          \
        lctl-barrier.8                          \
        lctl-changelog_deregister.8             \
        lctl-changelog_register.8               \
-       lctl-lcfg.8                             \
+       lctl-clear_conf.8                       \
+       lctl-erase_lcfg.8                       \
+       lctl-fork_lcfg.8                        \
+       lctl-lcfg_clear.8                       \
+       lctl-lcfg_erase.8                       \
+       lctl-lcfg_fork.8                        \
        lctl-lfsck-query.8                      \
        lctl-lfsck-start.8                      \
        lctl-lfsck-stop.8                       \
diff --git a/lustre/doc/lctl-clear_conf.8 b/lustre/doc/lctl-clear_conf.8
new file mode 100644 (file)
index 0000000..b877aa4
--- /dev/null
@@ -0,0 +1 @@
+.so man8/lctl-lcfg_clear.8
diff --git a/lustre/doc/lctl-erase_lcfg.8 b/lustre/doc/lctl-erase_lcfg.8
new file mode 100644 (file)
index 0000000..b9a2c55
--- /dev/null
@@ -0,0 +1 @@
+.so man8/lctl-lcfg_erase.8
diff --git a/lustre/doc/lctl-fork_lcfg.8 b/lustre/doc/lctl-fork_lcfg.8
new file mode 100644 (file)
index 0000000..1c1c81d
--- /dev/null
@@ -0,0 +1 @@
+.so man8/lctl-lcfg_fork.8
diff --git a/lustre/doc/lctl-lcfg.8 b/lustre/doc/lctl-lcfg.8
deleted file mode 100644 (file)
index 2d19d8e..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-.TH LCTL-LCFG 8 "2017-04-13" Lustre "configuration utilities"
-.SH NAME
-lctl-lcfg \- Lustre configuration utilities
-.SH SYNOPSIS
-.br
-.B lctl fork_lcfg \fR{fsname} {newname}
-.br
-.br
-.B lctl erase_lcfg \fR{fsname}
-.br
-.SH DESCRIPTION
-.TP
-.B fork_lcfg \fR{fsname} {newname}
-Generate Lustre configuration for the given filesystem
-.I newname
-based on the specified Lustre system
-.I fsname
-configuration. It is not simply copy. Instead, it uses the
-.I newname
-as the filesystem name in the new configuration. It can be used to
-backup the system configuration, or generate configuration for the
-snapshot that has the same configuration as the original filesystem
-but with different filesystem names.
-
-.TP
-.B erase_lcfg \fR{fsname}
-Permanently erase configuration for the named filesystem. It can be
-used to remove the backup configuration or delete inactive filesystem
-(or snapshot) from a shared MGS.
-
-.SH AVAILABILITY
-.B lctl-lcfg
-is part of the
-.BR lustre (7)
-filesystem package.
-.SH SEE ALSO
-.BR lctl (8),
-.BR lctl-snapshot-create (8),
-.BR lctl-snapshot-destroy (8)
diff --git a/lustre/doc/lctl-lcfg_clear.8 b/lustre/doc/lctl-lcfg_clear.8
new file mode 100644 (file)
index 0000000..d3b540b
--- /dev/null
@@ -0,0 +1,43 @@
+.TH LCTL-LCFG_CLEAR 8 "2023-03-28" Lustre "configuration utilities"
+.SH NAME
+lctl\-lcfg_clear \- clear filesystem config llog
+.SH SYNOPSIS
+.br
+.B lctl lcfg_clear \fIFSNAME\fR|\fIDEVNAME
+.br
+.SH DESCRIPTION
+.B lcfg_clear
+(alias
+.BR clear_conf )
+is run on the MGS node, with the MGS device mounted with the
+.B -o nosvc
+flag. It cleans up any records marked
+.I SKIP
+from the configuration files stored in the
+.I CONFIGS/
+directory. If
+.I DEVNAME
+is given, then the specific logs for
+that filesystem (e.g.
+.IR testfs-MDT0000 )
+are processed. Otherwise, if a filesystem name is given, then all
+configuration files are cleared. The previous configuration log is
+backed up on the MGS disk with the suffix
+.IR 'config.timestamp.bak' ,
+such as
+.IR 'testfs-MDT0000.1476454535.bak' .
+
+.SH AVAILABILITY
+.B lctl-lcfg_clear
+is part of the
+.BR lustre (7)
+filesystem package.
+.SH SEE ALSO
+.BR lctl (8),
+.BR lctl-lcfg_erase (8),
+.BR lctl-lcfg_fork (8),
+.BR lctl-llog_catlist (8),
+.BR lctl-llog_clear (8),
+.BR lctl-llog_print (8),
+.BR lctl-snapshot-create (8),
+.BR lctl-snapshot-destroy (8)
diff --git a/lustre/doc/lctl-lcfg_erase.8 b/lustre/doc/lctl-lcfg_erase.8
new file mode 100644 (file)
index 0000000..26f77af
--- /dev/null
@@ -0,0 +1,29 @@
+.TH LCTL-LCFG_ERASE 8 "2023-03-28" Lustre "configuration utilities"
+.SH NAME
+lctl\-lcfg_erase \- erase filesystem config llog
+.SH SYNOPSIS
+.BI "lctl lcfg_erase " FSNAME
+.SH DESCRIPTION
+.B lcfg_erase
+(alias
+.BR erase_lcfg )
+permanently erases the configuration for the filesystem named
+.IR FSNAME .
+The MGS should be mounted when this command is run. It can be used to
+remove the backup configuration or delete inactive filesystem (or snapshot)
+from a shared MGS. To see the available configuration logs, use
+.B lctl
+.BR llog_catlist .
+
+.SH AVAILABILITY
+.B lctl-lcfg_erase
+is part of the
+.BR lustre (7)
+filesystem package.
+.SH SEE ALSO
+.BR lctl (8),
+.BR lctl-lcfg_clear (8),
+.BR lctl-lcfg_fork (8),
+.BR lctl-llog_catlist (8),
+.BR lctl-snapshot-create (8),
+.BR lctl-snapshot-destroy (8)
diff --git a/lustre/doc/lctl-lcfg_fork.8 b/lustre/doc/lctl-lcfg_fork.8
new file mode 100644 (file)
index 0000000..7d9d1d2
--- /dev/null
@@ -0,0 +1,38 @@
+.TH LCTL-FORK_LCFG 8 "2023-03-28" Lustre "configuration utilities"
+.SH NAME
+lctl-lcfg_fork \- duplicate and rename filesystem config llog
+.SH SYNOPSIS
+.IR "\fBlctl lcfg_fork" " <" FSNAME "> <" NEWNAME >
+.SH DESCRIPTION
+.B lcfg_fork
+(alias
+.BR fork_lcfg )
+generates a new Lustre configuration llog for the filesystem named
+.I NEWNAME
+based on the existing Lustre filesystem configuration for
+.IR FSNAME .
+It is not simply a copy of
+.I FSNAME
+to new configuration files named
+.IR NEWNAME ,
+but rather it also replaces all instances of
+.I FSNAME
+in the configuration with
+.I NEWNAME
+as the filesystem name. It can be used to
+backup the system configuration, or generate configuration for the
+snapshot that has the same configuration as the original filesystem
+but with different filesystem names.
+
+.SH AVAILABILITY
+.B lctl-lcfg_fork
+is part of the
+.BR lustre (7)
+filesystem package.
+.SH SEE ALSO
+.BR lctl (8),
+.BR lctl-lcfg_clear (8),
+.BR lctl-lcfg_erase (8),
+.BR lctl-llog_catlist (8),
+.BR lctl-snapshot-create (8),
+.BR lctl-snapshot-destroy (8)
index 0a13eb5..134e6fe 100644 (file)
@@ -126,8 +126,8 @@ command_t cmdlist[] = {
        {"which_nid", jt_ptl_which_nid, 0, "choose a NID\n"
         "usage: which_nid NID [NID...]"},
        {"replace_nids", jt_replace_nids, 0,
-        "replace primary NIDs for a device\n"
-        "usage: replace_nids <device> <nid1>[,nid2,nid3:nid4,nid5:nid6]"},
+        "replace primary NIDs for device (clients/servers must be unmounted)\n"
+        "usage: replace_nids <DEVICE> <NID1>[,NID2,NID3:NID4,NID5:NID6]"},
        {"interface_list", jt_ptl_print_interfaces, 0,
         "print network interface entries\n"
         "usage: interface_list"},
@@ -451,31 +451,35 @@ command_t cmdlist[] = {
         "usage: llog_catlist"},
        {"llog_info", jt_llog_info, 0,
         "print log header information.\n"
-        "usage: llog_info <logname|FID>\n"},
+        "usage: llog_info {LOGNAME|FID}\n"},
        {"llog_print", jt_llog_print, 0,
         "print all effective log records by default, or within given range.\n"
         "With --raw option skipped records are printed as well.\n"
-        "usage: llog_print <logname|FID> [--start <index>] [--end <index>j]\n"
+        "usage: llog_print {LOGNAME|FID} [--start INDEX] [--end INDEX]\n"
         "                  [--raw]\n"},
        {"llog_cancel", jt_llog_cancel, 0,
         "cancel one record in specified log.\n"
-        "usage:llog_cancel <logname|FID> --log_idx <idx>\n"},
+        "usage:llog_cancel {LOGNAME|FID} --log_idx INDEX\n"},
        {"llog_check", jt_llog_check, 0,
         "verify that log content is valid.\n"
-        "usage: llog_check <logname|FID> [--start <index>] [--end <index>j]\n"
+        "usage: llog_check {LOGNAME|FID} [--start INDEX] [--end INDEX]\n"
         "       check all records from index 1 by default."},
        {"llog_remove", jt_llog_remove, 0,
         "remove one log from catalog or plain log, erase it from disk.\n"
-        "usage: llog_remove <logname|FID> [--log_id <id>]"},
-       {"clear_conf", jt_lcfg_clear, 0,
-        "drop unused config logs for a device or filesystem\n"
-        "usage: clear_conf <device|fsname>"},
-       {"fork_lcfg", jt_lcfg_fork, 0,
+        "usage: llog_remove {LOGNAME|FID} [--log_id ID]"},
+       {"lcfg_clear", jt_lcfg_clear, 0,
+        "drop unused config llog records for a device or filesystem.\n"
+        "clients and servers must be unmounted during this operation.\n"
+        "usage: clear_conf {FSNAME|DEVNAME}"},
+       {"clear_conf", jt_lcfg_clear, 0, "alias for 'lcfg_clear'\n"},
+       {"lcfg_fork", jt_lcfg_fork, 0,
         "copy configuration logs for named filesystem with given name\n"
-        "usage: fork_lcfg <fsname> <newname>"},
-       {"erase_lcfg", jt_lcfg_erase, 0,
+        "usage: fork_lcfg FSNAME NEWNAME"},
+       {"fork_lcfg", jt_lcfg_fork, 0, "alias for 'lcfg_fork'\n"},
+       {"lcfg_erase", jt_lcfg_erase, 0,
         "permanently erase configuration logs for the named filesystem\n"
-        "usage: erase_lcfg <fsname>"},
+        "usage: erase_lcfg FSNAME"},
+       {"erase_lcfg", jt_lcfg_erase, 0, "alias for 'lcfg_erase'\n"},
 #endif /* HAVE_SERVER_SUPPORT */
 
        {"==== obsolete (DANGEROUS) ====", NULL, 0, "obsolete (DANGEROUS)"},