mmfsck command
Checks and repairs a GPFS file system.
Synopsis
mmfsck Device [-n | -y | --patch] [--patch-file FileName]
[-c | -m | -o | --skip-inode-check | --skip-directory-check]
[-s | -v | -V] [-t TmpDirPath] [--threads Num] [--estimate-only]
[--use-stale-replica] [--qos QosClass]
[-N {all | mount | Node[,Node...] | NodeFile | NodeClass}]
ormmfsck Device --status-report
The file system must be unmounted before you can run the mmfsck command with any option other than -o.
Availability
Available on all IBM Spectrum Scale editions.
Description
mmsysmonc event filesystem fsstruct_fixed <filesystem_name> <filesystem_name>
If neither the -n nor -y flag is specified, the mmfsck command runs interactively and prompts you for permission to repair each consistency error as it is reported. It is suggested that you run the mmfsck command interactively (the default) in all but the most severely damaged file systems.
I/O errors or error messages with an instruction to run the mmfsck command might indicate file system inconsistencies. If so, issue the mmfsck command to check file system consistency and to interactively repair the file system.
- Blocks that are marked as allocated but that do not belong to any file (lost blocks). The corrective action is to mark the block free in the allocation map. A possible indicator of lost blocks is that I/O operations fail with an out-of-space error after repeated node failures.
- Corruptions in the block allocation map. The corrective action is to repair the corrupted blocks. This check detects and repairs structural corruptions, such as corrupt block headers and corrupt disk addresses. It does not detect and repair non-structural corruptions, such as bad allocation map bits. Possible indicators of corruptions in the block allocation map are MMFS_FSSTRUCT entries in the system logs after an attempt to create or delete a file.
- Files for which an inode is allocated and no directory entry exists (orphaned files). The corrective action is to create directory entries for these files in a lost+found subdirectory of the fileset to which the orphaned file or directory belongs. The index number of the inode is assigned as the name. If you do not allow the mmfsck command to reattach an orphaned file, it asks for permission to delete the file.
- Directory entries that point to an inode that is not allocated. The corrective action is to remove the directory entry.
- Incorrectly formed directory entries. A directory file contains the inode number and the generation number of the file to which it refers. When the generation number in the directory does not match the generation number that is stored in the inode of the file, the corrective action is to remove the directory entry.
- Incorrect link counts on files and directories. The corrective action is to update them with accurate counts.
- Policy files that are not valid. The corrective action is to delete the file.
- Various problems that are related to filesets. Such problems include missing or corrupted fileset metadata, inconsistencies in directory structure related to filesets, missing or corrupted fileset root directories, or other problems in internal data structures. The repaired filesets are renamed as Fileset FilesetId and put into unlinked state.
You can also run the mmfsck command in read-only offline mode to get a list of inodes within filesets that might be deleted or modified by the repair. You can mount the file system in read-only mode and run the tsfindinode command to find the path names (which allow you to restore a file from backup after repair) of all affected inodes. Then run mmfsck again in repair mode to fix any problems with the file system. If you do not need to know the path names of affected files you can use this command for a full scan to save time: mmfsck repair (-y)
- The --patch option is faster only for large file systems. For smaller file systems you can use either the --patch option or the -y option.
- The --patch option uses a single thread to repair the file system. This can be slower than the full scan repair of the file system if there are many (more than 10,000) corruptions.
- The --patch option is safe only if the file system has not been
modified after generating the --patch-file from a previous read-only
offline mmfsck run. Because the --patch option uses a
list of known corruptions, if the file system is changed (for example, by mounting it as read-write
after the read-only mmfsck run), it does not know about any new corruptions that
are introduced because of existing inconsistencies in the file system. This means that it can only
perform a partial repair.Important: This might give the impression that file system is clean even if it is not.
- The --patch option cannot be used to repair certain types of
corruptions in system files. In some cases, you might have to run a full scan repair. This can be
determined by viewing the last record of the --patch-file that contains
the string need_full_fsck_scan:
- If it is false, the --patch option can be used.
- If it is true, the -y option must be used.
If you do plan to run read-only offline mmfsck and are not sure which approach to consider, use the --patch-file option. Once the patch file is generated, you can use it to repair the file system.
If you are repairing a file system because of node failure and if quotas are enabled in the file system, it is a good idea to run the mmcheckquota command to make sure that the quota accounting is consistent.
- An MMFS_FSSTRUCT along with an MMFS_SYSTEM_UNMOUNT error log entry on any node that indicates that some critical piece of the file system is inconsistent. For more information about error logs, see Operating system error logs.
- Disk media failures.
- Partial disk failure.
- EVALIDATE=214, which indicates that an invalid checksum or other consistency check failure either occurred on a disk data structure, or was reported in an error log, or was returned to an application.
For more information on recovery actions and how to contact the IBM Support Center, see the IBM Spectrum Scale: Problem Determination Guide.
If you are running the online mmfsck command to free allocated blocks that do not belong to any files, plan to repair the file system when system demand is low. File system repairs are I/O intensive and can affect system performance.
While the mmfsck command is working, you can run another instance of mmfsck with the --status-report parameter at any time to display a consolidated status report from all the nodes that are participating in the mmfsck run. For more information, see the --status-report parameter.
Results
If the file system is inconsistent, the mmfsck command displays information about the inconsistencies and, depending on the option that is entered, might prompt you for permission to repair them. The mmfsck command tries to avoid actions that might result in loss of data. However, in some cases it might report the destruction of a damaged file.
All corrective actions except recovering lost disk blocks (blocks that are marked as allocated but do not belong to any file) require that the file system be unmounted on all nodes. If the mmfsck command is run on a mounted file system, lost blocks are recovered but any other inconsistencies are only reported, not repaired.
If a bad disk is detected, the mmfsck command stops the disk and writes an entry to the error log. The operator must manually start and resume the disk when the problem is fixed.
The file system must be unmounted on all nodes before the mmfsck command can repair file system inconsistencies.
- CRITICAL
- The command found a critical corruption in the file system. Using the file system without repairing the corruption might cause more corruptions or file system panics.
- NONCRITICAL
- The command found a non-critical corruption in the file system. You can use the file system without repairing the corruption, but some metadata might not be accessible.
- HARMLESS
- The command found a harmless problem in the file system that indicates that some unused metadata can be freed to reclaim space.
Parameters
- Device
- The device name of the file system to be checked and repaired. File system names need not be
fully qualified. fs0 is as acceptable as
/dev/fs0.
This parameter must be the first parameter.
- -n
- Specifies a no response to all file system error repair prompts from
the mmfsck command. This option reports inconsistencies but it does not
change the file system. To save this information, redirect it to an output file when you issue the
mmfsck
command.Note: If the mmfsck command is run offline with the -n parameter and it detects errors, it panics the file system to force the file system to go through cleanup before any new command can be started.
- -y
- Specifies a yes response to all file system error repair prompts from the mmfsck command. Use this option only on severely damaged file systems. It allows the mmfsck command to take any action that is necessary for repairs.
- --patch
- Specifies that the file system will be repaired using the information stored in the patch file
that is specified with --patch-file
FileName.Note: Use of the --patch option causes the command to run only on the node where the command is executed as a single instance. Any information provided with the -N option is ignored.
- --patch-file FileName
- Specifies the name of a patch file. When the --patch parameter is not
specified, information about file system inconsistencies (detected during an
mmfsck run with the -n parameter) is stored in
the patch file that is specified by Path. Path
must be accessible from the file system manager node. The information that is stored in the patch
file can be viewed as a report of the problems in the file system. For more information about patch
files, see Checking and repairing a file system.
When this option is specified with the --patch parameter, the information in the patch file is read and used to repair the file system.
- -c
- If the file system log is lost and the file system is replicated, this option causes the mmfsck command to attempt corrective action by comparing the replicas of metadata and data. If this error condition occurs, it is indicated by an error log entry.
- -m
- Has the same meaning as -c, except that mmfsck checks only the metadata replica blocks. Therefore it runs faster than with -c.
- -o
- Runs the command in online mode. See the list of conditions that the command can detect and repair in online mode in the Description section earlier in this topic.
- --skip-inode-check
- Causes the command to run faster by skipping its inode-check phase. Include this option only if you know that the inodes are valid and that only directories need to be checked. In this mode, the product does not scan all parts of the file system and therefore might not detect all corruptions in the file system.
- --skip-directory-check
- Causes the command to run faster by skipping its directory-check phase. Include this option if you want to check only the inodes. In this mode, the product does not scan all parts of the file system and therefore might not detect all corruptions in the file system.
- -s
- Specifies that the output is semi-verbose.
- -v
- Specifies that the output is verbose.
- -V
- Specifies that the output is verbose and contains information for debugging purposes.
- -t TmpDirPath
- Specifies the directory that GPFS uses for temporary storage during mmfsck command processing. This directory must be available on all nodes that are participating in mmfsck and that are designated as either a manager or quorum node. In addition to the location requirement, the storage directory has a minimum space requirement of 4 GB. The default directory for mmfsck processing is /tmp.
- --threads Num
- The number of threads that are created to run mmfsck. The default is
16.
- --estimate-only
- Causes the command to display an estimate of the time that would be required to run the
mmfsck command in offline mode with the parameters that you are
specifying. To use this option, type the mmfsck command on the command
line with the parameters that you plan to use; include the --estimate-only
option; and press Enter. The command displays the time estimate and does not do a file system
scan.
This feature is available even while the target file system is mounted. The estimate is based on the parameters that you specify for the mmfsck command, on the characteristics of the target file system, and on the disk and network I/O throughput of the nodes that would participate in running the mmfsck command.
Note: To enable this feature, you must update all the nodes in the cluster to IBM Spectrum Scale 5.0.2 or later. - --use-stale-replica
- Specifies whether to read possible stale replica blocks from unrecovered disks. The default behavior is for offline fsck to not read replica blocks from disks that are in unrecovered state and with a lower failure-config-version than other blocks in the same replica set. This is because disks with a lower failure-config-version are likely to have stale versions of a block. In case the higher failure-config-version disk is damaged, the block read fails and fsck reports it as a data loss. In such situations, using this option overrides default offline fsck behavior and allows fsck to read possible stale replica blocks from unrecovered disks. This is useful if the data loss when using this option is found to be less than the default behavior. This can be determined by running read-only offline fsck twice, once without --use-stale-replica and once with --use-stale-replica. Then compare the number of corruptions reported in each case.
- --qos QOSClass
- Specifies the Quality of Service for I/O operations (QoS) class to which the instance of the command
is assigned. If you do not specify this parameter, the instance of the command is assigned by
default to the maintenance
QoS class. This parameter has no effect unless the QoS service is enabled. For more information, see the topic mmchqos command. Specify one of the following QoS classes:
- maintenance
- This QoS class is typically configured to have a smaller share of file system IOPS. Use this class for I/O-intensive, potentially long-running GPFS commands, so that they contribute less to reducing overall file system performance.
- other
- This QoS class is typically configured to have a larger share of file system IOPS. Use this class for administration commands that are not I/O-intensive.
- [-N {all | mount | Node[,Node...] | NodeFile | NodeClass}]
- Specifies the nodes that are to participate in the check and repair of the file system. This
command supports all defined node classes. The default is all or the
current value of the defaultHelperNodes parameter of the
mmchconfig command.
For information on how to specify node names, see Specifying nodes as input to GPFS commands.
- --status-report
- Displays a consolidated status report with information from all the nodes that are participating
in the scan of the file system. While a long-running instance of mmfsck is
running, you can run mmfsck with the --status-report
parameter to verify that the long-running instance is still working and to get the status. You can
issue this command from any node in the cluster, even if the node is not participating in the
mmfsck
run.Note: To enable this feature, you must update all the nodes in the cluster to IBM Spectrum Scale 5.0.0 or later.
Exit status
- 0
- Successful completion.
- 2
- The command was interrupted before it completed checks or repairs.
- 4
- The command changed the file system and it must now be restarted.
- 8
- The file system contains damage that was not repaired.
- 16
- The problem cannot be fixed.
- 64
- Do a full offline file system check to verify the integrity of the file system.
- The value of the Exit errno variable.
- An internal value that helps to explain the source of the value in the errno variable.
- The OR of several status bits.
Security
You must have root authority to run the mmfsck command.
The node on which the command is issued must be able to execute remote shell commands on any other node in the cluster without the use of a password and without producing any extraneous messages. For more information, see Requirements for administering a GPFS file system.
Examples
- The following command checks file system fs2 and displays inconsistencies but
does not try to make repairs:
The command displays output similar to the following example:mmfsck fs2 -vn
Checking "fs2" FsckFlags 0x2000009 Stripe group manager <c0n0> NeedNewLogs 0 ... Error in inode 38662 snap 0: has empty EA overflow block Delete EA overflow block? No ... Lost blocks were found. Correct the allocation map? No Block 1:332288 has map status 0x9FFFFF01 should be 0x9FFFFFFF Block 3:332288 has map status 0x9FFFFF01 should be 0x9FFFFFFF Checking inode map file Corrections are needed in the inode allocation map. Correct the allocation map? No Inode 131075 is not in use but marked as used (0) in map. 1 inodes are not in use but marked. Root inode 131075 of fileset 'fset1' has been deleted. Delete the inode reference from fileset metadata? No Checking ACL file records Starting Directory phase Checking directories and files ... Fileset 'fset1' with id 1 has corrupt record (reason 21) Correct the fileset record? No Fileset with id 2 is referenced in the file system but is not recorded in the fileset metadata file. Correct the metadata file? No ... Error in inode 33536 snap 0: Directory block 0 has entry whose filesetId does not match filesetId of directory file entry inode 33537 "a" Delete entry? No Error in inode 33536 snap 0: Directory block 0 has entry whose filesetId does not match filesetId of directory file entry inode 33538 "b" Delete entry? No Error in inode 33536 snap 0: Directory block 0 has entry whose filesetId does not match filesetId of directory file entry inode 33539 "c" Delete entry? No ... Error in inode 3 snap 0: Directory block 0 has entry referring to a deleted inode subdir entry inode 131075 "fset1" Delete entry? No Error in inode 3 snap 0: Directory block 0 has entry with invalid filesetId subdir entry inode 33536 "dir1" Delete entry? No Error in inode 3 snap 0: has nlink field as 5 Correct to 3? No ... Checking log files Checking extended attributes file Checking allocation summary file Checking policy file Validated policy '/*no policy rules*/ ': Checking metadata of filesets Inode space 1 does not have owning fileset. Make fileset 'fset1' (inode -1) owner of the inode space? No Root directory of fileset 'fset1' (inode -1) is invalid Repair fileset root directory? No Checking file reference counts Error in inode 33536 snap 0: has corrupt filesetId 2 Delete file? No Error in inode 33537 snap 0: is unreferenced Attach inode to lost+found of fileset root filesetId 0? No Error in inode 33538 snap 0: is unreferenced Attach inode to lost+found of fileset root filesetId 0? No Error in inode 33539 snap 0: is unreferenced Attach inode to lost+found of fileset root filesetId 0? No Error in inode 136448 snap 0: has corrupt filesetId 1 Delete file? No Error in inode 151296 snap 0: has corrupt filesetId 1 Delete file? No Checking file system replication status No. SnapId InodeNum FileType Fix Error(s) Severity ----- ---------- ------------- ------------------- --- ----------------------- ----------- 1 0 38662 User N InodeMetadata Harmless 2 0 33536 Directory N Fatal Noncritical + DirectoryEntry 3 0 3 Root Directory N InodeMetadata Noncritical + DirectoryEntry 4 0 38 Fileset Metadata N ReservedFileRecord Critical 5 0 33537 User N OrphanInode Noncritical 6 0 33538 User N OrphanInode Noncritical 7 0 33539 User N OrphanInode Noncritical 8 0 136448 Directory N Fatal Noncritical 9 0 151296 Directory N Fatal Noncritical 197120 inodes 59 allocated 3 repairable 0 repaired 3 damaged 0 deallocated 3 orphaned 0 attached 0 corrupt ACL references 4194304 subblocks 217682 allocated 14 unreferenced 0 duplicates 0 deletable 0 deallocated 1598 addresses 0 suspended 0 duplicates 0 reserved file holes found 0 reserved file holes repaired Critical corruptions were found. Using file system without repairing the corruptions may cause more corruptions and/or file system panics. File system contains unrepaired damage. Exit status 0:0:8. mmfsck: 6027-1639 Command failed. Examine previous error messages to determine cause.
- The following command checks file system fs2, displays inconsistencies, and
makes repairs:
The command displays output similar to the following example:mmfsck fs2 -vy
Checking "fs2" FsckFlags 0x400000A Stripe group manager <c0n0> NeedNewLogs 0 ... Error in inode 38662 snap 0: has empty EA overflow block Delete EA overflow block? Yes ... Lost blocks were found. Correct the allocation map? Yes Block 1:332288 has map status 0x9FFFFF01 should be 0x9FFFFFFF Block 3:332288 has map status 0x9FFFFF01 should be 0x9FFFFFFF Checking inode map file Corrections are needed in the inode allocation map. Correct the allocation map? Yes Inode 131075 is not in use but marked as used (0) in map. 1 inodes are not in use but marked. Root inode 131075 of fileset 'fset1' has been deleted. Delete the inode reference from fileset metadata? Yes Checking ACL file records Starting Directory phase Checking directories and files ... Fileset 'fset1' with id 1 has corrupt record (reason 21) Correct the fileset record? Yes Fileset with id 2 is referenced in the file system but is not recorded in the fileset metadata file. Correct the metadata file? Yes ... Error in inode 33536 snap 0: Directory block 0 has entry whose filesetId does not match filesetId of directory file entry inode 33537 "a" Delete entry? Yes Error in inode 33536 snap 0: Directory block 0 has entry whose filesetId does not match filesetId of directory file entry inode 33538 "b" Delete entry? Yes Error in inode 33536 snap 0: Directory block 0 has entry whose filesetId does not match filesetId of directory file entry inode 33539 "c" Delete entry? Yes ... Error in inode 3 snap 0: Directory block 0 has entry referring to a deleted inode subdir entry inode 131075 "fset1" Delete entry? Yes Error in inode 3 snap 0: Directory block 0 has entry whose filesetId does not match filesetId of directory subdir entry inode 33536 "dir1" Delete entry? Yes Error in inode 3 snap 0: has nlink field as 5 Correct to 3? Yes ... Checking log files Checking extended attributes file Checking allocation summary file Checking policy file Validated policy '/*no policy rules*/ ': Checking metadata of filesets Inode space 1 does not have owning fileset. Make fileset 'fset1' (inode -1) owner of the inode space? Yes Root directory of fileset 'Fileset2' (inode -1) is invalid Repair fileset root directory? Yes The number of filesets recorded in the fileset metadata file header (2) differs from the actual number (3). Correct the recorded number? Yes Checking file reference counts Error in inode 33536 snap 0: is unreferenced Attach inode to lost+found of fileset Fileset2 filesetId 2? Yes Error in inode 33537 snap 0: is unreferenced Attach inode to lost+found of fileset root filesetId 0? Yes Error in inode 33538 snap 0: is unreferenced Attach inode to lost+found of fileset root filesetId 0? Yes Error in inode 33539 snap 0: is unreferenced Attach inode to lost+found of fileset root filesetId 0? Yes Error in inode 136448 snap 0: is unreferenced Attach inode to lost+found of fileset fset1 filesetId 1? Yes Error in inode 151296 snap 0: is unreferenced Attach inode to lost+found of fileset fset1 filesetId 1? Yes Checking file system replication status No. SnapId InodeNum FileType Fix Error(s) Severity ----- ---------- ------------- ------------------- --- ----------------------- ----------- 1 0 38662 User Y InodeMetadata Harmless 2 0 33536 Directory Y DirectoryEntry Noncritical + OrphanInode 3 0 3 Root Directory Y InodeMetadata Noncritical + DirectoryEntry 4 0 38 Fileset Metadata Y ReservedFileRecord Critical 5 0 33537 User Y OrphanInode Noncritical 6 0 33538 User Y OrphanInode Noncritical 7 0 33539 User Y OrphanInode Noncritical 8 0 136448 Directory Y OrphanInode Noncritical 9 0 151296 Directory Y OrphanInode Noncritical 197120 inodes 61 allocated 4 repairable 4 repaired 0 damaged 0 deallocated 6 orphaned 6 attached 0 corrupt ACL references 4194304 subblocks 217682 allocated 14 unreferenced 0 duplicates 0 deletable 14 deallocated 1598 addresses 0 suspended 0 duplicates 0 reserved file holes found 0 reserved file holes repaired Critical corruptions were found in the file system which were repaired. File system is clean.
- The following command checks file system FSchk, displays inconsistencies, and
stores a record of each inconsistency in the patch file
path-towrite-patchfile:
The command displays output similar to the following example:mmfsck FSchk -nv --patch-file path-towrite-patchfile
Creating patch file "path-towrite-patchfile" on node "node3". Checking "FSchk" FsckFlags 0xA000009 Stripe group manager <c0n0> NeedNewLogs 0 ... Error in inode 50688 snap 0: Indirect block 0 level 1 has bad disk addr at offset 21 replica 1 addr 2:318976 is a duplicate address Delete disk address? No Cannot fix lost blocks if not deleting duplicate address. Error in inode 50688 snap 0: Indirect block 0 level 1 has bad disk addr at offset 20 replica 0 addr 2:318976 is a duplicate address Delete disk address? No Error in inode 50688 snap 0: has illReplicated field as 0 Correct to 1? No Error in inode 50688 snap 0: has nFullBlocks field as 800 Correct to 798? No Node 192.168.56.163 (node3) ending inode scan 0 to 32895 Error in inode 50689 snap 0: Indirect block 0 level 1 has bad disk addr at offset 40 replica 0 addr 1:371200 is a duplicate address Delete disk address? No Error in inode 50689 snap 0: has illReplicated field as 0 Correct to 1? No Error in inode 50689 snap 0: has nFullBlocks field as 800 Correct to 799? No Error in inode 50690 snap 0: Indirect block 0 level 1 has bad disk addr at offset 44 replica 0 addr 2:318976 is a duplicate address Delete disk address? No Error in inode 50690 snap 0: Indirect block 0 level 1 has bad disk addr at offset 792 replica 0 addr 1:371200 is a duplicate address Delete disk address? No Error in inode 50690 snap 0: has illReplicated field as 0 Correct to 1? No Error in inode 50690 snap 0: has nFullBlocks field as 800 Correct to 798? No ... Checking inode map file Checking ACL file records Starting Directory phase Checking directories and files ... Error in inode 50691 snap 0: Directory block 0 has entry with incorrect generation number subdir entry inode 50692 "subdir7" Delete entry? No Error in inode 50691 snap 0: Directory block 0 has entry with incorrect generation number subdir entry inode 13834 "subdir10" Delete entry? No Error in inode 50691 snap 0: has nlink field as 53 Correct to 51? No ... Error in inode 13831 snap 0: is unreferenced Attach inode to lost+found of fileset root filesetId 0? No Error in inode 13834 snap 0: is unreferenced Attach inode to lost+found of fileset root filesetId 0? No Checking file system replication status No. SnapId InodeNum FileType Fix Error(s) Severity ----- ---------- ------------- ------------------- --- ----------------------- ----------- 1 0 50688 User N InodeMetadata Critical + DuplicateDiskAddr 2 0 50689 User N InodeMetadata Critical + DuplicateDiskAddr 3 0 50690 User N InodeMetadata Critical + DuplicateDiskAddr 4 0 50691 Directory N InodeMetadata Noncritical + DirectoryEntry 5 0 13831 Directory N OrphanInode Noncritical 6 0 13834 Directory N OrphanInode Noncritical 65792 inodes 98 allocated 4 repairable 0 repaired 0 damaged 0 deallocated 2 orphaned 0 attached 0 corrupt ACL references 4194304 subblocks 286532 allocated 160 unreferenced 64 duplicates 0 deletable 0 deallocated 1598 addresses 0 suspended 5 duplicates 0 reserved file holes found 0 reserved file holes repaired Critical corruptions were found. Using file system without repairing the corruptions may cause more corruptions and/or file system panics. File system contains unrepaired damage. Exit status 0:0:8. Patch file written to "node3:path-towrite-patchfile" with 21 patch entries. mmfsck: 6027-1639 Command failed. Examine previous error messages to determine cause.
- The following command uses the information in patch file
path-towrite-patchfile to repair the file
system:
The command displays output similar to the following example:mmfsck FSchk -v --patch-file path-towrite-patchfile --patch
Checking "FSchk" FsckFlags 0x1C00000A Stripe group manager <c0n0> NeedNewLogs 0 ... Error in inode 50688 snap 0: Indirect block 0 level 1 has bad disk addr at offset 21 replica 1 addr 2:318976 is a duplicate address Delete disk address? Yes Error in inode 50688 snap 0: Indirect block 0 level 1 has bad disk addr at offset 20 replica 0 addr 2:318976 is a duplicate address Delete disk address? Yes Error in inode 50688 snap 0: has illReplicated field as 0 Correct to 1? Yes Error in inode 50688 snap 0: has nFullBlocks field as 800 Correct to 798? Yes Error in inode 50689 snap 0: Indirect block 0 level 1 has bad disk addr at offset 40 replica 0 addr 1:371200 is a duplicate address Delete disk address? Yes Error in inode 50689 snap 0: has illReplicated field as 0 Correct to 1? Yes Error in inode 50689 snap 0: has nFullBlocks field as 800 Correct to 799? Yes Error in inode 50690 snap 0: Indirect block 0 level 1 has bad disk addr at offset 44 replica 0 addr 2:318976 is a duplicate address Delete disk address? Yes Error in inode 50690 snap 0: Indirect block 0 level 1 has bad disk addr at offset 792 replica 0 addr 1:371200 is a duplicate address Delete disk address? Yes Error in inode 50690 snap 0: has illReplicated field as 0 Correct to 1? Yes Error in inode 50690 snap 0: has nFullBlocks field as 800 Correct to 798? Yes Lost blocks were found. Correct the allocation map? Yes Block 1:134144 has map status 0x00000000 should be 0xFFFFFFFF Block 3:134656 has map status 0x00000000 should be 0xFFFFFFFF Block 2:239104 has map status 0x00000000 should be 0xFFFFFFFF Block 2:318976 has map status 0x00000000 should be 0xFFFFFFFF Block 1:371200 has map status 0x00000000 should be 0xFFFFFFFF Error in inode 50691 snap 0: Directory block 0 has entry with incorrect generation number subdir entry inode 50692 "subdir7" Delete entry? Yes Error in inode 50691 snap 0: Directory block 0 has entry with incorrect generation number subdir entry inode 13834 "subdir10" Delete entry? Yes Error in inode 50691 snap 0: has nlink field as 53 Correct to 51? Yes 52 % complete on Tue Feb 21 13:34:53 2017 Scanning patch file for post-mount patches Error in inode 13831 snap 0: is unreferenced Attach inode to lost+found of fileset root filesetId 0? Yes Error in inode 13834 snap 0: is unreferenced Attach inode to lost+found of fileset root filesetId 0? Yes 100 % complete on Tue Feb 21 13:34:53 2017 No. SnapId InodeNum FileType Fix Error(s) Severity ----- ---------- ------------- ------------------- --- ----------------------- ----------- 1 0 50688 User Y InodeMetadata Critical + DuplicateDiskAddr 2 0 50689 User Y InodeMetadata Critical + DuplicateDiskAddr 3 0 50690 User Y InodeMetadata Critical + DuplicateDiskAddr 4 0 50691 Directory Y InodeMetadata Noncritical + DirectoryEntry 5 0 13831 Directory Y OrphanInode Noncritical 6 0 13834 Directory Y OrphanInode Noncritical Critical corruptions were found in the file system which were repaired. File system is patched.
- The following command checks file system fs1 in online mode, detects
corruptions in the block allocation map, and makes
repairs.
mmfsck fs1 -vy -o Checking "fs1" FsckFlags 0x400001A FsckFlags2 0x0 FsckFlags3 0x0 Stripe group manager <c0n0> Is offline fsck running 0 NeedNewLogs 0 ... InodeProblemList: 1 entries iNum snapId status keep delete noScan new error ------------- ---------- ------ ---- ------ ------ --- ------------------ 38 0 3 0 0 0 1 0x00000050 AddrCorrupt RepAddrCorrup Error in block allocation map file inode 38: AddrCorrupt RepAddrCorrup Inode 38 has one or more bad disk addresses. Invalidate bad addresses? Yes Inode 38 has one or more bad disk blocks. Invalidate bad blocks? Yes Block type IndBlock Address IndLvl IndBlock Index Problem Address Problem -------------- ----------------- ------ ------------ ----- ----------------- ------- Inode 0 7:10684416 Corrupt DA Corrections are needed in the block allocation map. Correct the allocation map? Yes Lost block 1:000131072 map status is: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 .... expected: 0x7FFFFFFFFFFFFFFF 0xFFFFFFFFFFFFFFFF 0xFFFFFFFFFFFFFFFF 0xFFFFFFFFFFFFFFFF .... Lost block 1:000139264 map status is: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 .... expected: 0xFFFFFFFFFFFFFFFF 0xFFFFFFFFFFFFFFFF 0xFFFFFFFFFFFFFFFF 0xFFFFFFFFFFFFFFFF .... ... InodeProblemList: 1 entries iNum snapId status keep delete noScan new error ------------- ---------- ------ ---- ------ ------ --- ------------------ 38 0 3 0 0 0 0 0x00000050 AddrCorrupt RepAddrCorrup ... 100 % complete on Tue Mar 12 17:52:14 2019 7864320 subblocks 217094 allocated 5233594 unreferenced 5233594 deallocated 331 addresses 0 suspended InodeProblemList: 1 entries iNum snapId status keep delete noScan new error ------------- ---------- ------ ---- ------ ------ --- ------------------ 38 0 3 0 0 0 0 0x00000050 AddrCorrupt RepAddrCorrup File system is clean. Fsck completed in 0 hours 0 minutes 13 seconds Exit status 0:10:0.