Operating System - HP-UX
1827788 Members
2617 Online
109969 Solutions
New Discussion

Re: VxVM Volume creation with sub-disk, plex and mirroring to another disk

 
SOLVED
Go to solution
Srikanth Arunachalam
Trusted Contributor

VxVM Volume creation with sub-disk, plex and mirroring to another disk

Hi,

I want to perform the following :-
(1) Create volume called srs_1_v
(2) Create sub-disk called dsk6-01
(3) Create plex called srs_1_pl0
(4) Create mount point called /u01/oradata/srs_1_a and mount the volume srs_1_v onto this directory.
We make use of HP-UX 11.23.

Also the data disk should be mirrored. if c4t0d1 and c4t0d2 are the disk device identified where c4t0d1 need to be mirrored onto c4t0d2. What steps I need to perform from vxdisksetup. Please help me in defining clear steps. I think below steps may be partially right..if you want to correct the given steps, it still helps.
$vxdisksetup –I c4t0d1, c4t0d2 (where c4t0d2 is to be mirrored with c4t0d1)
$vxdisksetup –I c3t0d1, c3t0d2 (where c3t0d2 is mirrored with c3t0d1)
$vxdisk –o alldgs list (to see the status as online)
$vxdg init omcdg dsk6=c4t0d1 \
dsk7=c3t0d1
$vxmake -g omcdg sd dsk6-01 DSK6 0,10000 comment="DSK6 subdisk1"
vxmake -g omcdg plex srs_1_pl0 sd=dsk6-01 comment="srs_1_pl0 for dsk6 and sd=dsk6-01"
$vxmake -g omcdg -U gen vol srs_1_v plex=srs_1_pl0 comment="srs_1_v is volume gen is usetype"
$step for initializing volume not known
$vxvol -g omcdg start srs_1_v
$mkfs F vxfs /dev/rdsk/c4t0d1
$mount -F vxfs /dev/vx/dsk/omcdg/srs_1_v /u01/oradata/srs_1_a

Please give me the correct steps. The efforts will definetly be appreciated.
7 REPLIES 7
Albert_31
Trusted Contributor

Re: VxVM Volume creation with sub-disk, plex and mirroring to another disk

hello srikanth,

you got the step correct.. though some minor corrections

a) There is no steps for initializing the volume.

b) you need to create one more subdisk..on dsk7, associate it to the plex srs_1_pl0 so that you get a mirrored setup.

c) newfs -F vxfs /dev/vx/rdsk/diskgroup/volume

d) mount -F vxfs /dev/vx/dsk/diskgroup/volume /mountpoint

regards

albert
Zinky
Honored Contributor

Re: VxVM Volume creation with sub-disk, plex and mirroring to another disk

The easiest (after bringing in your disks to the diskgroup is):

Create Volume:

vxassist -g omcdg make srs_1_v 36g alloc=dsk6

Then do your mkfs or newfs and mount - so the volume/filesystem can be used immediately. Then you mirror:

vxassist -g omcdg mirr srs_1_v alloc=dsk7


OR, to create your mirroed volume in one shot (of course you need to wait until the creatioj if complete before you can create the filesystem):

vxassist -g omcdg make srs_1_v 36g layout=mirrored alloc=dsk6,dsk7

(Replace 36g with whatever exact number of blocks you have or desire for your volume).

Note that the above vxassist method will name your plexes and subdisks per the VxVM standard w/c is: you will have 2 plexes named srs_1_v-01 and srs_1_v-02. Each plex will have subdisk dsk6-01 and dsk7-01.

Hope this helps..
Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Srikanth Arunachalam
Trusted Contributor

Re: VxVM Volume creation with sub-disk, plex and mirroring to another disk

Hi Albert, Nelson :-

Thanks for your response. Just a quick confirmation, if i need to make use of dsk6 as main disk and dsk6m as mirrored disk. Can I confirm that the following will suffice.

$vxdisk â o alldgs list
DEVICE TYPE DISK GROUP STATUS
c0t0d0 simple rootdg01 rootdg online
c1t1d0 simple dsk6 omcdg online
c2t2d0 simple dsk7 omcdg online
c3t3d0 simpe dsk10 omcdg online
c1t1d1 simple dsk6m omcdg online
c2t2d1 simple dsk7m omcdg online
c3t3d1 simpe dsk10m omcdg online

