Checking root and /usr file systems

To run the fsck command on / or /usr file system, you must shut down the system and reboot it from removable media because the / (root) and /usr file systems cannot be unmounted from a running system.

The following procedure describes how to run fsck on the / and /usr file systems from the maintenance shell.

  1. Shut down your system
    (Root access required)
  2. Boot from your installation media.
  3. From the Welcome menu, choose the Maintenance option.
  4. From the Maintenance menu, choose the option to access a volume group.
  5. Choose the rootvg volume group. A list of logical volumes that belong to the volume group you selected is displayed.
  6. Choose 2 to access the volume group and to start a shell before mounting file systems.
    In the following steps, you will run the fsck command using the appropriate options and file system device names. The fsck command checks the file system consistency and interactively repairs the file system. The / (root) file system device is /dev/hd4 and the /usr file system device is /dev/hd2.
  7. To check / file system, type the following:
    $ fsck -y /dev/hd4

    The -y flag is recommended for less experienced users (see the fsck command).

  8. To check the /usr file system, type the following:
    $ fsck -y /dev/hd2
  9. To check other file systems in the rootvg, type the fsck command with the appropriate device names. The device for /tmp is /dev/hd3, and the device for /var is /dev/hd9var.
  10. When you have completed checking the file systems, reboot the system.