VCS SRDF resource fails to come online because the agent issues incorrect vxdisk rm command
book
Article ID: 100031689
calendar_today
Updated On:
Description
Error Message
The following warning message is logged in the SRDF agent log (/var/VRTSvcs/log/SRDF_A.log).
2015/11/29 10:54:35 VCS WARNING V-16-20017-88 SRDF:prodsystem:online:vxdisk removal command [vxdisk rmhdiskpower68 ] failed with error code: [256], o/p: []
In a SFCFS enivironment, the following error messages are logged in the VCS engine log (/var/VRTSvcs/log/engine_A.log) by the CVMVolDg action entry point "import".
2015/11/29 10:58:11 VCS INFO V-16-2-13716 Thread(1029) Resource(datadg): Output of the completed operation (online)
==============================================
VxVM vxdg ERROR V-5-1-10978 Disk group proddatadg: import failed:
SCSI-3 PR operation failed
VxVM vxdg ERROR V-5-1-10978 Disk group proddatadg: import failed:
SCSI-3 PR operation failed
VxVM vxdg ERROR V-5-1-10978 Disk group proddatadg: import failed:
SCSI-3 PR operation failed
==============================================
Cause
This issue is caused by a bug in the SRDFAgent.pm perl module, where delete_vm_disks subroutine, the SRDF agent tries to construct the "vxdisk rm" command to remove the VxVM disk access record from the system. When there are many disks to be removed, the agent will need to restrict the command to less than 255 characters. When the "vxdisk rm" command reaches 255 characters, the agent will execute the command for this batch of disk access names, then construct a new command for the rest of the disks. Due to the bug in the perl module, the second and subsequent commands are constructed incorrectly as "vxdisk rm
Solution
This issue will be fixed in the next VCS Agent Pack 4Q2015 release and can be downloaded from
below link
https://sort.veritas.com/agents
WORKDAROUND:
For time being modify the /opt/VRTS/bin/SRDFAgent.pm script manually as below for workaround.
Edit the SRDF Agent Perl Module file /opt/VRTSvcs/bin/SRDFAgent.pm and
modify the perl statement $cmd = "vxdisk rm"; to $cmd = "$VXDISK rm ";.
# vi /opt/VRTSvcs/bin/SRDFAgent.pm
# Delete the vmdisks corresponding to the disks in the SRDF group.
sub delete_vm_disks
{
.....
my ($buf_len, $i, $op) = (256, 0);
my $cmd = "$VXDISK rm "; # This one is correct
my $cmd_len = length($cmd);
my $num_disks = $#vxdisks + 1;
while ($i < $num_disks) {
my $dn_l = length($vxdisks[$i]) + 1;
if (($cmd_len + $dn_l) <= $buf_len) {
........
} else {
my $ret = run_cmd($cmd, \$op, 1, $func);
if ($ret) {
VCSAG_LOG_MSG("W", "vxdisk removal command [$cmd] failed with error code: [$ret], o/p: [$op]", 88, "$cmd", "$ret", "$op");
}
# $cmd = "vxdisk rm"; # <=BUG - missing a space at the end
$cmd = "$VXDISK rm " #<= need to have a space at the end
$cmd_len = length($cmd);
}
}
VCSAG_LOGDBG_MSG(1, "$func() Exiting.");
}
Resolution
This issue will be fixed in the next VCS Agent Pack 4Q2015 release and can be downloaded from
below link
https://sort.veritas.com/agents
WORKDAROUND:
For time being modify the /opt/VRTS/bin/SRDFAgent.pm script manually as below for workaround.
Edit the SRDF Agent Perl Module file /opt/VRTSvcs/bin/SRDFAgent.pm and
modify the perl statement $cmd = "vxdisk rm"; to $cmd = "$VXDISK rm ";.
# vi /opt/VRTSvcs/bin/SRDFAgent.pm
# Delete the vmdisks corresponding to the disks in the SRDF group.
sub delete_vm_disks
{
.....
my ($buf_len, $i, $op) = (256, 0);
my $cmd = "$VXDISK rm "; # This one is correct
my $cmd_len = length($cmd);
my $num_disks = $#vxdisks + 1;
while ($i < $num_disks) {
my $dn_l = length($vxdisks[$i]) + 1;
if (($cmd_len + $dn_l) <= $buf_len) {
........
} else {
my $ret = run_cmd($cmd, \$op, 1, $func);
if ($ret) {
VCSAG_LOG_MSG("W", "vxdisk removal command [$cmd] failed with error code: [$ret], o/p: [$op]", 88, "$cmd", "$ret", "$op");
}
# $cmd = "vxdisk rm"; # <=BUG - missing a space at the end
$cmd = "$VXDISK rm " #<= need to have a space at the end
$cmd_len = length($cmd);
}
}
VCSAG_LOGDBG_MSG(1, "$func() Exiting.");
}
Issue/Introduction
VCS SRDF resource fails to online, because the agent issues incorrect "vxdisk rm" command. If there are lot of disks in the EMC SRDF device group, the VCS SRDF agent may issue "vxdisk rm" incorrectly as "vxdisk rm<disk access name>".
For example, instead of issuing
vxdisk rm hdiskpower68
the agent would issue
vxdisk rmhdiskpower68
The space between "rm" and the VxvM disk access name is missing.
Additional Information
ETrack: 3862183
Was this article helpful?
thumb_up
Yes
thumb_down
No