1829636 Members
1665 Online
109992 Solutions
New Discussion

Mirror

 
SOLVED
Go to solution
JUP
Regular Advisor

Mirror

I mirrored the drive /dev/dsk/c0t14d0 to /dev/dsk/c0t15d0 using:
"lvextend -m 1 /dev/vg01/data1 /dev/dsk/c0t15d0" - no problems, all seems to work OK.
My question is how do I check to see if the mirroring is working OK. I tried mounting the /dev/dsk/c0t15d0 device and the reply was "unrecognized file system". Can I check the data on the mirrored drive to make sure it is mirroring or do I just trust it is ?
7 REPLIES 7
exec
New Member
Solution

Re: Mirror

You can use:
#lvdisplay -v /dev/vg01/data1
then u can find the information are different from lv not mirrored.

Another way is:
#dd if=/dev/vg01/rdata1 of=/dev/null bs=64k

U should see the two disks blinking at same frequency.
Andreas Voss
Honored Contributor

Re: Mirror

Hi,

you cannot mount /dev/dsk/c0t15d0 because you are using LVM and mounting disk device is not supported.
With lvdisplay -v /dev/vg01/data1 you can see if mirroring is working:
The output looks like:
--- Logical volumes ---
LV Name /dev/vg01/data1
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 40
Current LE 10
Allocated PE 20
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c0t14d0 10 10
/dev/dsk/c0t15d0 10 10

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
0000 /dev/dsk/c0t14d0 0171 current /dev/dsk/c0t15d0 0171 current

As you see there are two PV's (physical volumes) for each LE (logical extend).
If there are all LE on both PE your mirroring is working correct.

Regards

Andrew
warghade
Occasional Advisor

Re: Mirror

Use the following command to check,

# lvdisplay /dev/vg01/data1
--- Logical volumes ---
LV Name /dev/vg01/data1
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 1

If the above entry "Mirror copies 1" is there means ur /dev/vg01/data1 is mirrored.
To check if the mirroring is working OK or not, write one file (eg. test) on /dev/vg01/data1 and save it then just unplug the disk on which vg01 is configured then try to open the same file (# vi test)
If the file opens it means mirroring is working OK.

I think this solves ur problem, good luck!

JUP
Regular Advisor

Re: Mirror

Thanks everyone.
I'm feeling confident all is OK now.
Dave Wherry
Esteemed Contributor

Re: Mirror

You can mount the mirror copy. First you need to use the lvsplit command to split off the mirror copy and then that can be mounted.
There is a pretty good document on the ITRC that covers this. The document ID is X1401978. It is about booting from a mirrored/split environment. You can use most of it for any volume.

Re: Mirror

You can also do a lvsplit. This will create logical volume say lvol1b. You can mount this lv and see if your data is getting updated properly. Then do an lvmerge. Take care, this is a dangerous command. Pls. go through the command syntax before executing this one. It can mirror the reverse way causing data loss.

Re: Mirror

You can also do a lvsplit. This will create logical volume say lvol1b. You can mount this lv and see if your data is getting updated properly. Then do an lvmerge. Take care, this is a dangerous command. Pls. go through the command syntax before executing this one. It can mirror the reverse way causing data loss.