"V-2-128: number of links reached vx_maxlink for inode #### on filesystem" appears when changing vx_maxlink for Red Hat Enterprise Linux 6 and 7
Problem
The maximum number of subdirectories within a single directory is limited to 32767, or the value of the vx_maxlink tunable. When that maximum link is reached, the system starts to throw a V-2-128 error and stops writing to the file system.Error Message
vxfs: msgcnt #### mesg 128: V-2-128: number of links reached vx_maxlink for inode #### on filesystemCause
This error is usually caused when the maximum number of links has been reached and it cannot continue any further. By default, the vxfs filesystem has the maximum link set to 32767. When that value is reached, it stops writing and throws the error.Solution
To resolve the issue on Red Hat Enterprise Linux (RHEL) 6 or RHEL 7, perform the following steps on each node of the cluster:
1. Check your current vx_maxlink tunable value:
# cat /sys/module/vxfs/parameters/vx_maxlink
2. If the value is below 65534, then proceed with changing the vx_maxlink value:
# echo "options vxfs vx_maxlink=65534" > /etc/modprobe.d/vxfs.conf
3. After you have done the above step, a reboot is required:
# shutdown -r now
4. Once the server comes back up, confirm that the value has changed:
# cat /sys/module/vxfs/parameters/vx_maxlink
Version 6.1 of VxFS introduced Disk Layout Version (DLV) 10. With DLV 10, the vx_maxlink tunable is no longer required. Instead, a flag called maxlink may be set against the file system, either when the filesystem is made via mkfs or while the filesystem is mounted via fsadm. If the maxlink flag is set on the filesystem, the maximum number of links is increased to 4294967295 (2^32 -1).
By default maxlink is enabled.
To enable the maxlink
option at mkfs time:
# mkfs -t vxfs -o maxlink /dev/vx/rdsk/testdg/vol1
To disable the maxlink
option at mkfs time:
# mkfs -t vxfs -o nomaxlink /dev/vx/rdsk/testdg/vol1
To enable the maxlink
option through the fsadm command on a mounted file system:
# /opt/VRTS/bin/fsadm -t vxfs -o maxlink /mnt1
To disable the maxlink
option through the fsadm command on a mounted file system:
# /opt/VRTS/bin/fsadm -t vxfs -o nomaxlink /mnt1
To check the current setting on a mounted filesystem:
# /opt/VRTS/bin/fsadm -t vxfs /mnt1