This is what I have so far
Can you help us understand what your goal is? Are you trying to clone the first system to a new system? Are you trying to make a backup copy of the first system onto a second physical disk that you will store somewhere in case it is needed? Are you just wanting to mirror your first boot disk with a second (mirror) disk (software RAID 1)? Not sure what you want to achieve.
The most common approach for the rootdg is to have just a single rootdg, with two physical disks in the disk group (original boot disk and a spare), and have the second disk be a mirror of the first disk. This is easily done with the vxdiskadm utility. Once completed, you'll have software RAID 1 mirroring of your boot disk with VxVM, and can boot from either disk.
I haven't seen people try to create two rootdg disk groups. Disk group names have to be unique. Only one disk group named rootdg can exist at a time.
I echo the previous query ... what is the purpose ? just testing or want to have additional rootdg for redundancy (safe copy) ?
couple of things which I would say:
1. If redundancy is the goal, you can anyways have two disks as mirrors, still if u want to go one step beyond, you can have 3rd mirror attached in existing rootdg.
2. As fact, there can only be one rootdg in system (unique name for DG), if you create something like "newdg" which just contains a backup of rootdg ... & in future if you want to use this as rootdg, you will need to rename the DG which certainly can happen either during deporting the DG or importing the DG. Imagine you have a system down, would you really like to troubleshoot DG issues or prefer DG rename at that point ? I would prefer to keep one disk spare (with no encapsulation) to boot system safely.
From the procedure you mentioned above, I understand that you would like to edit system files & then try booting via this new DG & volumes .. well I am not sure how that will go but just for a try ..
1. you will need to edit vfstab file to indicate boot volumes from newdg & not rootdg.
2. you will need to change the "bootdg" parameter value ..... vxdctl bootdg newdg (check correct switches or options) ... this will store in volboot file that bootdg is newdg now..
3. /etc/system file should have volume entries for rootvol to boot & not slices entry .. you can give a go & see if system boots (I haven't tried so not sure on results)..
We have a rootdg with 2 disks that are mirrors.
Now the system owner wants a 3rd disk added to the mirror, synced, and broken off. They want to be able to boot from this 3rd disk if something goes horribly wrong, like someone deleting some files. These servers are at remote sites so there is no "boot from cdrom and edit some files" option. Oh, and all this mirror & sync & break needs to be done via a script that runs from cron once a month.
the command "vxrootadm" does exactly what I want (creates another dg and then makes that bootable, iow, there's two dg's, one rootdg and one newrootdg, both are bootable like magic. as per this doc http://www.symantec.com/business/support/index?page=content&pmv=print&impressions=&viewlocale=&id=TE...)
I'm trying to recreate what vxrootadm does. It looks like it mounts the newrootdg on a mointpoint then while mounted creates a link from /mountpoint/dev/vx/dsk/bootdg to /mountpoint/dev/vx/dsk/newrootdg (but somehow I don't think it's that simple)
The only best practices I've run accross so far is to attach the mirror, break it, unencapsulate it and keep it as a native disk not under veritas control. (as per this doc http://www.symantec.com/business/support/index?page=content&id=TECH37532) However, I was hoping for something a little more current.
There used to be a Sun Blueprints document on the web that was written by John S Howard. I believe the name was called Boot Disk Management. And there was a Chapter 5 on setting up a Contingency Disk or Clone Disk of an encapsulated VxVM boot disk. Oracle has removed its availability, though the book can still be purchased. You can search and find some info. Sounds like the Chapter 5 provided all the info you need to do this, including a script.
Here's a link that discusses the procedure, and the book. http://www.tek-tips.com/viewthread.cfm?qid=498144