Sunteți pe pagina 1din 3

Document ID: 249665

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".

Exact Error Message:


/usr/lib/vxvm/voladm.d/bin/disk.repl: test: argument expected

Details:
The problem described in this TechNote will occur if all below conditions coexist:

1. Running VxVM 3.5


2. Enclosure based format is used (not c#t#d# format)
3. Using vxdiskadm (option 5), "none" is selected when asked Choose a device, or
select "none"

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.

If "none" is not chosen then the problem does not occur.

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>

Select a removed or failed disk [<disk>,list,q,?] vvr3

The following devices are available as replacements:

Disk_1

You can choose one of these disks to replace vvr3.


Choose "none" to initialize another disk to replace vvr3.

Choose a device, or select "none"


[<device>,none,q,?] (default: Disk_1) none

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.

Select disk device to initialize [<address>,list,q,?] list

DEVICE DISK GROUP STATUS


Disk_0 vvr2 hrdg online
Disk_1 - - online
Disk_2 - - error
c0t0d0 rootdisk rootdg online reserved
c0t1d0 vvr1 hrdg online

Select disk device to initialize [<address>,list,q,?] Disk_2

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.

Continue with operation? [y,n,q,?] (default: y) y

Use a default private region length for the disk?


[y,n,q,?] (default: y) y
/usr/lib/vxvm/voladm.d/bin/disk.repl: test: argument expected

The disk replacement fails and vxdiskadm exits back to the main menu.

WORKAROUND

Modify /usr/lib/vxvm/voladm.d/bin/disk.repl and replace two lines.

Make a copy of /usr/lib/vxvm/voladm.d/bin/disk.repl:


# cp /usr/lib/vxvm/voladm.d/bin/disk.repl
/usr/lib/vxvm/voladm.d/bin/disk.repl.backup

Change this line from:


tmplen=´vxparms -s /dev/rdsk/$repldaname |grep STAT_DISKNUMSEC|awk -F"=" '{print
$2}'´

To:
tmplen=´vxparms -s /dev/vx/rdmp/$repldaname |grep STAT_DISKNUMSEC|awk -F"="
'{print $2}'´

Change this line from:


real_length_available=´vxparms -s /dev/rdsk/$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}'´

Save the file and re-run vxdiskadm.

An alternative workaround is to run vxdg and vxrecover to replace the disk, which
does the same thing as vxdiskadm (option 5).

Replace the disk using vxdg adddisk:


# vxdg -k -g hrdg adddisk vvr3=Disk_2

Recover any failed volumes:


# vxrecover -sb -g hrdg

Permanent Solution: The issue described in this TechNote is recorded in VERITAS


Incident 104979 and will be fixed in VxVM 3.5 Patch 01.

Supplemental Material:

System: Ref.# Description


iTools: 104979 getting error when replacing a failed disk that is under the
enclosure based name

Products Applied:
Volume Manager for UNIX/Linux 3.5 (Solaris)

Last Updated: August 13 2002 08:00 PM GMT


Expires on: 365 days from publish date
Subscribe Via E-Mail IconSubscribe to receive critical updates about this document

Subjects:
Volume Manager for UNIX/Linux
Application: Informational

Languages:
English (US)

Operating Systems:
Solaris

2.6, 7.0 (32-bit), 8.0 (32-bit), 9.0 (32-bit)

Symantec World Headquarters:


20330 Stevens Creek Blvd. Cupertino, CA 95014
World Wide Web: http://www.symantec.com,
Tech Support Web: http://entsupport.symantec.com,
E-Mail Support: http://seer.entsupport.symantec.com/email_forms,
FTP: ftp://ftp.entsupport.symantec.com or http://ftp.entsupport.symantec.com

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.

S-ar putea să vă placă și