For new information about fsck in the Solaris 10 6/06 release, see Enhancements to UFS File System Utilities (fsck, mkfs, and newfs). There is no need to rerun fsck if you see the following message:
***** FILE SYSTEM WAS MODIFIED *****
However, it doesn't harm the file system to rerun fsck after this message. This message is just informational about fsck's corrective actions.
This procedure assumes that the file system to be checked is unmounted.
For information on restoring a bad superblock, see How to Restore a Bad Superblock (Solaris 10 6/06 Release) or How to Restore a Bad Superblock (Solaris 8, 9, and 10 Releases).
Become superuser or assume an equivalent role.
Unmount the local file system to ensure that there is no activity on the file system.
Specify the mount point directory or /dev/dsk/device-name as arguments to the fsck command. Any inconsistency messages are displayed.
# umount /export/home # fsck /dev/rdsk/c0t0d0s7 ** /dev/dsk/c0t0d0s7 ** Last Mounted on /export/home . . .
Correct any reported fsck errors.
For information on how to respond to the error message prompts while you interactively check one or more UFS file systems, see Chapter 20, Resolving UFS File System Inconsistencies (Tasks), in System Administration Guide: Advanced Administration.
If fsck cannot repair all of the problems after running it, see Fixing a UFS File System That the fsck Command Cannot Repair.
Mount the repaired file system to determine if there are any files in the lost+found directory.
Individual files put in the lost+found directory by the fsck command are renamed with their inode numbers.
Rename and move any files put in the lost+found directory.
If possible, rename the files and move them where they belong. Try to use the grep command to match phrases within individual files and the file command to identify file types.
Eventually, remove unidentifiable files or directories left in the lost+found directory so that it doesn't fill up unnecessarily.
The following example shows how to check the /dev/rdsk/c0t0d0s6 file system and correct the incorrect block count. This example assumes that the file system is unmounted.
# fsck /dev/rdsk/c0t0d0s6 ** Phase 1 - Check Block and Sizes INCORRECT BLOCK COUNT I=2529 (6 should be 2) CORRECT? y ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Cylinder Groups 929 files, 8928 used, 2851 free (75 frags, 347 blocks, 0.6% fragmentation) ***** FILE SYSTEM WAS MODIFIED ***** #