Sponsored Content
Special Forums UNIX and Linux Applications Veritas silent disk group creation Post 302384252 by jm6601 on Monday 4th of January 2010 03:09:58 PM
Old 01-04-2010
Veritas silent disk group creation

I am trying to write a kornshell script that will automatically create veritas disk groups. However, the only utility that I can find that will create the diskgroup is vxdiskadd, which prompts with interactive questions. I've tried to pass the answers through to vxdiskadd, but I receive the following errors. Does any know of a different way to create the diskgroups? Another Veritas program that would allow command line parameters? Another way to pass the answers to vxdiskadd?
Code:
**********************************
EXAMPLE OF MANUAL INPUT TO vxdiskadd
**********************************
11:34:42 # vxdiskadd sda

Add or initialize disks
Menu:: VolumeManager/Disk/AddDisks

  Here is the disk selected.  Output format: [Device_Name]

  sda

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

  You can choose to add this disk to an existing disk group, a
  new disk group, or leave the disk available for use by future
  add or replacement operations.  To create a new disk group,
  select a disk group name that does not yet exist.  To leave
  the disk available for future use, specify a disk group name
  of "none".

Which disk group [<group>,none,list,q,?] dgGate

Create a new group named dgGate? [y,n,q,?] (default: y) y

Create the disk group as a CDS disk group? [y,n,q,?] (default: y) y

Use a default disk name for the disk? [y,n,q,?] (default: y) y

Add disk as a spare disk for dgGate? [y,n,q,?] (default: n) n

Exclude disk from hot-relocation use? [y,n,q,?] (default: n) n

Add site tag to disk? [y,n,q,?] (default: n) n

  A new disk group will be created named dgGate and the selected disks
  will be added to the disk group with default disk names.

  sda

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

  Initializing device sda.

Enter desired private region length
[<privlen>,q,?] (default: 65536) 65536

  VxVM  NOTICE V-5-2-120
Creating a new disk group named dgGate containing the disk
  device sda with the name dgGate01.

Goodbye.


**********************************
EXAMPLE OF PASSING INPUT TO vxdiskadd
**********************************
11:35:48 #         echo "y
dgGate
y
y
y
n
n
n
y
default 65536" | vxdiskadd sda

