"primary-ilist inode 32768 has invalid caching mode/flag set (0x000000ff)" is reported by the VxFS file system check (fsck)

book

Article ID: 100033826

calendar_today

Updated On:

Description

Error Message

pass1 - checking inode sanity and blocks
fileset 999 primary-ilist inode 32768 has invalid caching mode/flag set (0x000000ff)
fileset 999 primary-ilist inode 32768 failed validation clear? (ynq)



Cause

The fsck utility of VxFS version 6.1, and above, is incompatible with file systems that have partitioned directories that are created by VxFS versions 5.1 and 6.0. To determine if Partitioned Directory is enabled, you can check the vxtunefs output for a mounted file system.
 
# vxtunefs  "mountpoint"  | grep pdir
pdir_enable = 1
pdir_threshold = 32768

 

Check the tunefstab to determine if the Partitioned Directoryis enabled in the /etc/vx/tunefstab file.
 
# cat /etc/vx/tunefstab
/dev/vx/dsk/cvmdg/cvol01        pdir_enable=1


If the Partitioned Directory was enabled in the past, some directories may still have the Partitioned Directory enabled now, even though that feature was later disabled. To determine if any directories have Partitioned Directory enabled, use the fsdb utility to inspect those directories. One way is to find the directories which have a size bigger than the vxtunefs parameter "pdir_threshold" which is in bytes. The "find" command has an option "-size" to search for files or directories that are bigger than a certain size and is specified in 512-byte blocks. So if the pdir_threshold is 32768, then the size specified to find "-size" will be 32768 / 512 which is 64. 


Example:
 
# find /cvol01 -type d -size +63 -ls
  1037   32 drwxr-xr-x   2 root     root        32768 Mar 29 13:46 /cvol01/manyfiles


The first column in the output ("1037" in the above example) is the inode number.

Use the fsdb command to inspect the directory inode.
 
rhel7vm10# echo '999fset.1037i' | /opt/VRTS/bin/fsdb /dev/vx/rdsk/cvmdg/cvol01
inode structure at 0x0004017b.0100
type IFDIR mode 40755  nlink 130  uid 0  gid 0  size 32768
......
pdmode 2  rdev/reserve/dotdot/matchino 2            <<< pdmode 2
.....
 

If the pdmode is anything other than "0," the directory is a partitioned directory.
  • In VxFS 5.1 and 6.0, the Partitioned Directory feature sets the Partitioned Directory (PDIR) "Number of Links" attribute to "-1" (0xffffffff).   
  • In VxFS 6.1 and above, this PDIR Number of Links attribute is obsolete and ignored by the VxFS kernel driver.  
  • In VxFS 6.1 and above, the Smart I/O feature introduced a Cache Mode attribute for the inodes. As a space optimization, this Cache Mode attribute overlaps the original data used by the PDIR Number of Links attribute. Because of an incompatibility of these two features, the now obsolete PDIR Number of Links attribute is incorrectly recognized as the Cache Mode attribute by the VXFS 6.1 (or above) fsck utility. Since the value 0xff is an invalid value for the Cache Mode attribute, fsck reports the error.

There is another problem where the file system may be disabled if the file system is upgraded from Disk Layout Version (DLV) 8 or 9, to DLV 10, on VxFS version 6.1, or above. This is because the VxFS 6.1 kernel driver tries to access the Cache Mode attribute of a DLV 10 file system and finds it as invalid and disable the file system with the following error messages.
 
Feb  5 08:37:54 systemA vxfs: [ID 702911 kern.warning] WARNING: msgcnt 56 mesg 096: V-2-96: vx_setfsflags - /dev/vx/dsk/datadg/datavol file system fullfsck flag set - vx_ierror        <<< vx_ierror, inode error
Feb  5 08:37:56 systemA vxfs: [ID 702911 kern.warning] WARNING: msgcnt 57 mesg 017: V-2-17: vx_wb_io_allowed - /datavol file system inode 12037 marked bad incore
Feb  5 08:39:22 systemA vxfs: [ID 702911 kern.warning] WARNING: msgcnt 58 mesg 136: V-2-136: vx_force_unmount - /dev/vx/dsk/datadg/datavol file system has been force unmounted


This issue only affects file systems which meet ALL of the following conditions:
  • The file system has Partitioned Directory enabled when running VcFS version 5.1 and 6.0.
  • The VxFS version is then upgraded from version 5.1 and 6.0, to 6.1, or above.
  • The file system is then upgraded from DLV 8 or 9, to DLV 10, on VxFS 6.1, or above.

This issue does not affect:
  • File systems that do not have Partitioned Directory enabled
  • File systems with DLV 8 or 9  
  • VxFS version 5.1 and 6.0

Resolution

Veritas is currently working on a fix for this issue.

Before the fix is available and applied:
  • If you have file systems with Partitioned Directory enabled, please do not upgrade VxFS from 5.1 or 6.0, to 6.1, or above.
  • If you have file systems with Partitioned Directory enabled in VxFS 5.1 or 6.0, and if you have upgraded to VxFS 6.1 or above, please don't run a full fsck on those file systems until the fix is applied. If any of those file systems are corrupted and require a full fsck, please contact Veritas Technical Support. The invalid camode attributes will need to be cleared manually.

Issue/Introduction

Veritas File System (VxFS) file system check (fsck) reports invalid caching mode/flag set.