Whamcloud - gitweb
LU-930 docs: add lfs-rm_entry.8 man page 64/49064/6
authorAndreas Dilger <adilger@whamcloud.com>
Mon, 7 Nov 2022 21:56:24 +0000 (14:56 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 13 Dec 2022 16:07:53 +0000 (16:07 +0000)
Add man page for "lfs rm_entry" and alias "lfs rmentry".

Test-Parameters: trivial
Fixes: 2ad263c602 ("LU-1187 utils: add lfs setdirstripe/getdirstripe")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I783f23ec8fd0c75c69bcc78c180a07e54dd0c8a1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49064
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/doc/Makefile.am
lustre/doc/lfs-rm_entry.8 [new file with mode: 0644]
lustre/doc/lfs-rmentry.8 [new file with mode: 0644]
lustre/utils/lfs.c

index d98de39..2c6e699 100644 (file)
@@ -77,6 +77,8 @@ MANFILES =                                    \
        lfs-pcc.1                               \
        lfs-project.1                           \
        lfs-quota.1                             \
+       lfs-rm_entry.8                          \
+       lfs-rmentry.8                           \
        lfs-rmfid.1                             \
        lfs-setdirstripe.1                      \
        lfs-setquota.1                          \
diff --git a/lustre/doc/lfs-rm_entry.8 b/lustre/doc/lfs-rm_entry.8
new file mode 100644 (file)
index 0000000..f62c194
--- /dev/null
@@ -0,0 +1,36 @@
+.TH LFS-RMENTRY 8 2017-07-25 "Lustre" "Lustre Utilities"
+.SH NAME
+lfs-rmentry \- remove only filename from directory
+.SH SYNOPSIS
+.B lfs rmentry <FILENAME|DIRECTORY>
+.SH DESCRIPTION
+In cases where an MDT is permanently offline, or if there is an inconsistency
+between MDT directory contents and files (e.g. broken striped directory), the
+.B lfs rmentry
+command removes
+.B only
+the filename entry from a directory, but does not try to delete the inode
+corresponding to the filename.  The MDT inode itself (or a local agent inode
+in the case of DNE remote entries) will still remain on the MDT filesystem,
+and will be reconnected to the internal MDT lost+found directory when
+e2fsck is next run.  Since the MDT inode itself is not deleted, any OST
+objects referenced by this inode will also not be destroyed, so no space
+will be released.
+.SH WARNING
+The main reason to use
+.B lfs rmentry
+is to remove filenames or directory names that are permanently inaccessible,
+in order to allow them to be restored from backup, or to avoid application
+errors when accessing these filenames.  It should not be used to delete files
+that are normally accessible, and can only be run by the root user.
+.SH EXAMPLES
+.TP
+.B lfs rmentry /mnt/testfs/mdt7/newdir
+Remove directory entry
+.B newdir
+on MDT0007 since the remote MDT it is referencing is no longer accessible.
+.SH AUTHOR
+The \fBlfs rmentry\fR command is part of the Lustre filesystem.
+.SH SEE ALSO
+.BR lfs (1),
+.BR lfs-rmfid (1)
diff --git a/lustre/doc/lfs-rmentry.8 b/lustre/doc/lfs-rmentry.8
new file mode 100644 (file)
index 0000000..8ceeadd
--- /dev/null
@@ -0,0 +1 @@
+.so man8/lfs-rm_entry.8
index cafc758..58890c8 100644 (file)
@@ -388,6 +388,7 @@ command_t cmdlist[] = {
         "will become inaccessable after this command. This can only be done\n"
         "by the administrator\n"
         "usage: rm_entry <dir>\n"},
+       {"rmentry", lfs_rmentry, 0, "remove a dir entry, same as 'rm_entry'\n"},
        {"unlink_foreign", lfs_unlink_foreign, 0,
         "To remove the foreign file/dir.\n"
         "Note: This is for files/dirs prevented to be removed using\n"