Hello all,
I receved many responses and the issue has been successfully resolved.
My original post was (with the suggestions I used interspersed):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hello all,
I am setting up a backup schedule for several Sun Ultra Enterprise 2's.
All are on 2.5.1, have 200 mhz processors, 128 MB RAM, 2-4.2 gb hard drives,
and 8mm 8705DX tape drives. I have read all the man pages & answerbooks &
came up with the following:
I am trying to get the proper parameters to use for ufsdump (i.e.
blocking factor). I checked at docs.sun.com and they recommend using:
mt -f /dev/rmt/0 status
I tried this and got the following response from 2 of the machines:
mail% mt -f /dev/rmt/0 status
Exabyte EXB-8500 8mm tape drive:
sense key(0x0)= No Additional Sense residual= 0 retries= 0
file no= 0 block no= 0
-->This is the typical response that you get from 2.5.1 with the 8705DX, but
it works fine anyway, one person gave me suggestions and a web site
http://www3.hmc.edu/docs/coolstuff/tapes ) to correct this to read 8705DX,
but many people siad they are using the same equipment with the same
response, and are able to backup/restore with no problems so I left this be.
mail% mt -f /dev/rmt/0 retension
/dev/rmt/0 retension 1 failed: Inappropriate ioctl for device
www% mt -f /dev/rmt/0 status
mt: Inappropriate ioctl for device
www% mt -f /dev/rmt/0 retension
/dev/rmt/0 retension 1 failed: Inappropriate ioctl for device
I could not locate what the ioctl was (input/ouptut control???) or how
this affects what I am doing. Does this tell me I do not have proper
connectivity with the tape drives?
--> Turns out that the tape drives were not properly set up from the start.
There were no entries in /dev/rmt. I verified connections on all machines,
did an init 0, then a boot -a. This fixed all of these errors.
Also, I am writing scripts to submit to cron to make incremental dumps
daily, they are (for the level 0 dumps):
www% more dump0
#!/bin/sh
# dump /, /usr, /var, /export/home, /opt, /usr/openwin, /web
mt -f /dev/rmt/0 rew
/usr/lib/fs/ufs/ufsdump 0bdfu 50 54000 /dev/rmt/0 /dev/dsk/c0td0s0
/usr/lib/fs/ufs/ufsdump 0bdfu 50 54000 /dev/rmt/0 /dev/dsk/c0td0s6
/usr/lib/fs/ufs/ufsdump 0bdfu 50 54000 /dev/rmt/0 /dev/dsk/c0td0s4
/usr/lib/fs/ufs/ufsdump 0bdfu 50 54000 /dev/rmt/0 /dev/dsk/c0td0s7
/usr/lib/fs/ufs/ufsdump 0bdfu 50 54000 /dev/rmt/0 /dev/dsk/c0td0s5
/usr/lib/fs/ufs/ufsdump 0bdfu 50 54000 /dev/rmt/0 /dev/dsk/c0td0s3
/usr/lib/fs/ufs/ufsdump 0bdfu 50 54000 /dev/rmt/0 /dev/dsk/c0td1s6
--> Everyone pointed out my error here, I have to use /dev/rmt/0n so as not
to rewind the tape between dumps and overwriting what I had backed up, and
to use the blocking factor 126.
# filesystem per df -k
# /dev/dsk/c0t0d0s0 48727 13139 30718 30% /
# /dev/dsk/c0t0d0s6 482023 370902 62921 86% /usr
# /proc 0 0 0 0% /proc
# fd 0 0 0 0% /dev/fd
# /dev/dsk/c0t0d0s4 106159 8128 87421 9% /var
# /dev/dsk/c0t0d0s7 2700437 350399 2079998 15% /export/home
# /dev/dsk/c0t0d0s5 336871 202448 100743 67% /opt
# /dev/dsk/c0t0d0s3 139735 105545 20220 84% /usr/openwin
# /dev/dsk/c0t1d0s6 3939604 1110200 2435444 32% /web
# swap 198752 40 198712 1% /tmp
Any advice on this would be very appreciated, and I will summarize.
Thanks!!!
Michael
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Some sent me scripts which verified the date, and ran the proper level dump.
I will be implementing this in the future, but for now, here is my final
script (again, level 0) & the cron job to run it; I use 3 scripts total (one
for each level dump I want to perform):
+++++++++++++++++++++++++++++++++++++++++++++++++++
view2s% cat dump0*
#!/bin/sh
# LEVEL 0 DUMP SCRIPT FOR VIEW 2 SECONDARY
# dump /, /usr, /var, /export/home, /opt, /usr/openwin, /u1
# rewind the tape
mt -f /dev/rmt/0 rew
# backup /
/usr/lib/fs/ufs/ufsdump 0bfu 126 /dev/rmt/0n /dev/dsk/c0t0d0s0
# backup /usr
/usr/lib/fs/ufs/ufsdump 0bfu 126 /dev/rmt/0n /dev/dsk/c0t0d0s6
# backup /var
/usr/lib/fs/ufs/ufsdump 0bfu 126 /dev/rmt/0n /dev/dsk/c0t0d0s4
# backup /export/home
/usr/lib/fs/ufs/ufsdump 0bfu 126 /dev/rmt/0n /dev/dsk/c0t0d0s7
# backup /opt
/usr/lib/fs/ufs/ufsdump 0bfu 126 /dev/rmt/0n /dev/dsk/c0t0d0s5
# backup /usr/openwin
/usr/lib/fs/ufs/ufsdump 0bfu 126 /dev/rmt/0n /dev/dsk/c0t0d0s3
# backup /u1
/usr/lib/fs/ufs/ufsdump 0bfu 126 /dev/rmt/0n /dev/dsk/c0t1d0s0
# rewind & eject tape
mt -f /dev/rmt/0 offline
# view2s% df -k
# Filesystem kbytes used avail capacity Mounted on
# /dev/dsk/c0t0d0s0 115927 13002 91335 13% /
# /dev/dsk/c0t0d0s6 1348566 235739 977977 20% /usr
# /proc 0 0 0 0% /proc
# fd 0 0 0 0% /dev/fd
# /dev/dsk/c0t0d0s4 241543 15110 202283 7% /var
# /dev/dsk/c0t0d0s7 518839 22589 444370 5% /export/home
# /dev/dsk/c0t0d0s5 1348566 43494 1170222 4% /opt
# /dev/dsk/c0t0d0s3 241543 105545 111848 49% /usr/openwin
# /dev/dsk/c0t1d0s0 3939604 1134652 2410992 33% /u1
# swap 199904 8 199896 1% /tmp
+++++++++++++++++++++++++++++++++++++++++++++++++++
view2s% cat /var/spool/cron/crontabs/root
#ident "@(#)root 1.12 94/03/24 SMI" /* SVr4.0 1.1.3.1 */
#
# The root crontab should be used to perform accounting data collection.
#
# The rtc command is run to adjust the real time clock if and when
# daylight savings time changes.
#
0 2 * * 0,4 /etc/cron.d/logchecker
5 4 * * 6 /usr/lib/newsyslog
15 3 * * * /usr/lib/fs/nfs/nfsfind
1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1
# Perform a level 0 dump on the first day of every month
30 2 1 * * /usr/local/adm/bin/dumps/dump0_v2s.scr
# Perform a level 5 dump every monday thru thursday at 3am
0 3 * * 1,2,3,4 /usr/local/adm/bin/dumps/dump5_v2s.scr
# Perform a level 3 dump every friday at 3am
0 3 * * 5 /usr/local/adm/bin/dumps/dump3_v2s.scr
+++++++++++++++++++++++++++++++++++++++++++++++++++
Many thanks to the responders, my backups are running great now!!!
Michael Cook
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:37 CDT