Using Global File System Checking
Describes how to use the gfsck
command to check and repair file
system errors.
About this task
You can use the gfsck
(global file system check)
command to perform a consistency check and repair operation on a volume or volume
snapshot, including the following entities:
- All cross-container links (for example, from file to filelet, or from table to tablets)
- The tabletmap key range
- The attributes of filelet (uid/gid/mode)
This command identifies the unreachable files, directories, and tables in the volume, and moves them to /lost+found to be repaired. It also identifies and fixes any unreachable DB inodes or dangling pointers to lost inodes.
Procedure
-
Take the affected storage pools offline by running the mrconfig sp offline
command.
For example:
/opt/mapr/server/mrconfig sp offline /dev/sdc
-
Execute the
fsck
command on the storage pools or disks. -
Bring the storage pools back online by running the
mrconfig sp online
command.For example:mrconfig sp online /dev/sdc
-
Run the
gfsck
command on the affected volumes, or snapshots, with the appropriate options.If there are alarms, such asDataUnavailableAlarm
orDataUnderReplicatedAlarm
, do not run the gfsck command with the-r
(--repair
) option. Running the gfsck command with the-r
(--repair
) option, might result in data loss. If necessary, first run gfsck without the-r
(--repair
) option, and attempt to repair only after analyzing the command output.Troubleshooting
While running thegfsck
command with the--use-aux-memory
option, you might encounter the following error in the gfsck.log file, when theauxDBTables
directory is missing or has been removed accidentally:ERROR com.mapr.fs.globalfsck.GlobalFsck createLargeObjectTable [main]: AuxDb volume mapr.gfsck does not exist.
Cause: The
/var/mapr/auxDBTables
directory is missing.Resolution:Restart the warden service. Restarting the warden service creates the
auxDBTables
directory in the/var/mapr
directory.