Skip to content

maximizing data integrity

maximizing filesystem consistency

Warning

Fsck should not be used with mounted storage devices1 and, even when used correctly, may cause data loss.

Note

/foo/bar represents the path of the relevant storage device.

Use df -T to get filesystem information about mounted storage devices. Find the path of the relevant storage device, for example /foo/bar. Create a backup archive file of the files stored on the device and, if enough storage space is available, also create a backup disk image with TestDisk. Use sudo umount /foo/bar to unmount the storage device. Use sudo fsck -fv /foo/bar to run fsck interactively, and answer any resulting prompts. Fsck may create a file with the .REC extension on the relevant storage device.

prior work

The method of unmounting a storage device with umount was introduced to me by an answer on Unix & Linux Stack Exchange by student.

licensing

No rights reserved: CC0 1.0.