Sponsored Content
Top Forums Shell Programming and Scripting Need to create an for loop for adding an disk in veritas volume group. Post 302679545 by guruprasadpr on Tuesday 31st of July 2012 08:08:05 AM
Old 07-31-2012
Hi


Code:
$ awk '{printf "vxdg -g freedg freedisk%02d=%s\n",++i,$0;}' /tmp/disk
vxdg -g freedg freedisk01=c6t5d2
vxdg -g freedg freedisk02=c6t2d1
vxdg -g freedg freedisk03=c6t3d7
vxdg -g freedg freedisk04=c6t11d2
vxdg -g freedg freedisk05=c7t11d2
vxdg -g freedg freedisk06=c6t11d6

If this is the output you expected, you can redirect the above output to a file and run it.


Guru.
 

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

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... (0 Replies)
Discussion started by: jm6601
0 Replies

2. UNIX for Advanced & Expert Users

Veritas Volume Manager question (Disk layout with 4 plexes)

I am trying to build a veritas volume similar to an existing volume on another server. The output on source server is: usbtor12# vxprint -hrtg appdg v anvil_sqlVOL - ENABLED ACTIVE 629145600 SELECT - fsgen pl anvil_sqlVOL-01 anvil_sqlVOL ENABLED ACTIVE 629145600... (3 Replies)
Discussion started by: momin313
3 Replies

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

4. UNIX for Dummies Questions & Answers

VERITAS Volume Manager - mirror a disk/volume

I have a machine (5.10 Generic_142900-03 sun4u sparc SUNW,Sun-Fire-V210) that we are upgrading the storage and my task is to mirror what is already on the machine to the new disk. I have the disk, it is labeled and ready but I am not sure of the next steps to mirror the existing diskgroup and... (1 Reply)
Discussion started by: rookieuxixsa
1 Replies

5. AIX

Adding a Volume Group to an HACMP Resource Group?

Hi, I have a 2 node Cluster. Which is working in active/passive mode (i.e Node#1 is running and when it goes down the Node#2 takes over) Now there's this requirement that we need a mount point say /test that should be available in active node #1 and when node #1 goes down and node#2 takes... (6 Replies)
Discussion started by: aixromeo
6 Replies

6. AIX

Create new Volume Group

Good afternoon all, I'll probably confuse everyone as I'm a Windows guy dealing with AIX 6.1 and can't quite figure out how to do something. I have a P520 server running 2 LPARs and we have an IVM (not HMC).Within the IVM under Virtual Storage Management, when I check the Physical Volumes, I have... (4 Replies)
Discussion started by: Spellbound
4 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. UNIX for Dummies Questions & Answers

How to create a volume group, logical volume group and file system?

hi, I want to create a volume group of 200 GB and then create different file systems on that. please help me out. Its becomes confusing when the PP calculating PP. I don't understand this concept. (2 Replies)
Discussion started by: kamaldev
2 Replies

9. Red Hat

No space in volume group. How to create a file system using existing logical volume

Hello Guys, I want to create a file system dedicated for an application installation. But there is no space in volume group to create a new logical volume. There is enough space in other logical volume which is being mounted on /var. I know we can use that logical volume and create a virtual... (2 Replies)
Discussion started by: vamshigvk475
2 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
vrstat(1M)																vrstat(1M)

NAME
vrstat - display statistical information for volumes in RVGs and RLINKs, and for all hosts in an RDS SYNOPSIS
vrstat [-g diskgroup] [-V] [-S] [-R] [-M] [-n number] [rvg ...] DESCRIPTION
The vrstat command prints statistical information for the volumes in Replicated Volume Groups (RVGs) and RLINKs, and for all hosts in a Replicated Data Set (RDS). Information is displayed across the RDS setup on all the hosts, and not for a specific host. By default, the command displays statistics at intervals of 10 seconds. This interval can be changed by setting the VRAS_STATS_FREQUENCY environment variable to the required value in the /etc/vx/vras/vras_env file. If no rvg argument is specified, the command displays information for the RLINKs, storage replicator logs (SRLs), data volumes or memory tunables across all the RDSs on the local host, depending on the option that is specified. If no option or argument is specified, the vrstat command displays the consolidated status for the RLINKs, SRLs, data volumes and memory tunables of all RDSs on the local host. For more information on the output formats, see the vxrlink(1M), vxstat(1M) and vxmemstat(1M) manual pages. OPTIONS
-g diskgroup Specifies the disk group for the operation. If the -g option is not specified, the rvg argument determines the default local disk group, according to the standard disk group selection rules that are described on the vxdg(1M) manual page. -M Displays detailed information for the memory tunables on every host in an RDS. The output from this option is similar to that from the vxmemstat command. -n number Displays the statistics number times, and then exits. -R Displays RLINK-related statistical information for all hosts in an RDS. The output from this option combines the output from the vxrlink stats and vxrlink status commands, and also displays bandwidth utilization by the RLINK. This output can be used to diagnose connectivity and network problems. -S Displays statistical information for SRL volumes on all hosts in an RDS. -V Displays statistical information for data volumes on all hosts in an RDS. EXIT CODES
The vrstat utility exits with a status of 0 if the attempted operation succeeds. It exits with a status of 1 if the attempted operation fails. This exit code is the same for all errors. EXAMPLES
Display statistical information for all RLINKs in an RDS across all hosts: vrstat -R egrvg Display consolidated statistical information for all RLINKs, SRLs, data volumes and memory tunables for all RDSs on a host: vrstat SEE ALSO
vxmemstat(1M), vxrlink(1M), vxstat(1M) VxVM 5.0.31.1 24 Mar 2008 vrstat(1M)
All times are GMT -4. The time now is 01:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy