Veritas-bu

[Veritas-bu] Migrating master from Windows to Solaris (SOLVED)

2003-10-20 10:19:09
Subject: [Veritas-bu] Migrating master from Windows to Solaris (SOLVED)
From: fahnoe AT FahnoeTech DOT com (Larry Fahnoe)
Date: Mon, 20 Oct 2003 09:19:09 -0500
For those interested in such things, here is how I migrated from a
Win2K 3.4.1 master/media server to a Solaris 9 3.4.1 master/media
server.  I must emphasize that this sort of thing is NOT supported by
Veritas.

Environment overview: 
  Master/media - Win2K, voldb host, robot control host
  Media - Solaris 8
  Media - Win2K
  Media - Win2K
  Media - Win2K
  Media - Win2K
  L700 library, shared storage option
  Servers have multiple SAN attachments and some live behind
  firewalls.

Primary goal: migrate to Solaris, use new server name, maintain
catalog data.

Thanks for help along the way: W. Curtis Preston, David Chapa, Jason
Cordes, Scott Kendall, and an unnamed (but quite helpful) engineer at
Veritas.

This is the outline of the procedure I developed and used.  If you
choose to try something like this, think twice about each step and
then again about how to validate each as they are executed.  Again,
this is not a supported (or supportable) process as far as Veritas is
concerned.

1 - Gather SSO configuration data, create tpconfig scripts on media
    servers to reconfigure robot and drives to use a new host.

2 - Add new server to current SSO environment

3 - Find a place to stop backup jobs and get a database backup

4 - Use bprecover to restore Program Files\VERITAS\Netbackup\db to
    /usr/openv/restore/db on new server

5 - Use Media Manager GUI to move all volumes to standalone

6 - Copy Program Files\VERITAS\Volmgr\database\ poolDB ruleDB and
    volDB to /usr/openv/restore/database 

7 - Shut down original master and daemons on the other media
    servers

8 - Shut down daemons on the new master server

** FROM NOW ON ALL STEPS ARE ON NEW MASTER SERVER UNLESS NOTED **

9 - mv /usr/openv/volmgr/database /usr/openv/volmgr/database-save
    mv /usr/openv/restore/database /usr/openv/volmgr

    mv /usr/openv/netbackup/db /usr/openv/netbackup/db-save
    mv /usr/openv/restore/db /usr/openv/volmgr

