Operating System - HP-UX
1748151 Members
3914 Online
108758 Solutions
New Discussion юеВ

36GB *10 disk (Lv 60GB mirror needed)

 
Akif_1
Super Advisor

36GB *10 disk (Lv 60GB mirror needed)

OS:HP-UX 11.11
PA-RISC (rp5410)
Disk Channel (36GB *10=360GB).

I have a external disk channel (VA) attach to my HPUX and i can see the output of all 10 36GB disk via ioscan -fnC disk.

Solution required:
=================

1)VG/LV creation of (60GB/30GB/19GB/30GB/25GB)requird.
2)This to be mirror one

I can proceed with any LV which is consist of 36GB.

For example:
pvcreate disk1
vgcreate disk1
lvcreate disk1

pvcreate disk2
vgextend disk2
lvextend disk2

But how can i create VG and LV then mirror in this scenario.


I appreciate every one for their valuable input's
T(ogether) E(very one) A(chive) M(ore)
11 REPLIES 11
Michal Kapalka (mikap)
Honored Contributor

Re: 36GB *10 disk (Lv 60GB mirror needed)

Akif_1
Super Advisor

Re: 36GB *10 disk (Lv 60GB mirror needed)

Let's Assume 10 disk of 36GB divided by 5 each in a Volume group(i.e:vg03 & vg04):

Step1:
pvcreate /dev/rdsk/c1t6d1
pvcreate /dev/rdsk/c1t6d2
pvcreate /dev/rdsk/c1t6d3
pvcreate /dev/rdsk/c1t6d4
pvcreate /dev/rdsk/c1t6d5
Step2:Create the Volume Group (VG03)
Step3:Add the disk to the Volume Group
vgextend /dev/vg01 /dev/dsk/c1t6d2 then 3,4,5....No
Step4: Now i can create LV as required (60GB/30GB/19GB/30GB/25GB)

Then How can i mirror this vg03 to vg04 and all lv's mirror similarly. Do i need to create PVG (example PVG1 PVG2) so it can be mirror automatically or need any specific command for mirror configuration.


pvcreate /dev/rdsk/c2t6d1
pvcreate /dev/rdsk/c2t6d2
pvcreate /dev/rdsk/c2t6d3
pvcreate /dev/rdsk/c2t6d4
pvcreate /dev/rdsk/c2t6d5
Create the Volume Group (VG04)
T(ogether) E(very one) A(chive) M(ore)
Johnson Punniyalingam
Honored Contributor

Re: 36GB *10 disk (Lv 60GB mirror needed)

# pvcreate /dev/rdsk/cxtxd1
# pvcreate /dev/rdsk/cxtxd2
# pvcreate /dev/rdsk/cxtxd3
# pvcreate /dev/rdsk/cxtxd4
# pvcreate /dev/rdsk/cxtxd5

(1-5 disks)

# mkdir /dev/vgxx
# ll /dev/vg*/group -> list all minor number of existin (Vg - use next availabe) for new VG
# mknod /dev/vgxx/group c 64 0x030000
# vgcreate -s 32 /dev/vgname /dev/dsk/cxtxd1 /dev/dsk/cxtxd2

# vgextend /dev/vgname /dev/dsk/cxtxd3 /dev/dsk/cxtxd4 /dev/dsk/cxtxd5

By doing above steps (VG has been create)

