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.
- Shut down your
system
(Root access required)
- Boot from your installation media.
- From the Welcome menu, choose the Maintenance option.
- From the Maintenance menu, choose the option
to access a volume group.
- Choose the rootvg volume group. A list of logical volumes that
belong to the volume group you selected is displayed.
- 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.
- To check / file system, type the following:
$ fsck -y /dev/hd4
The -y flag is
recommended for less experienced users (see the fsck command).
- To check the /usr file system, type the following:
- 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.
- When you have completed checking the file systems, reboot the system.