[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]
AIX Version 4.3 System Management Guide: Operating System and Devices
Verifying File Systems
File system inconsistencies can stem from the
following:
- Stopping the system with file systems
mounted.
- Physical disk deterioration or damage. This
procedure should be used before mounting any file system.
You can use the Web-based System Manager fast path wsm fs to check file
systems for inconsistencies or you can use one of the following procedures.
Among the many reasons to verify file systems
are the following:
- After a malfunction. For example, if a user
cannot change directories to a directory that has that user's permissions
(uid).
- Prior to backing up file systems to prevent
errors and possible restoration problems.
- At installation or system boot to make sure
there are no operating system file errors.
Prerequisites
- An understanding of the fsck
command
- Unmount the file systems being checked, except
for / (root) and /usr, or the fsck command will fail.
- Check the / and /usr file systems
only from the maintenance shell (see
"Check a File System"
).
- You must have write permission on files, or
fsck will not repair them (even if you answer yes to repair
prompts).
Check a User File System
- Use the smit fsck fast path to
access the Verify a File System menu.
- Specify the name of an individual file system
to check in the NAME of file system field.
OR
Proceed to the TYPE of file system field and
select a general file system type to check, such as a journaled file system
(JFS).
- If you want a fast check, specify yes in
the FAST check? field. The fast-check option specifies that the fsck command checks only those file systems that are likely to have
inconsistencies. The most likely candidates are the file systems that were
mounted when the system stopped at some point in the past. This option
dramatically reduces the number of files that need checking.
- Specify in the SCRATCH file field the name of a
temporary file on a file system not being checked.
- Start the file system check.
Check a File System
The fsck command
requires that target file systems be unmounted. In general, the / (root)
and /usr file systems cannot be unmounted from a disk-booted system. If
the fsck command is to be run on / or /usr, then the system
must be shut down and rebooted from removable media. This procedure describes
how to run fsck on the / and /usr file systems from the
maintenance shell.
- With the key mode switch in the Service
position, boot from your installation media.
- From the Installation menu, choose the
Maintenance option.
- From the Maintenance menu, choose the option
to access a volume group.
Note: Once you choose this
option, you cannot return to the Installation menu or Maintenance menu without
rebooting the system.
- Choose the volume group you believe is the
rootvg volume group. A list of logical volumes that belong to the volume group
you selected will be displayed.
- If this list confirms that this is the rootvg
volume group, choose 2 to access the volume group and to start a shell
before mounting file systems. If not, choose 99 to display a list of
volume groups and return to step 4.
- 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's device is /dev/hd4 and the /usr file
system's device is /dev/hd2. To check /, enter the following:
$ fsck -y /dev/hd4
The -y flag is recommended for less experienced users (see the
fsck command).
You may also want to check the /tmp and
/var file systems at this time. The device for /tmp is
/dev/hd3, and the device for /var is /dev/hd9var.
- When you have completed checking the file
systems, turn the key to Normal and reboot the system.
[ Previous |
Next |
Contents |
Glossary |
Home |
Search ]