now proceed to create (LV's)

# lvcreate -L 61440 /dev/vgname
# lvcreate -L 30720 /dev/vgname
# lvcreate -L 19456 /dev/vgname
# lvcreate -L 30720 /dev/vgname
# lvcreate -L 25600 /dev/vgname

#newfs -F vxfs -o largefiles /dev/vgname/rlvol1
#newfs -F vxfs -o largefiles /dev/vgname/rlvol2
#newfs -F vxfs -o largefiles /dev/vgname/rlvol3
#newfs -F vxfs -o largefiles /dev/vgname/rlvol4
#newfs -F vxfs -o largefiles /dev/vgname/rlvol5

(mount all logical volume & add all above in the /etc/fstab)

# pvcreate /dev/rdsk/cxtxd6
# pvcreate /dev/rdsk/cxtxd7
# pvcreate /dev/rdsk/cxtxd8
# pvcreate /dev/rdsk/cxtxd9
# pvcreate /dev/rdsk/cxtxd10

# vgextend /dev/dsk/cxtxd6
# vgextend /dev/dsk/cxtxd7
# vgextend /dev/dsk/cxtxd8
# vgextend /dev/dsk/cxtxd9
# vgextend /dev/dsk/cxtxd10

(Mirror Logical volume)

# lvextend -m 1 /dev/vgname/lvol1 /dev/dsk/cxtxd6
# lvextend -m 1 /dev/vgname/lvol2 /dev/dsk/cxtxd7
# lvextend -m 1 /dev/vgname/lvol3 /dev/dsk/cxtxd8
# lvextend -m 1 /dev/vgname/lvol4 /dev/dsk/cxtxd9
# lvextend -m 1 /dev/vgname/lvol5 /dev/dsk/cxtxd10


Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: 36GB *10 disk (Lv 60GB mirror needed)

Hope all above steps , Helps,

Rgds,
Johnson
Problems are common to all, but attitude makes the difference
Michal Kapalka (mikap)
Honored Contributor

Re: 36GB *10 disk (Lv 60GB mirror needed)

hi,

at first i would use :

lvmpvg and pvcreate -f ( it's better )

striping + mirroring on LVM.

mikap
Akif_1
Super Advisor

Re: 36GB *10 disk (Lv 60GB mirror needed)

Hello Jhonson,

After finished (1-5) disk's:
Below commands for (6-10) disk, But vgextend pointing to which VG , As i UNDERSTAND we are not using old above created VG for this disk , NEW VG to be created ........ clear this doubt .

# vgextend /dev/dsk/cxtxd6
# vgextend /dev/dsk/cxtxd7
# vgextend /dev/dsk/cxtxd8
# vgextend /dev/dsk/cxtxd9
# vgextend /dev/dsk/cxtxd10

(Mirror Logical volume)

# lvextend -m 1 /dev/vgname/lvol1 /dev/dsk/cxtxd6
# lvextend -m 1 /dev/vgname/lvol2 /dev/dsk/cxtxd7
# lvextend -m 1 /dev/vgname/lvol3 /dev/dsk/cxtxd8
# lvextend -m 1 /dev/vgname/lvol4 /dev/dsk/cxtxd9
# lvextend -m 1 /dev/vgname/lvol5 /dev/dsk/cxtxd10


How can i mirror (60GB to /dev/dsk/cxtxd6) where as this disk consist of 36GB only.

I appreciate your help which is on time Clear second part of confirmation to solve this issue ......

Regard's
T(ogether) E(very one) A(chive) M(ore)
Michal Kapalka (mikap)
Honored Contributor

Re: 36GB *10 disk (Lv 60GB mirror needed)

hi,

as i mentioned before use strict allocation policy via lvmpvg, you need to make stripe + mirror.

mikap
Johnson Punniyalingam
Honored Contributor

Re: 36GB *10 disk (Lv 60GB mirror needed)

>>>>How can i mirror (60GB to /dev/dsk/cxtxd6) where as this disk consist of 36GB only.

I appreciate your help which is on time Clear second part of confirmation to solve this issue ......<<<<<<<<<<<

Yes, its not possible ......................
I over look the (60GB)-> You can follow methods suggested by (Mikap)

or

>>external disk channel (VA) attach to my HPUX<<

FYI ..in the (virtual array) you can also (slice disk) LUN size of 2 * 60GB

Problems are common to all, but attitude makes the difference
Akif_1
Super Advisor

Re: 36GB *10 disk (Lv 60GB mirror needed)

Hi Mic,

Can you provide me a stripe and mirror policy as per above scenario.

As i understand from your input is.

#Create two vg name for example vg01 vg02
#create vi/etc/lvmpvg (enter details)

For example, to use two PVGs in vg01 with c1t6d0 and c2t6d0
in one PVG (PVG0), c3t6d0 and c4t6d0 in the other PVG (PVG1) the
contents of the file (/etc/lvmpvg) should be:

VG /dev/vg01
PVG PVG0
/dev/dsk/c1t6d0
/dev/dsk/c2t6d0
PVG PVG1
/dev/dsk/c3t6d0
/dev/dsk/c4t6d0


XVI) How to use PVG to mirror logical volumes on specific physical volumes.

Note: in the following text, the volume group will be vg01 and the
logical volume will be name lvhome

After creating the /etc/lvmpvg file as describe above, each copy
of your mirror could be force on different PVG. To achieve this if
the logical volume is already created but not mirrored yet, use the
following command:
lvchange -s g /dev/vg01/lvhome (this change is for vg01 only what about another disk set vg02)
lvextend -m 1 /dev/vg01/lvhome
If the logical volume is not created yet:
lvcreate -s g -m 1 -n lvhome -L 200 /dev/vg01

How to mirror this to vg02 as well.

Regard's
T(ogether) E(very one) A(chive) M(ore)