ADSM-L

Re: [ADSM-L] unloaddb/loaddb (success)

2007-07-05 17:07:17
Subject: Re: [ADSM-L] unloaddb/loaddb (success)
From: Lindström Mikael <Mikael.Lindstrom AT ATEA DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Thu, 5 Jul 2007 22:49:45 +0200
Great work Gill and much appreciated!!

Best regards

Mikael Lindström
System konsult
Direktnr: 08-477 48 12
SMS: 076-10 79 723
mikael.lindstrom AT atea DOT com
Atea
Kronborgsgränd 15
Box 18
164 93 Kista
Växelnr: 08-477 47 00
Faxnr: 08-477 47 01


-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Gill, Geoffrey L.
Sent: den 5 juli 2007 21:43
To: ADSM-L AT VM.MARIST DOT EDU
Subject: [ADSM-L] unloaddb/loaddb (success)

Hi all,

 

I wanted to pass this along since there always seems to be a lot of
questions surrounding how and if it works. My system is AIX 5.3 ML05
running TSM 5.4.0.3. I migrated this system to a new piece of hardware
thinking that my 18% utilized database would need much less space but
found I initially needed to create the larger size and run
unloaddb/loaddb in order to be able to reduce it. Below are my stats run
on a P55A lpar, one CPU assigned, db and logs running on a DS4800 and
dumping to a 3590 Tape drive attached to a 3494. Interestingly enough I
read that this only works with a MANUAL library so I changed everything
thinking I would have to use mtlib commands to mount the tape once the
dsmserv process displayed the mount request. What happened was the 3494
mounted the tape automatically and I had no issues whatsoever.

 

 

Initial database size was 69.6GB 18.5% used.

Unloaddb started at 09:28 and completed at 16:46 - 7 hours 48 minutes.

Loaddb started at 10:15 and completed at 10:58 - 43 minutes.

New database size is 10GB 85.2% used.

 

In case anyone needs commands for this her are mine in the order I used
them. (Hopefully I didn't mess up the order and it all makes sense, if
not please feel free to correct or ask questions) I'm sending this
because I feel like there are certain things everyone could use since,
at least from what I can tell, not all documentation is correct or even
complete or cryptic enough to run (which I hate).

 

1. I recommend migrating all data to tape and then backup the database
in case everything dies. (write down volser in case needed.)

backup db devclass=whateverclass type=full

 

2. determine scratch vol ser q libvol (use volume in number 6)

 

3. verify log empty 

 

4. halt server 

 

5. edit devcnfg and change library to manual (In my case the 3494
mounted the tape anyway.)

 

6. dsmserv unloaddb devclass=3590class volumenames=U04081 >
/tmp/unloaddb.log 2>1 </dev/null &

 

7. mtlib to mount tape in number 6 above. Make sure you specify the
correct rmtx

 

Mounting volume to drive: mtlib -l /dev/lmcp0 -m -f /dev/rmt0 -V U04081

 

Dismounting volume from drive when done: mtlib -l /dev/lmcp0 -d -f
/dev/rmt0

 

8. run loadformat log volumes and db volumes

 

dsmserv loadformat 3 /tsmlog1/log1.dsm /tsmlog1/log2.dsm
/tsmlog1/log3.dsm 5 /tsmdb1/db1.dsm /tsmdb1/db2.dsm /tsmdb1/db3.dsm
/tsmdb1/db4.dsm /tsmdb1/db5.dsm

 

9. loaddb ( get tape number from step 2 and put here.

dsmserv loaddb devclass=3590CLASS VOLumenames=U04081 > /tmp/loaddb.log
2>1 < /dev/null &

 

10. Start TSM 

 

Stop here and q db once the system is started. You will be able to tell
how much you can reduce the db and redo your dbvolumes if you'd like.
Continue below (11) if that is your choice or just shrink the database
and you're done.

 

11. You can either run a dbbackup before you continue and restore that
to the new database or you can run loaddb again after reassigning disk,
which is what I did. In my case I just ran loaddb again since it was so
quick.

 

12. halt TSM

 

13. Depending on the OS do what is necessary to recreate your database
volumes. After this is done remove the disk and recreate it.

 

14. restore db or start at step 8 again after you use dsmfmt to create
the db and logs. (Maybe not necessary if running dsmfmt new db and logs
but I am not completely sure. In my case it only added 2 minutes to the
process so I wasn't going to waste time running loaddb to see if it
would work or fail.)

 

15. edit devcnfg and change library back to 349X (Again, since the tape
mounted automatically anyway I'm not sure step 5 was even necessary.)

 

16. Start TSM

 

Geoff Gill 
TSM Administrator 
PeopleSoft Sr. Systems Administrator 
SAIC M/S-G1b 
(858)826-4062 
Email: geoffrey.l.gill AT saic DOT com 

 

<Prev in Thread] Current Thread [Next in Thread>