Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"bosboot: Boot image is 22132 512 byte blocks" on mksysb

Status
Not open for further replies.

billy1

Technical User
Sep 16, 2002
73
IE
I am trying to do a weekly backup mksysb -i on an AIX 5.2 and keep getting the following error message.


bosboot: Boot image is 22132 512 byte blocks.

The tape is being loaded and there is the following space on /tmp

clukua02(root)/>bosboot -q -a -d /dev/rmt0

Filesystem KB required
/tmp 22824
clukua02(root)/>df -k /tmp
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd3 262144 233768 11% 1145 2% /tmp
clukua02(root)/>

How can I check the block size that I am currently using?

Thanks.
 
To know the block size try the command:

lsattr -El rmt0

Regards,
Khalid
 
bosboot: Boot image is 22132 512 byte blocks."

Error message???

That is normal output of the bosboot command, which is being run because you're making a bootable tape. So mksysb invokes bosboot to create a bootable image to put on the tape as the first tapefile.

What exactly is not working?


HTH,

p5wizard
 
Yes but within a backup script where I have standard error "2" going to a file this is going to that file.

i.e.
clukua02(root)/>more stderr.out

bosboot: Boot image is 22132 512 byte blocks.

So within an if statement to check if there is something in this file it is picking this up as an error and reporting backup failure when there is none, I thought this output would be 1 standard out and not standard error?

Thanks,
 
Show (part of) your script please?
Also: which AIX version?

I tried the bosboot command by itself. stdout shows the number of blocks message. stderr is empty...

[tt]# bosboot -a -d /dev/hdisk0 -l /dev/hd5 >/tmp/bosboot.out 2>/tmp/bosboot.err
# cd /tmp
# ls -l bosb*
-rw-r--r-- 1 root system 0 13 feb 16:21 bosboot.err
-rw-r--r-- 1 root system 46 13 feb 16:21 bosboot.out
# cat bosboot.err
# cat bosboot.out

bosboot: Boot image is 21234 512 byte blocks.
[/tt]


HTH,

p5wizard
 
AIX is 5.2

The relevant lines from the script are
#set -n
# Debug on/off
set -x
# Debug on/off

LOGDIR=/products/icon/icon_sys/logs # Log directory
FILESWRITTEN=$LOGDIR/fileswritten.`date +%d%m%Y` # Fileswritten
ERRORLOG=$LOGDIR/backup_error.`date +%d%m%Y`.log # Error log
FILES_ON_BACKUP=$LOGDIR/files_on_backup.`date +%d%m%Y` # Files on backup (verif
y)
BACKUPDEV=/dev/rmt0 # Backup device
BACKUPCOMMAND="mksysb -i " # Backup command
VERIFYCOMMAND="listvgbackup -f " # Verify command

###############################################################################

> $FILESWRITTEN
> $ERRORLOG
> $FILES_ON_BACKUP

###############################################################################

echo "Starting MKSYSB backup `date`\n" >> $1

$BACKUPCOMMAND $BACKUPDEV 1>>$FILESWRITTEN 2>>$ERRORLOG

if [ $? != 0 ]
then
echo "MKSYSB command failed `date`\n" >> $1
cat $ERRORLOG >> $1
exit 1
fi

echo "Completed MKSYSB backup `date`\n" >> $1

if [ -s $ERRORLOG ]; then
echo "Errors detected in backup error log `date`\n" >> $1
cat $ERRORLOG >> $1
exit 1
fi

echo "Compressing current fileswritten log\n" >> $1

compress $FILESWRITTEN

tctl -f /dev/rmt0.1 fsf 3

echo "Starting verify of MKSYSB `date`\n" >> $1

$VERIFYCOMMAND $BACKUPDEV.1 >> $FILES_ON_BACKUP 2>&1

if [ $? != 0 ]
then
echo "Listvgbackup of MKSYSB failed `date`\n" >> $1

exit 1
fi

tctl -f /dev/rmt0 offline

compress $FILES_ON_BACKUP

echo "Completed verify of MKSYSB `date`\n" >> $1

exit 0






I actually tried this yesterday I did two things

1/ mksysb -i to screen and got the following clukua02(root)/>mksysb -i /dev/rmt0

Creating information file (/image.data) for rootvg.

Creating tape boot image.....
bosboot: Boot image is 22132 512 byte blocks.


Creating list of files to back up...
Backing up 67479 files..............................
15378 of 67479 files (22%)..............................
41818 of 67479 files (61%)..............................
64725 of 67479 files (95%).....
67479 of 67479 files (100%)
0512-038 mksysb: Backup Completed Successfully.

bosboot: Boot image is 22132 512 byte blocks.
clukua02(root)/>


2/
Then I did it the way you did and got the following in the files


clukua02(root)/>more stderr.out

bosboot: Boot image is 22132 512 byte blocks.
clukua02(root)/>
clukua02(root)/>more std.out

Creating information file (/image.data) for rootvg..

Creating tape boot image.....

Creating list of files to back up..
Backing up 67483 files..............................
13829 of 67483 files (20%)..............................
40655 of 67483 files (60%)...........
0512-007 mksysb: Abnormal program termination.

clukua02(root)/>

Thanks a mill
 
I checked some more: it's the way the mksysb script was written:

[tt]
...
if [ -z "$BACKUPFILE" ]
then
${bosboot} -d$device -a $KERNEL > $BOSBOOT_LOG 2>&1
rc="$?"
[red]${cat} $BOSBOOT_LOG >&2[/red]
else
...
[/tt]

it traps the output/error of bosboot and throws the combined output onto the stderr of the mksysb process.

So you'll have to live with it.

it's probably better to trap the exit code of mksysb in your script and decide based on that exit code.


HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top