5.5.8 How to Add Additional JFS Logs

5.6 Troubleshooting File System Problems

This section will discuss some of the problems encountered while managing LVM and how to resolve them.

5.6.1 Recovering from Super Block Errors

If you receive one of the following errors from the fsck or mount commands, the problem may be a corrupted superblock.

fsck: Not an AIX3 file system
fsck: Not an AIXV3 file system
fsck: Not an AIX4 file system
fsck: Not an AIXV4 file system
fsck: Not a recognized file system type
mount: invalid argument

The problem can be resolved by restoring the backup of superblock over the primary superblock using one of the following commands.

dd count=1 bs=4k skip=31 seek=1 if=/dev/lv00 of=/dev/lv00

The following command works only for AIX 4.x.

fsck -p /dev/lv00

Once the restoration process is completed, check the integrity of the file system by issuing the fsck command.

fsck /dev/lv00

In many cases, restoration of the backup of superblock to the primary superblock will recover the file system. If this does not resolve the problem, recreate the file system, and restore the data from a backup.

5.6.2 Cannot Unmount File Systems

A file system cannot be unmounted if any references are still active within that file system and the following error message will be displayed.

Device busy

or

A device is already mounted or cannot be unmounted

The following situations can leave an open references to a mounted file system.

5.6.3 When the df Command Hangs

If the system hangs when you use the df command, the process described in this section may assist you.

Run the df command to check the file system. Note that the raven:/u2 entry at the bottom is a remote file system that is locally mounted.

# df
Filesystem    512-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           40960     19384   53%     1252    13% /
/dev/hd2          663552     13288   98%    13170    16% /usr
/dev/hd9var       401408    262528   35%    22288    45% /var
/dev/hd3           65536     35336   47%       70     1% /tmp
/dev/hd1          360448     19704   95%       98     1% /home
raven:/u2          16384         0  100%       18     1% /u2

If the remote system raven is down and you enter the df command, the following will be your response:

# df
Filesystem    512-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           40960     19384   53%     1252    13% /
/dev/hd2          663552     13288   98%    13170    16% /usr
/dev/hd9var       401408    262528   35%    22288    45% /var
/dev/hd3           65536     35336   47%       70     1% /tmp
/dev/hd1          360448     19704   95%       98     1% /home
NFS server raven not responding still trying

Break out of the error by pressing Ctrl-c.

Correct the problem with the remote system and once communication has been reestablished, you can run the df command to completion.

Some tips to check the remote system follow.

5.6.4 Deleting an Application File That Is Locked

In this section, you are trying to delete an application file that is locked. When you try to delete the file, you receive an error message telling you that it cannot be deleted because the file is locked.

If you get an error trying to delete the file /userdirectory/myfile enter:

# fuser /userdiectory/myfile
myfile:   104772

The number 104772 is the process ID (PID) of the file. To kill the process ID enter:

kill -9 104772

Now, to delete the file and free the disk space for use by the file system enter:

rm myfile

5.7 Summary of LVM Commands