User Tools

Site Tools


aix:lvm_corruption

LVM corruption

Mount error

mount: invalid argument on AIX or VIOS Troubleshooting

Problem Unable to mount a file system to due invalid argument error.

  Example:
  # mount /home/guest
  mount: /dev/testlv on /home/guest: Invalid argument 

Symptom Although that there are stanzas found in file systems file, but they don't match the values in LVCB of the logical volume, it reports an error and prevent mounting the file system.

Cause Incorrect file system attribute values in file systems file compared with the data found in LVCB.

Environment Any version of AIX or VIOS.

Diagnosing The Problem Verify file system stanza values against those values contained in the Logical Volume Control Block.

To check stanzas of a logical volume in the file systems file.

  # cat /etc/filesystems |grep -p <lvname>

To get the values of LVCB of a logical volume.

  # getlvcb -AT <lvname>

Resolving The Problem Make a backup of /etc/filesystems file prior modifying any stanzas of a logical volume, then there are 2 options to fix this issue:

  The first option is: to edit out the stanzas of the file systems file then once edited, apply the following commands.
      # varyoffvg <vg name>
      # exportvg <vg name>
      # importvg -y <vg name> <pv name>  
  Importing the VG repopulates the stanza in the file systems file with the correct information from the LVCB.
  The second option is: the imfs command is used to repopulate the stanza for an individual LV, but the stanzas need to be removed first from file systems file as shown. This option doesn't require to use varyoffvg command:
   
      # imfs -xl <lv name>
  (To remove file system data from file systems file related only to this LV)
   
      # cat /etc/filesystems |grep -p <lv name>
  (To check stanzas are removed, nothing is displayed in the output)
   
      # imfs -l <lv name>
  (To repopulate the stanzas in file systems file with the correct information from the LVCB)
   
      # cat /etc/filesystems |grep -p <lv name>
  (To check that the stanzas are repopulated)

Then, verify mounting the file system to check whether it works correctly.

aix/lvm_corruption.txt · Last modified: 2024/01/15 23:06 by manu