Sample Configuration mirroring DSK6 with DSK6m
$vxdisksetup â I c1t1do, c1t1d1
$vxdisksetup â I c2t2do, c2t2d1
$vxdisksetup â I c3t3do, c3t3d1
$vxdg init omcdg dsk6=c1t1d0 dsk7=c1t1d1
$vxmake â g omcdg sd dsk6-01 DSK6 0,10000 comment=â DSK6 subdisk1â
$vxmake â g omcdg plex srs_1_pl0 sd=dsk6-01 comment=â â
$ vxmake â g omcdg sd dsk6m-01 DSK6m 0,10000 comment=â DSK6 subdisk1â
$ vxmake â g omcdg plex srs_1_pl0 sd=dsk6m-01 comment=â mirror oneâ
$ vxmake -g omcdg -U gen vol srs_1_v plex=srs_1_pl0 comment="srs_1_v is volumeâ
$ vxvol init clean srs_1_v
$ vxvol -g omcdg start srs_1_v
$ newfs -F vxfs /dev/vx/rdsk/omcdg/srs_1_v
$ mount â F vxfs /dev/vx/rdsk/omcdg/srs_1_v /u01/oracle
Mridul Shrivastava
Honored Contributor

Re: VxVM Volume creation with sub-disk, plex and mirroring to another disk

Everything is looking fine the only issue I found is that only one plex is created during this process, for mirroring the vol we must have two plexes of eual sizes and then while creating vol we have to mention both plex names under plex parameter.
Time has a wonderful way of weeding out the trivial
Albert_31
Trusted Contributor
Solution

Re: VxVM Volume creation with sub-disk, plex and mirroring to another disk

Hello Sanjay
a) First I have my doubts

1) Is the vxdisk output that is pasted in the forum a current one or you made it up.

If it is current and these disks were not used at all then you can proceed as given below

the diskgroup omcdg is already created and have the disks in place, so we just need to add the volumes,plexes and subdisks.

Note that they were some typos in the commands you have posted in the forum, corrected it below..

$ vxmake -g omcdg sd dsk6-01 dsk6 0,10000 comment=DSK6 subdisk1
$ vxmake -g omcdg plex srs_1_pl0 sd=dsk6-01 comment=
$ vxmake -g omcdg sd dsk6m-01 dsk6m 0,10000 comment=dsk6m subdisk1
$ vxmake -g omcdg plex srs_1_pl1 sd=dsk6m-01 comment=Â mirror one
$ vxmake -g omcdg -U gen vol srs_1_v plex=srs_1_pl0,srs_1_pl1 comment="srs_1_v is volume"
$ vxvol init clean srs_1_v
$ vxvol -g omcdg start srs_1_v
$ newfs -F vxfs -o largefiles /dev/vx/rdsk/omcdg/srs_1_v
$ mount -F vxfs /dev/vx/dsk/omcdg/srs_1_v /u01/oracle


In case the vxdisk list output was a created one..ie you manually made it up..then you have to create the diskgroup etc.

$vxdisksetup -i c1t1d0, c1t1d1 >> it is lower case "i" (eye)
$vxdisksetup -i c2t2d0, c2t2d1
$vxdisksetup -i c3t3d0, c3t3d1
$vxdg init omcdg dsk6=c1t1d0 dsk7=c1t1d1
$ vxmake -g omcdg sd dsk6-01 dsk6 0,10000 comment=DSK6 subdisk1
$ vxmake -g omcdg plex srs_1_pl0 sd=dsk6-01 comment=
$ vxmake -g omcdg sd dsk6m-01 dsk6m 0,10000 comment=dsk6m subdisk1
$ vxmake -g omcdg plex srs_1_pl1 sd=dsk6m-01 comment=Â mirror one
$ vxmake -g omcdg -U gen vol srs_1_v plex=srs_1_pl0,srs_1_pl1 comment="srs_1_v is volume"
$ vxvol init clean srs_1_v
$ vxvol -g omcdg start srs_1_v
$ newfs -F vxfs -o largefiles /dev/vx/rdsk/omcdg/srs_1_v
$ mount -F vxfs /dev/vx/dsk/omcdg/srs_1_v /u01/oracle

let me know the results..
Srikanth Arunachalam
Trusted Contributor

Re: VxVM Volume creation with sub-disk, plex and mirroring to another disk

Hi,

That was a brilliant response. Now I am really sure about to script it out. Closing the thread.

Thanks,
Srikanth
Srikanth Arunachalam
Trusted Contributor

Re: VxVM Volume creation with sub-disk, plex and mirroring to another disk

The script given by albert is sufficient enough to proceed with my work.