Operating System - HP-UX
1822352 Members
5033 Online
109642 Solutions
New Discussion юеВ

Automated BCV replication

 
SOLVED
Go to solution
Mike Smith_2
Advisor

Automated BCV replication

I'm trying to put together a script to automate EMC BCV replication, and I can make it work the first time, but none after that.

The first run through, the VG for the BCV volumes gets created, mknod creates the group file, vgchgid does its thing, vgimport imports the volumes, vgchange makes it active, vgcfgbackup back up the configuration, fsck checks the filesystem, and it's mounted.

Now, I have a replicated dataset. I want to replicate it again for the next day. So, I umount the filesystem, re-issue the establish command, split it when done, only now I can't seem to get LVM to see them again.

Out of the original process that created everything, what parts of it do I need to tun to mount it again?

TIA

Mike
4 REPLIES 4
James A. Donovan
Honored Contributor

Re: Automated BCV replication

You not only need to unmount your BCV volume group(s), you need to do something like:

# vgchange -a n /dev/vgbcv01
# vgexport /dev/vgbcv01

then you re-establish your STD-BCV pairs. If you don't then the information under /dev/vgbcv01 (or whatever you call your BCV volume group) will be out of sync with reality.

The next day you start the process all over again, by splitting the BCV's, and rebuilding your volume group.
Remember, wherever you go, there you are...
Mike Smith_2
Advisor

Re: Automated BCV replication

Wow, the vgexport command you list effectively deletes it. So, I have re-create the whole thing each time? Hmm.. And they said it was easier...
James A. Donovan
Honored Contributor
Solution

Re: Automated BCV replication

Yes, you have to do it all over again every time. Remeber, when you synchronize your BCV's, it's synchronizing the WHOLE disk, not just the part where your files reside.

This is why you need to issue the vgchgid command, because when you split off the BCV volume that device has the same Volume Group ID as the STD device it had been mirrored with.
Remember, wherever you go, there you are...
Mike Smith_2
Advisor

Re: Automated BCV replication

Right. I understand that part of it. I was just having trouble with the imported nature of the volumes. You'd think that once the physical paths were part of a given volume group, and vgchgid made them viewable, that you should just be able to fsck and mount them.

I guess not...

Thanks.