Veritas Volume Manager 5.1 SP1 RP1 P1 (Linux) introduces persistent device exclusion following LUN reconfiguration events

book

Article ID: 100004571

calendar_today

Updated On:

Resolution

 

Enforced sd instance exclusion with udevtrigger in 5.1 SP1 RP1 P1

   

The mappings created by the udev-rule are lost during the execution of the make_devices function of the vxvm-startup script, where /dev/vx is mounted on tmpfs. As a result, during discovery, vxconfigd will not be able to determine the hardware path for the excluded devices and hence the exclusion does not work.


Therefore the /etc/vx/vxvm-startup script was modified to call "udevtrigger" before vxconfigd starts.

 

 

make_devices()
{
        #
        # create devices needed under /dev/vx
        # Handle special-case for selinux enabled systems
        #
        [ -d /dev/vx ] || /bin/mkdir -m 0755 -p /dev/vx
        [ -x /usr/sbin/selinuxenabled ] && selinuxenabled || {
                # Make /dev/vx available on tmpfs
                /bin/mount -t tmpfs -o size=4k,nr_inodes=2097152,mode=0755
                        tmpfs /dev/vx
        }
       /sbin/udevtrigger                               <<<< added this new line entry
        /bin/mkdir -m 0755 /dev/vx/dmp 2>/dev/null
        /bin/ln -s /dev/vx/dmp /dev/vx/rdmp 2>/dev/null
        /bin/mknod /dev/vx/config c $VXVM_MAJOR_NUMBER 0 2>/dev/null
        /bin/mknod /dev/vx/trace c $VXVM_MAJOR_NUMBER 1 2>/dev/null
        /bin/mknod /dev/vx/iod c $VXVM_MAJOR_NUMBER 2 2>/dev/null
        /bin/mknod -m 646 /dev/vx/info c $VXVM_MAJOR_NUMBER 3 2>/dev/null
        /bin/mknod /dev/vx/task c $VXVM_MAJOR_NUMBER 4 2>/dev/null
        /bin/mknod /dev/vx/taskmon c $VXVM_MAJOR_NUMBER 5 2>/dev/null
        /bin/mknod /dev/vx/clust c $VXVM_MAJOR_NUMBER 6 2>/dev/null
        /bin/mknod /dev/vx/netiod c $VXVM_MAJOR_NUMBER 7 2>/dev/null
        /bin/mknod /dev/vx/vcevent c $VXVM_MAJOR_NUMBER 8 2>/dev/null
        /bin/mknod /dev/vx/esd c $VXVM_MAJOR_NUMBER 9 2>/dev/null
        /bin/mknod /dev/vx/vsevent c $VXVM_MAJOR_NUMBER 10 2>/dev/null
        /bin/mknod /dev/vx/dmpconfig b $VXDMP_MAJOR_NUMBER 1048575 2> /dev/null
}

 

 

Enhanced "udev" rules file with 5.1 SP1 RP1 P1

   

The 5.1 SP1 RP1 udev rules file looks like:

 

ACTION=="remove|add", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", ENV{DEVTYPE.EN_US}=="disk", RUN+="/lib/udev/vxvm-udev.sh $env{ACTION.EN_US} $env{MAJOR.EN_US}:$env{MINOR.EN_US}
 $name"

 

KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", RUN+="/lib/udev/vxpath_links %k"   <<<< populates the modified /etc/vx/vxvm.exclude file contents.
# Do not create nodes for VERITAS VxVM devices
KERNEL=="Vx*", OPTIONS="ignore_device"
KERNEL=="dmpconfig", OPTIONS="ignore_device"

 

 

As a result of another known issue we decided to implement the following 40-VxVM.rules file from /etc/udev/rules.d as per Etrack 2210625.

 

 

# more 40-VxVM.rules
ACTION=="remove|add", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", RUN+="/lib/udev/vxvm-udev.sh $env{ACTION.EN_US} $env{MAJOR.EN_US}:$env{MINOR.EN_US} %k"

# Do not create nodes for VERITAS VxVM devices
KERNEL=="Vx*", OPTIONS="ignore_device"
KERNEL=="dmpconfig", OPTIONS="ignore_device"

 

Note: We removed ENV{DEVTYPE.EN_US}=="disk" and replaced $name with %k

 

The above modified rules file was for:
Etrack  2210625 (2234821)  DMP can't detect the re-enabled os device status" does not work on RHEL5.

   

Note: To combine the enhancements for both etracks, the 40-VxVM.rules file must have the following critical line entry:

 

KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", RUN+="/lib/udev/vxpath_links %k"

 

Final version scheduled for 5.1 SP1 RP1 P1 is as follows:

 

# more 40-VxVM.rules
ACTION=="remove|add", KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", RUN+="/lib/udev/vxvm-udev.sh $env{ACTION.EN_US} $env{MAJOR.EN_US}:$env{MINOR.EN_US} %k"
 
KERNEL=="sd*[!0-9]", SUBSYSTEM=="block", RUN+="/lib/udev/vxpath_links %k"
# Do not create nodes for VERITAS VxVM devices
KERNEL=="Vx*", OPTIONS="ignore_device"
KERNEL=="dmpconfig", OPTIONS="ignore_device"
 

Without the "vxpath_links" line entry, the /etc/vx/vxvm.exclude will not be populated with the extended hardware device content to track potential sd instance movements.
 

Sample output
 

Veritas disk access name "emc0_0288" is excluded from VxVM's view.
 

# more /etc/vx/vxvm.exclude
exclude_all 0
paths
sdbm pci-0000:02:05.0-fc-0x5006048c5368e5af:0x0107000000000000 emc0_0288
sdas pci-0000:02:05.0-fc-0x5006048c5368e58f:0x011a000000000000 emc0_0288
#
controllers
#
product
#
pathgroups
#


Applies To

Linux

Issue/Introduction

Veritas Volume Manager 5.1 SP1 RP1 (Linux) introduces persistent device exclusion following LUN reconfiguration events.

Additional Information

ETrack: 2241750