Showing results for 
Search instead for 
Did you mean: 

how to create two usable rootdg's? (without vxrootadm)


I'm looking for some best practices for creating a second bootable rootdg on one system.  The command "vxrootadm" is exactly what I'm looking for, however this command is only available from  vxvm 5.0 MP3 and we are running 5.0 MP1 on solaris
So far this is what I have :
1) Add a free disk to rootdg and initialise as sliced
2) Use vxrootmir to mirror the rootdisk onto the new disk (since this will invoke "installboot"
           OR            use vxassist snapstart ? (but then installboot will have to be run after the fact?)
3) Break this disk off using vxassist dis(assotiate)
4) Create a new dg and volumes using the plexes that were disassociated (and vxvol start) , possibly fsck ?
5) Create a devalias for the dg
6) Boot from the new devalias
I'm a little rusty on how to do all of these so any help would be appreciated
6 Replies

This is what I have so

This is what I have so far



#add a disk
vxdg -g rootdg adddisk rootdg01-snap=c1t2d0s2
#create mirror (only for rootvol and the creation of installboot, and eeprom devalias creation)
vxdg -g rootdg adddisk rootdg01-snap=c1t2d0s2
#create mirrors for other volums
vxassist -g rootdg mirror var rootdg01-snap layout=contig,diskalign
vxassist -g rootdg mirror swapvol rootdg01-snap layout=contig,diskalign
#save the config
vxprint -hmQq -g rootdg rootvol-03 swapvol-03 var-03 > /tmp/voldeftemp
#disassociate the plexes from rootdg
vxplex -g rootdg dis rootvol-03 swapvol-03 var-03
#remove the definitions from the rootdg (this preserves data, apparently)
vxedit -g rootdg -r rm rootvol-03 swapvol-03 var-03
#remove the disk from rootdg
vxdg -g rootdg rmdisk rootdg01-snap
#create a new dg
vxdg init newdg rootdg01-snap=c1t2d0s2 cds=off
#remake plexes from saved config 
vxmake -g newdg -d /tmp/voldeftemp
# Create volumes (with already created plexes)
vxmake -g newdg -U root vol rootvol plex=rootvol-03
vxmake -g newdg -U swap vol swapvol plex=swapvol-03
vxmake -g newdg -U fsgen vol var plex=var-03
# start volumes (since everything in newdg shows as DISABLED EMPTY)
vxvol -g newdg -f start rootvol var swapvol
#try to mount a volume  (success)
mount /dev/vx/dsk/newdg/var /mnt
next step --- edit files ? which files ? boot ?

Trying To Understand

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 ...

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

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

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  However, I was hoping for something a little more current.



Why not simply upgrade your

Why not simply upgrade your installation?

5.0 MP1 to MP3 is just a patch...


Sun Blueprints Doc Boot Disk Management John S Howard

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.