LVM and VxVM

How to create boot disk Miroring

 
Andrew Nguyen_1
Occasional Advisor

How to create boot disk Miroring

Gents,

I have two drives c2t0d0 and c2t1d0 on rp3440 model. C2t0d0 is under VxVm type, but as i try to mirror c2t1d0 using Veritas GUI, it's not allow and within the GUI it has a little (?) mark next to the disk. Perhaps is in LVM control? but as i try pvcreate -B /dev/rdsk/c2t1d0 i got this error:
pvcreate: Could not perform LVM operation on VxVM disk "/dev/rdsk/c2t1d0"

Any assist is greatly appreciated.

Andrew

8 REPLIES 8
psreedhar
Frequent Advisor

Re: How to create boot disk Miroring

Hi Andrew,

Run "vxdisk list |grep c2t1d0"
and see what it prints. It might be part of some another DG.
Andrew Nguyen_1
Occasional Advisor

Re: How to create boot disk Miroring

PSREEDHAR,

Thanks for the reply and below is the result of vxdisk list
# vxdisk list
DEVICE TYPE DISK GROUP STATUS
c2t0d0 simple rootdisk01 rootdg online
c2t1d0 simple - - LVM

Andrew Nguyen_1
Occasional Advisor

Re: How to create boot disk Miroring

Okay,

Some progression were made up to this.

Remove header with dd command.
#dd if=/dev/zero of=/dev/rdsk/c2t1d0 bs=1024k count=200
#pvcreate -B /dev/rdsk/c2t1d0
#vgextend /dev/vg00 /dev/dsk/c2t1d0

# setboot -v
Primary bootpath : 0/1/1/0.0.0
Alternate bootpath : 0/1/1/0.1.0


Andrew Nguyen_1
Occasional Advisor

Re: How to create boot disk Miroring

Okay,

Some progression were made up to this.

Remove header with dd command.
#dd if=/dev/zero of=/dev/rdsk/c2t1d0 bs=1024k count=200
#pvcreate -B /dev/rdsk/c2t1d0
#vgextend /dev/vg00 /dev/dsk/c2t1d0

# setboot -v
Primary bootpath : 0/1/1/0.0.0
Alternate bootpath : 0/1/1/0.1.0

further assist is needed. thanks

Andrew
Siju Vadakkan
Trusted Contributor

Re: How to create boot disk Miroring

The follwing loop will mirror all ur LV....



vgdisplay -v vg00 | grep "LV Name" | awk '{print $3}' | while read a

do

lvextend $a /dev/dsk/c2t1d0

done

-------------
if u don't mind can u please provide the following information.

#strings /etc/lvmtab
#vxdisk list
Siju Vadakkan
Trusted Contributor

Re: How to create boot disk Miroring

Ignore the above update becz -m 1 is missing in the lvextend command

The follwing loop will mirror all ur LV....



vgdisplay -v vg00 | grep "LV Name" | awk '{print $3}' | while read a

do

lvextend -m 1 $a /dev/dsk/c2t1d0

done

-------------
if u don't mind can u please provide the following information.

#strings /etc/lvmtab
#vxdisk list
psreedhar
Frequent Advisor

Re: How to create boot disk Miroring

Hi,
I think there some confusion.
You root volume group is under VXVM but not under LVM.

But c2t1d0 has LVM information in that. That's why vxvm is rejecting to add in rootdg.
If you are sure that, you don't have any data in c2t1d0 run the following two commands which will wipe of the LVM information.

dd if=/dev/zero of=/dev/rdsk/c2t1d0 bs=1024 count=1 seek=8
dd if=/dev/zero of=/dev/rdsk/c2t1d0 bs=1024 count=1 seek=72

After running the above two commands perform "vxdisk scandisks" once again.
Then try vxdisk list.
Now the disk shouldn't be shown under vxvm.
Now you use the GUI to mirror the rootDG.

Out of box question?
Why exactly you are using vxvm?
Andrew Nguyen_1
Occasional Advisor

Re: How to create boot disk Miroring


After removed the header with the dd command and install the MirrorDisk/UX application i was able to create boot disk miroring.

1) # vgreduce /dev/vg00 /dev/dsk/c2t1d0
2) # pvcreate -f -B /dev/rdsk/c2t1d0
3) # vgextend /dev/vg00 /dev/dsk/c2t1d0
# mkboot -l /dev/rdsk/c2t1d0
4) # lvlnboot -v /dev/vg00
5) # for lvol in lvol1 lvol3 ... lvol12
do
lvextend -m 1 /dev/vg00/$lvol /dev/dsk/c2t1d0
done

Thanks everyone,
Andrew