Whamcloud - gitweb
e2fsck: allow deleting or zeroing shared blocks
[tools/e2fsprogs.git] / e2fsck / e2fsck.8.in
index 4c29943..d91c74d 100644 (file)
@@ -101,21 +101,21 @@ Instead of using the normal superblock, use an alternative superblock
 specified by
 .IR superblock .
 This option is normally used when the primary superblock has been
-corrupted.  The location of the backup superblock is dependent on the
-filesystem's blocksize.  For filesystems with 1k blocksizes, a backup
-superblock can be found at block 8193; for filesystems with 2k
-blocksizes, at block 16384; and for 4k blocksizes, at block 32768.
+corrupted.  The location of backup superblocks is dependent on the
+filesystem's blocksize, the number of blocks per group, and features
+such as
+.BR sparse_super .
 .IP
 Additional backup superblocks can be determined by using the
 .B mke2fs
 program using the
 .B \-n
-option to print out where the superblocks were created.   The
-.B \-b
-option to
-.BR mke2fs ,
-which specifies blocksize of the filesystem must be specified in order
-for the superblock locations that are printed out to be accurate.
+option to print out where the superblocks exist, supposing
+.B mke2fs
+is supplied with arguments that are consistent with the filesystem's layout
+(e.g. blocksize, blocks per group,
+.BR sparse_super ,
+etc.).
 .IP
 If an alternative superblock is specified and
 the filesystem is not opened read-only, e2fsck will make sure that the
@@ -198,6 +198,19 @@ separated, and may take an argument using the equals ('=') sign.  The
 following options are supported:
 .RS 1.2i
 .TP
+.BI clone= dup|zero
+Resolve files with shared blocks in pass 1D by giving each file a private
+copy of the blocks (dup);
+or replacing the shared blocks with private, zero-filled blocks (zero).
+The default is dup.
+.TP
+.BI shared= preserve|lost+found|delete
+Files with shared blocks discovered in pass 1D are cloned and then left
+in place (preserve);
+cloned and then disconnected from their parent directory,
+then reconnected to /lost+found in pass 3 (lost+found);
+or simply deleted (delete).  The default is preserve.
+.TP
 .BI ea_ver= extended_attribute_version
 Set the version of the extended attribute blocks which
 .B e2fsck
@@ -266,6 +279,20 @@ Convert block-mapped files to extent-mapped files.
 Only fix damaged metadata; do not optimize htree directories or compress
 extent trees.  This option is incompatible with the -D and -E bmap2extent
 options.
+.TP
+.BI unshare_blocks
+If the filesystem has shared blocks, with the shared blocks read-only feature
+enabled, then this will unshare all shared blocks and unset the read-only
+feature bit. If there is not enough free space then the operation will fail.
+If the filesystem does not have the read-only feature bit, but has shared
+blocks anyway, then this option will have no effect. Note when using this
+option, if there is no free space to clone blocks, there is no prompt to
+delete files and instead the operation will fail.
+.IP
+Note that unshare_blocks implies the "-f" option to ensure that all passes
+are run. Additionally, if "-n" is also specified, e2fsck will simulate trying
+to allocate enough space to deduplicate. If this fails, the exit code will
+be non-zero.
 .RE
 .TP
 .B \-f
@@ -472,6 +499,11 @@ man page for more details.
 Always include the full version string which
 .B e2fsck
 displays when it is run, so I know which version you are running.
+.SH ENVIRONMENT
+.TP
+.BI E2FSCK_CONFIG
+Determines the location of the configuration file (see
+.BR e2fsck.conf (5)).
 .SH AUTHOR
 This version of
 .B e2fsck