Replacing A Failed or Removed Disk Via Vxdiskadm (Option 5) May Fail With "Test: Argument Expected".
Replacing A Failed or Removed Disk Via Vxdiskadm (Option 5) May Fail With "Test: Argument Expected".
http://support.veritas.com/docs/249665
In VERITAS Volume Manager (VxVM) 3.5, replacing a failed or removed disk via
vxdiskadm (option 5) may fail with "test: argument expected".
Details:
The problem described in this TechNote will occur if all below conditions coexist:
If enclosure based format is used, then vxdisk list will return devices as (for
example) Disk_0 and Disk_1, rather than c#t#d#s2.
EXAMPLE
In the example below, there is a failed disk which was removed using vxdiskadm
(option 4). The failed disk was also physically replaced with a new disk. Now the
failed disk can be replaced with a new disk using vxdiskadm (option 5).
# vxdisk list
DEVICE TYPE DISK GROUP STATUS
Disk_0 sliced vvr2 hrdg online
Disk_1 sliced - - online
Disk_2 sliced - - error
c0t0d0s2 sliced rootdisk rootdg online reserved
c0t1d0s2 sliced vvr1 hrdg online
- - vvr3 hrdg removed was:Disk_2
VxVM disk "vvr3" has failed and "Disk_2" will be used as a replacement disk.
# vxdiskadm
<snip>
Disk_1
Above, it can be seen that Disk_2 is not shown, but Disk_2 is to be used as a
replacement disk. You may see this if the new disk is in "error" state or has a
different disk layout. In order to select the disk that is not shown, it is
necessary to type "none" and after this, it is possible to select any free disk.
The requested operation is to initialize disk device Disk_2 and to then use that
device to replace the removed or failed disk vvr3 in disk group hrdg.
The disk replacement fails and vxdiskadm exits back to the main menu.
WORKAROUND
To:
tmplen=´vxparms -s /dev/vx/rdmp/$repldaname |grep STAT_DISKNUMSEC|awk -F"="
'{print $2}'´
To:
real_length_available=´vxparms -s /dev//vx/rdmp/$repldaname |grep STAT_DISKNUMSEC|
awk -F"=" '{print $2}'´
An alternative workaround is to run vxdg and vxrecover to replace the disk, which
does the same thing as vxdiskadm (option 5).
Supplemental Material:
Products Applied:
Volume Manager for UNIX/Linux 3.5 (Solaris)
Subjects:
Volume Manager for UNIX/Linux
Application: Informational
Languages:
English (US)
Operating Systems:
Solaris
THE INFORMATION PROVIDED IN THE SYMANTEC SOFTWARE KNOWLEDGE BASE IS PROVIDED "AS
IS" WITHOUT WARRANTY OF ANY KIND. SYMANTEC SOFTWARE DISCLAIMS ALL WARRANTIES,
EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SYMANTEC SOFTWARE OR ITS SUPPLIERS BE
LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL,
CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES,EVEN IF SYMANTEC
SOFTWARE OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR
CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.