Ya, I know, who in this day and age is mirroring rootvg...?
But yes, my shop does and I need to script checking for it.
I also know I could just inverse the the logic and call the LV mirrored
if the LPs and PPs were not equal. But I want to do the math in the if test
and also know I could use single element variables but array loading and usage is a learning experience for me.
Here is my script, but doing the math inside the if test is eluding me.
Hello everyonel,
I have an array set like so
num=4
read name
arr=name
I go through while loop to assign different values to different array element from 1 to 4. when I try to access the FIRST element of the array I get the last one first. Like if I say ${arr} it will show the last element... (4 Replies)
All,
I would like to add the first 10 elements of an array. Here is how I am doing it now (only included first few add ops):
#!/usr/bin/ksh
###Grab the array values out of a file###
TOTAL=`awk '/time/' /tmp/file.out | awk '{print $4}'`
set -A times $TOTAL
SUM=$((${times} + times... (3 Replies)
I need to remove an element from the below array variable TABLENAME.
#!/bin/ksh
set -A TABLENAME "mirf roxar keke mirs"
echo "the array is ${TABLENAME}"
If i need to remove say keke and have the final TABLENAME as below, how this could be achieved. Pls throw some light.
echo "Modified... (3 Replies)
Hi, How to get previous/next element in the array perl
Example
@queue = (1, 2 ,3 , 4);
I want to get value of 1 and 2, or, 2 and 3, or 3 and 4...etc and compare to value which one is greater to do that I need to get previous and next element of array ? (1 Reply)
Hi,
I'm trying to write a script for some xml file handling, but I'm not getting too far with it.
I've got the following xml content
<?xml version="1.0" encoding="UTF-8"?>
<Test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<Operation name="OPER1">
<Action name="ACTION1">... (2 Replies)
I am trying to take all the elements of an array and multiply them by 2, and then copy them to a new array. Here is what I have
i=0
for true in DMGLIST
do
let DMGSIZES2="${DMGSIZES}"*2
let i++
done
unset i
echo ${DMGSIZES2}
It does the calculation correctly for the first element,... (7 Replies)
Hi all,
I need help with the following scenario in ksh.
If the number of elements contained by arrayA is 11 I need to insert a zero as the element arrayA then print all arrayA elements separated by comma.
Appreciate your help. (9 Replies)
Hi,
I can't find out how to create correct code to get multiplication of each elements of array. Let's say I enter array into command line (2 3 4 5 6 8) and i need output 2*3*4*5*6*8=5760.
I tried this one, but answer is 0.
for i in $@; do
mult=$((mult*i))done
echo "mult: " $mult
... (4 Replies)
This question is for someone that's more familiar with Array Element.
I need to know if the maximum array element that can be assigned is 1024 and if its so, Is there a workaround solution when the counter exceeded 1024?
param_array="$param_nam"
counter=$counter+1
#to avoid space... (3 Replies)
Discussion started by: cumeh1624
3 Replies
LEARN ABOUT OSF1
volrootmir
volrootmir(8) System Manager's Manual volrootmir(8)NAME
volrootmir - Mirror areas necessary for booting to a new disk
SYNOPSIS
/usr/sbin/volrootmir [-a] [nconfig=count] target_disk [swap=target_partition]
OPTIONS
Specifies that all volumes on the system disk be mirrored, not just the root and swap volumes, rootvol and swapvol.
DESCRIPTION
The volrootmir script causes a mirror copy of areas of the root disk involved in booting to be made on the specified target disk.
When used without the -a option, volrootmir adds mirrors of the root and swap volumes and allocates them on the new disk. In addition, all
disk regions required for booting are set up and partitions for the new volume mirrors are created.
When used with the -a option, volrootmir mirrors all in-use partitions on the system disk.
To mirror a swap volume that is on a separate disk from the root volume, the swap attribute must be used to specify a separate target for
the swap mirror.
The target disk(s) must be at least as large as the sum of the sizes of rootvol and swapvol. Also, the physical disk should not have any
disk partition in use.
This script can be called from the voldiskadm menus by choosing the Mirror volumes on a disk operation.
ATTRIBUTES
Specifies the number of log copies and copies of the configuration database, for example, nconfig=2. Specifies that the swap volume,
swapvol, be mirrored on a separate disk, as specified by target_partition.
EXAMPLES
The following command mirrors the rootvol and swapvol volumes onto the target disk, dsk3. This command will fail if swapvol is on a differ-
ent disk from rootvol.
# volrootmir dsk3 The following command mirrors rootvol, swapvol, and any other volumes on the root disk onto the target disk, dsk3.
This command will fail if swapvol is on a different disk from rootvol.
# volrootmir -a dsk3 The following command mirrors rootvol on disk dsk3, swapvol onto partition dsk7d, and any other volumes on the
root disk onto disk dsk3. This command will fail if swapvol is on the same disk as rootvol.
# volrootmir -a dsk3 swap=dsk7d The following command mirrors rootvol onto disk dsk3 and swapvol onto partition dsk7d. This command
will fail if swapvol is on the same disk as rootvol.
# volrootmir dsk3 swap=dsk7d
SEE ALSO volintro(8), voldiskadm(8)volrootmir(8)