System Administration Guide: Basic Administration

How to See If a File System Needs Checking

  1. Become superuser or assume an equivalent role.

  2. Unmount the file system if it is mounted.

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

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

    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 the /etc/vfstab file 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