1829903 Members
2963 Online
109993 Solutions
New Discussion

Mirror problem

 
Javier Ortiz Guajardo
Frequent Advisor

Mirror problem

I define a vg with primary vol c5t0d0 and a mirror disk c20t0d0.

first i create a lvol1 in disk c5t0d0 and then i mirrored the lvol1 on disk c20t0d0 and i see the next line in lvdisplay lvol1
LE PV1 PE1 Status 1 PV2 PE2 Status 2
0000 /dev/dsk/c5t0d0 0000 current /dev/dsk/c20t0d0 0000 current

the PV1 indicate that primary vol is c5t0d0.

but now the lvdisplay show me this
LE PV1 PE1 Status 1 PV2 PE2 Status 2
0000 /dev/dsk/c20t0d0 0000 current /dev/dsk/c5t0d0 0000 current

Why now the primary vol is c20t0d0 if when i did the mirror i did it whit this command lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/c20t0d0

i don??t know if this happened after i reboot the machine.

Do you have an explanation about it?

Thanks
The obstacles are those things that the people see when they left to see their goals.
6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: Mirror problem

It doesn't really matter which disk is listed first. There really isn't a primary or secondary disk. Data will get written to both disks and get read from either disk. I wouldn't really worry about it.
Rajeev  Shukla
Honored Contributor

Re: Mirror problem

See its doesnt really matter which one is primary or secondary. Beacuse in mirroing there is no such. Only for the boot disk we say so and thats just naming for our convenience.

Look at this once you create mirrors, export the VG and again import the VG then you dont know which is primary and secondary. Once a VG is exported from one disk and inported on another disk you dont know which disk is first and second.

So dont worry the way it shows in lvdisplay.

Rajeev
James R. Ferguson
Acclaimed Contributor

Re: Mirror problem

Hi:

Assuming you did nothing special when you booted, perhaps your primary boot path points to the /dev/dsk/c20t0d0. You can use 'setboot' to query the settings for booting:

# setboot

You can also verify the actual bootpath as follows:

# echo 'boot_string/S'|adb /stand/vmunix /dev/mem

You will see something like:

boot_string:
boot_string: disc(10/0.6.0;0)/stand/vmunix

...which can be quickly related to the disk device file by examining the output of:

# lvlnboot -v

Regards!

...JRF...
IT Response
Esteemed Contributor

Re: Mirror problem

Execute "...strings /etc/lvmtab...". The first disk that appears under vg00 is the first disk that you started with, while the mirror will be the second disk added to vg00 and therefore the second disk appearing under vg00 in lvmtab. Use this for verification purposes since pv1 and pv2 are determined from their order in /etc/lvmtab. ALL LVM Commands including lvdisplay and vgdisplay refer to the ordering of disks in /etc/lvmtab to determine pv1 and pv2. You can remake /etc/lvmtab with vgscan if needed if you determine that /etc/lvmtab is corrupt, which does happen.
IT Response
Esteemed Contributor

Re: Mirror problem

Execute "...strings /etc/lvmtab...". The first disk that appears under vg00 is the first disk that you started with, while the mirror will be the second disk added to vg00 and therefore the second disk appearing under vg00 in lvmtab. Use this for verification purposes since pv1 and pv2 are determined from their order in /etc/lvmtab. ALL LVM Commands including lvdisplay and vgdisplay refer to the ordering of disks in /etc/lvmtab to determine pv1 and pv2. You can remake /etc/lvmtab with vgscan if needed, and if you determine that /etc/lvmtab is corrupt. (* Which occaisionally does happen. *)
Sridhar Bhaskarla
Honored Contributor

Re: Mirror problem

Hi,

Check few things.

#setboot

and observe what is the primary boot path set to.

#lvlnboot -v

Look at the output and see which disk appears first.

#lifcp /dev/dsk/c20t0d0:AUTO -

Repeat the same for the other disk. If you hardcoded the bootstring, then compare it with the setboot.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try