Add or initialize disks
Menu:: VolumeManager/Disk/AddDisks
cat: write error: Bad file descriptor
cat: write error: Bad file descriptor
expr: syntax error
/usr/lib/vxvm/voladm.d/lib/vxadm_lib.sh: line 1956: [: 7: unary operator expected
/usr/lib/vxvm/voladm.d/lib/vxadm_lib.sh: line 1957: [: too many arguments
/usr/lib/vxvm/voladm.d/lib/vxadm_lib.sh: line 1958: [: too many arguments
/usr/lib/vxvm/voladm.d/lib/vxadm_syslib.sh: line 1525: 65536: command not found

Goodbye.


Last edited by Scott; 01-04-2010 at 07:41 PM.. Reason: Added code tags
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

FSCK on veritas managed disk

I've had a VXFS filesystem get corrupted and now it won't mount. Can I run a fsck -y on the raw disk device or should something be done within veritas? Veritas does not see the disk at the moment. (2 Replies)
Discussion started by: ozzmosiz
2 Replies

2. Solaris

Veritas root disk mirroring

Hi there, My task is to replace the two 73 G disks with two 143 G disks , which has vxvm 4.1 running on it. I would like to know whether the steps iam following are correct. 1. Break the sub-disks, plexes of the root mirror. 2. Remove the sub-disks,plexes of the root mirror. 3. Remove one of... (10 Replies)
Discussion started by: Jartan
10 Replies

3. Solaris

Need to remove a disk from Veritas

I have a bogus disk that keeps showing up as failed from vxdisk list - - disk hpdg failed was:c2t0d11s2 There isnt any c2 devices on the system: # ls /dev/dsk/c2* /dev/dsk/c2*: No such file or directory # ls /dev/rdsk/c2* /dev/rdsk/c2*: No such file or... (3 Replies)
Discussion started by: kiem
3 Replies

4. Solaris

( VxVM ) How to add the removed disk back to previous disk group

Previously , i remove the disk by #vxdg -g testdg -k rmdisk testdg02 But i got error when i -k adddisk bash-2.03# vxdisk list DEVICE TYPE DISK GROUP STATUS c0t0d0s2 auto:none - - online invalid c0t1d0s2 auto:none ... (1 Reply)
Discussion started by: waibabe
1 Replies

5. UNIX for Dummies Questions & Answers

Configure disk group with veritas

People i have an a storage i create two virtual disk 1 y 2. In the virtual disk 1 i configure 8 volumes and in the Vd2 configure 5 volumes. Now i want to create a disk group called Prod2 y Dev2 but when i go to vxdiskadm and i choose add disk o encapusalte when i press list to list the disk... (0 Replies)
Discussion started by: enkei17
0 Replies

6. Solaris

Veritas not attaching replaced disk

Hi, I`m on SunFire480R with Solaris 10. Disk in rootdg group failed, so it was replaced. However, I cannot make Veritas initalise the replaced disk: # vxdctl enable # vxdisk list c1t0d0s2 Device: c1t0d0s2 devicetag: c1t0d0 type: auto flags: online error private autoconfig... (1 Reply)
Discussion started by: masloff
1 Replies

7. Solaris

Veritas disk group not the same on each cluster node.

Need help getting all disk devices back on node 2 the same as node 1. Recently Veritas and/or Sun cluster got wrecked on my 2 node Sun cluster after installing the latest patch cluster. I backed out the patches and then node 2 could see only half of the devices and Veritas drives (though format... (0 Replies)
Discussion started by: buggin
0 Replies

8. Shell Programming and Scripting

Need to create an for loop for adding an disk in veritas volume group.

Hi Experts I need an script to add an disk in to the veritas volume manager disk group. For example: # cd /tmp # view disk c6t5d2 c6t2d1 c6t3d7 c6t11d2 c7t11d2 c6t11d6 Normally we add the disk like this: # vxdg -g freedg freedisk01=c6t5d2 # vxdg -g freedg freedisk02=c6t2d1 #... (3 Replies)
Discussion started by: indrajit_preet
3 Replies

9. HP-UX

Removing a VxVM disk from a Disk Group

Hello all, So I made a rookie mistake today. I forgot to remove my disk from my disk group, before running the following command:for i in `ioscan -fnN | awk /NO/'{print $3}'` do rmsf -H $i done I am trying to run the following command, but not having any luck obviously:vxdg -g dgvol1 rmdisk... (0 Replies)
Discussion started by: mrkejames2
0 Replies

10. UNIX for Beginners Questions & Answers

How to extend a disk in veritas volume manager in veritas cluster?

Hi Experts, I wanted to extend a veritas file system which is running on veritas cluster and mounted on node2 system. #hastatus -sum -- System State Frozen A node1 running 0 A node2 running 0 -- Group State -- Group System Probed ... (1 Reply)
Discussion started by: Skmanojkum
1 Replies
vxevac(1M)																vxevac(1M)

NAME
vxevac - evacuate all volumes from a disk SYNOPSIS
/etc/vx/bin/vxevac [-g diskgroup] [-k [-O operation-tag]] [-t tasktag] medianame [new_medianame...] /etc/vx/bin/vxevac [-g diskgroup] [-O operation-tag] [-t tasktag] commit medianame /etc/vx/bin/vxevac [-g diskgroup] [-O operation-tag] [-t tasktag] rollback medianame DESCRIPTION
The vxevac utility moves subdisks off the specified Veritas Volume Manager (VxVM) disk (medianame) to the specified destination disks (new_medianame...). If no new_medianame arguments are specified, any non-volatile, non-reserved disks can be used as destination disks. Subdisks that are part of unmirrored striped plexes are moved by moving the entire plex to a new location. Note: This operation assumes that there is sufficient space in the disk group for the operation to complete. If the process runs out of space, some of the volumes on the disk may not be evacuated. vxevac is usually called from the vxdiskadm menus. A medianame argument is an administrative name used to define a disk within a disk group. The evacuation of a volume can be committed or rolled back if the -k option is specified. Such an operation is referred to as a "tentaive move." In addition, the -O option may be used to define a tag for a given tentative move operation. KEYWORDS
commit Completes tentative subdisk move operations by removing the source subdisks, and replacing them with the target subdisks. The -O option can be used to specify an operation tag for the subdisks whose tentative move is to be committed. If no operation tag is specified, the commit operation is applied to all completed tentative subdisk moves for the specified media. The commit opera- tion fails if a tentative move or a recovery resynchronization is in progress. rollback Reverses tentative subdisk move operations by removing the target subdisks, and leaving the source subdisks intact. The -O option can be used to specify an operation tag for the subdisks whose tentative move is to be rolled back. If no operation tag is specified, the rollback operation is applied to all completed tentative subdisk moves for the specified media. The rollback operation fails if a tentative move or a recovery resynchronization is in progress. OPTIONS
-g diskgroup Specifies the disk group for the operation, either by disk group ID or by disk group name. -k Initiates a subdisk move while preserving the source subdisks on the original plexes. The source and target subdisks are marked. The tentative move operation can be committed or rolled back at a later time. If the -O option is used to specify a tag, this tag can be used with the vxtask command to monitor, pause or abort such operations. -O operation-tag Specifies an operation tag that can be used to commit or roll back a completed tentative move operation. If an operation tag is specified, a task tag is automatically set to the same value. However, setting a task tag does not imply the setting of an opera- tion tag. -t tasktag Specifies an administrative operation to perform by the numeric identifier tasktag. See the vxtask(1M) manual page for informa- tion on Veritas Volume Manager tasks. SEE ALSO
vxassist(1M), vxdiskadm(1M), vxintro(1M), vxsd(1M), vxtask(1M) VxVM 5.0.31.1 24 Mar 2008 vxevac(1M)
All times are GMT -4. The time now is 04:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy