System Administration Guide, Volume 1

How to See If a File System Needs Checking

  1. Become superuser.

  2. Unmount the file system if it is mounted.

    # umount /mount-point
  3. Check the file system.

    # fsck -m /dev/rdsk/device-name

    In this command, the state flag in the superblock of the file system you specify is checked to see whether the file system is clean or requires checking.

    If you omit the device argument, all the UFS file systems listed in /etc/vfstab with a fsck pass value greater than 0 are checked.

Example--Seeing If a File System Needs Checking

The following example shows that the file system needs checking.

# fsck -m /dev/rdsk/c0t0d0s6
** /dev/rdsk/c0t0d0s6
ufs fsck: sanity check: /dev/rdsk/c0t0d0s6 needs checking