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.
The following table describes how the gfsck utility
handles the objects based on the object size.
| Object Size | How gfsck handles the Object |
|---|---|
| Tiny objects | gfsck cannot re-construct tiny objects.
gfsck cannot repair tiny objects. |
| Small objects | gfsck can re-construct small objects. The
re-constructed object file name has the same name as that of the
original object file name. |
| Large objects | gfsck can re-construct large objects. The
re-constructed object file name differs from the original object
file name. The filename of the re-constructed large object is
large_objs_reconstruct_<fid>, where
fid denotes the file ID of the original
object. |
| Jumbo objects | gfsck can re-construct jumbo objects. The
re-constructed object file name differs from the original object
file name. The filename of the re-constructed jumbo object is
jumbo_objs_reconstruct_<fid>, where
fid denotes file ID of the original
object. |
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
fsckcommand on the storage pools or disks. -
Bring the storage pools back online by running the
mrconfig sp onlinecommand.For example:mrconfig sp online /dev/sdc -
Run the
gfsckcommand on the affected volumes, or snapshots, with the appropriate options.If there are alarms, such asDataUnavailableAlarmorDataUnderReplicatedAlarm, 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 thegfsckcommand with the--use-aux-memoryoption, you might encounter the following error in the gfsck.log file, when theauxDBTablesdirectory 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/auxDBTablesdirectory is missing.Resolution:Restart the warden service. Restarting the warden service creates the
auxDBTablesdirectory in the/var/maprdirectory.