cancel
Showing results for 
Search instead for 
Did you mean: 

Need a way to silently create a diskgroup

jm6601
Level 2
I'm looking for the commands to silently create a diskgroup.  I've tried passing the answers the vxdiskadd but that does not work well.

**********************************
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.
1 ACCEPTED SOLUTION

Accepted Solutions

Gaurav_S
Moderator
Moderator
   VIP    Certified
Hello,

Well process goes like this:

a) you need to initialize a disk (using vxdiskadd or vxdisksetup, both will be calling a lower command called vxdisk), ultimate goal of this command is to create a public & private region on the disk.

b) once public & private regions are created, vxdiskadd adds the disk to the diskgroup...

So, ideally for a new disk following should be shortest steps:

a) vxdisksetup -i sdx
b) vxdg init <diskgroup> xxx=sdx

where xxx is the name you want to call for disks...


Gaurav

View solution in original post

3 REPLIES 3

jayess
Level 3
 Try this one, vxdg init dgGate sda 

good luck. 

jm6601
Level 2

I tried vxdg init, but received an error.  I did not write down the error and my putty buffer is full.  The fix was to execute '/etc/vx/bin/vxdisksetup -i <disk>'.  I did a little research and vxdiskadd performs the work for vxdisksetup.  What else does vxdiskadd do that needs to be added?

Gaurav_S
Moderator
Moderator
   VIP    Certified
Hello,

Well process goes like this:

a) you need to initialize a disk (using vxdiskadd or vxdisksetup, both will be calling a lower command called vxdisk), ultimate goal of this command is to create a public & private region on the disk.

b) once public & private regions are created, vxdiskadd adds the disk to the diskgroup...

So, ideally for a new disk following should be shortest steps:

a) vxdisksetup -i sdx
b) vxdg init <diskgroup> xxx=sdx

where xxx is the name you want to call for disks...


Gaurav