10 - Convert text files with CR/LF line termination to UNIX format.
     This step requires careful identification of which files should be
     converted.  Here's the list of files I converted:

     volmgr/database/poolDB
     volmgr/database/ruleDB

     netbackup/db/IDIRSTRUCT
     netbackup/db/altnames/*
     netbackup/db/class/*
     netbackup/db/class_template/*
     netbackup/db/client/*
     netbackup/db/config/*
     netbackup/db/error/*
     netbackup/db/failure_history/*
     netbackup/db/images/*
     netbackup/db/jobs/*
     netbackup/db/media/*
     Note: DO NOT CONVERT db/media/mediaDB

     I found a little find script driving dos2unix to be helpful,
     however "dos2unix -437 -ascii FILE FILE" uses /tmp for temporary
     output so be careful of converting files larger than /tmp.

11 - Copy db/Class_att_defs from Solaris install, Win2K uses
     db\class_att_defs which is a different format.

12 - If they are not already in place, create logging directories
     for media manager and netbackup.  I used the following:

     volmgr/debug/daemon
     volmgr/debug/reqlib
     volmgr/debug/tpcommand
     netbackup/logs/admin
     netbackup/logs/bpbrm
     netbackup/logs/bpcd
     netbackup/logs/bpdbm
     netbackup/logs/bpdm
     netbackup/logs/bprd
     netbackup/logs/bpsched
     netbackup/logs/bptm

13 - Update volmgr/vm.conf and netbackup/bp.conf to reflect new server
     names and configuration.

14 - Start media manager (volmgr/bin/ltid)

15 - Use tpconfig to create robot/drives to be on the new master.

     tpconfig -add -robot 0 -robtype tld -robpath /dev/sg/c2t15l1 \
         -vdbhost new-master

     tpconfig -add -drive -type dlt -robot 0 -robtype tld \
         -multihost yes -altname /dev/rmt/3cbn -asciiname stk0-drv1 \
         -index 0 -robdrnum 1

         etc...

16 - Sanity checks for media manager:

     tpconfig -d
     vmpool -listall
     vmquery -a

17 - Stop media manager (netbackup/bin/goodies/bp.kill_all)

18 - Prevent new jobs from running once the server comes up.  I set
     TRIES_PER_PERIOD to 0 in db/config/behavior

19 - Start daemons (/etc/rc2.d/S77netbackup)

20 - Change ownership of images from old to new server:

     bpimage -newserver NewServerName -oldserver OldServerName

21 - Verify catalog searches and restores of data from the new
     server.  If this is working, then test backups from the new
     server.

22 - On Windows media servers, start NetBackup Client Service (bpcd)

23 - Change master server name on all media servers and clients.

     grep SERVER netbackup/bp.conf > servers
     bpclclients -allunique -l | awk '{ print $2 }' > clients
     cat clients | while read cl
     > do echo $cl
     > bpsetconfig -h $cl servers
     > done

24 - Update the SSO environment on the media servers to reflect the
     new robot control host and volume database host.  I used the
     tpconfig scripts I created in step 1 to do this.

25 - Restore TRIES_PER_PERIOD to original value in db/config/behavior.

Finished.  Keep a close eye on the log files!!

The following message from W. Curtis Preston offered the greatest help
and encouragement in my attempting this process.

--Larry

> On Mon, Mar 24, 2003 at 10:56:13AM -0800, W. Curtis Preston commenced 
> mumbling:
> There is an unsupported migration procedure available from Veritas.
> It's REALLY not that hard, and I'm not sure why they make it so hard to
> find.  Steps 1-13 are pretty self-explanatory, and will vary from site
> to site.  They key is step 14, where you use the bpimage command to
> modify the name of the master server in all the image files, and step 15
> where you change all the client's master server name.  (Step 15 would be
> easier to do if you did it if you used bpgp or bpsetconfig to add the
> new master as a media server from the old master, then use bpgp or
> bpsetconfig to make it the master server once it's moved over, but this
> procedure doesn't mention that.)
> 
> 1. Backup everything on the OLD master server.
> 
> 2. Perform an immediate NetBackup database backup from the NetBackup
> Administration GUI on the OLD master server.
> 
> 3. Use the "Media Management" GUI on the OLD master server to move all
> the robotic tape volumes to non-robotic. (Highlight one or more
> mediaIDs, right click, select "move")
> 
> 4. On the OLD master, stop the NetBackup daemons
> (/usr/openv/netbackup/bin/goodies/bp.kill_all) and permanently disable
> them from automatically starting.  (mv /etc/rc2.d/S77netbackup
> /etc/rc2.d/s77netbackup; mv /etc/rc0.d/K77netbackup
> /etc/rc0.d/k77netbackup)  
> 
> NOTE: unless otherwise specified, the following steps should all be
> carried out on the NEW master server.  It is assumed that the NetBackup
> daemons on the OLD master server are now permanently disabled.
> 
> 5. Physically remove the robot and drives from the OLD master server and
> install them on the NEW master server.
> 
> 6. Perform the configuration steps specific to the platform to ensure
> that the newly installed robot and drives are known to the operating
> system after it boots.  In Solaris, for example, this involves booting
> with the -r option, after physical installation of robots and drives on
> the scsi bus. 
> 
> 7. Create the system device files for the drives and the robotic
> control, as required by the specific platform.  Refer to the Media
> Manager Device configuration Guide to get specific information on this
> procedure for each supported platform.
> 
> 8. Install NetBackup on the NEW master server along with whatever
> NetBackup patches are currently installed on the OLD master server.
> After the installation is complete, stop the NetBackup daemons on the
> NEW master server.
> 
> 9. Copy the following from the OLD master server to the NEW master
> server:
> /usr/openv/netbackup/db (directory)
> /usr/openv/volmgr/database/poolDB
> /usr/openv/volmgr/database/volDB
> /usr/openv/volmgr/database/ruleDB
> 
> 
> 10. Start the NetBackup software (e.g. run
> /usr/openv/netbackup/bin/goodies/S77netbackup).
> 
> 11. Modify any defined storage units to refer to the NEW master server.
> 
> 12. Recreate your robot and tape drives using the Device Management GUI.
> 
> 13. Use the "robot inventory" option in the Media Management GUI to
> update the NBU media databases with the proper robotic location of your
> tapes.
> 
> 14. Change ownership of all backup images from the old master server
> name to the new master server name by running the following command:
> 
>    /usr/openv/netbackup/bin/admincmd/bpimage -newserver
> <NEW-master-name>  -oldserver <OLD-master-name>
> 
> 15. Modify the bp.conf file on EVERY host in the NetBackup configuration
> to correct any references to the OLD master server.
> 
> 15. Run backups and restores to verify success.

-- 
Larry Fahnoe, Fahnoe Technology Consulting, fahnoe AT FahnoeTech DOT com
952/925-0744      Minneapolis, Minnesota       www.FahnoeTech.com