Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NIM: Initiate mksysb create from client???

64 views
Skip to first unread message

Manfred Durban

unread,
Apr 28, 2004, 4:51:00 AM4/28/04
to
Hi!

Is there any way to initiate a mksysb-archive creation from the client.
Something like "nimclient -o create_archive...."

The reason is, that I want to be NIM-Master independent for
imagecreation. In other words: I want the client to create an image and
place it on some NFS-Server - without using the NIM-Master.

Any help?

Thx,
Manfred

Dan Foster

unread,
Apr 28, 2004, 6:10:51 AM4/28/04
to

On the client, make a file, eg: /usr/local/bin/mksysb.local:

#!/bin/sh

mount /images
mksysb -e -i -X /images/`hostname`.mksysb > /images/`hostname`.log 2>&1
umount /images

(where /images is a mount point on the client, representing the mount
from the NFS server, and is defined in /etc/filesystems for NFS server
and pathname on server)

NIM not needed. I use this in a script called by cron for once a week
backups or by hand as needed.

-Dan

Manfred Durban

unread,
Apr 28, 2004, 7:16:03 AM4/28/04
to
Dan Foster wrote:
> On the client, make a file, eg: /usr/local/bin/mksysb.local:
>
> #!/bin/sh
>
> mount /images
> mksysb -e -i -X /images/`hostname`.mksysb > /images/`hostname`.log 2>&1
> umount /images
>
> (where /images is a mount point on the client, representing the mount
> from the NFS server, and is defined in /etc/filesystems for NFS server
> and pathname on server)
>
> NIM not needed. I use this in a script called by cron for once a week
> backups or by hand as needed.
>
> -Dan

Hi Dan!

Thx for your help!

I found another solution:

I run on the client (has to have a NIM-Client installed):
/usr/lpp/bos.sysmgt/nim/methods/c_mkbosi -aserver=nfsserver
-alocation=/directory/image -mksysb_flags=X

All you have to do, is give the client access to the NFS-Share (in my
case a LINUX box - yeaah ;) )... works fine for me!

How do you restore the mksysb??? Also without NIM?

Thnx for yor help!

--Manfred

Dan Foster

unread,
Apr 28, 2004, 8:47:41 AM4/28/04
to
In article <TnMjc.536$gP...@news.cpqcorp.net>, Manfred Durban <manni....@myskoda.de> wrote:
> All you have to do, is give the client access to the NFS-Share (in my
> case a LINUX box - yeaah ;) )... works fine for me!

Great!

> How do you restore the mksysb??? Also without NIM?

Well, that's the nice thing about mksysb images. :) You can restore it
from tape, CD, DVD, or NIM.

To burn a mksysb image file to CD or DVD, use the mkcd command with
proper options.

There is a little more work to do it to tape in this kind of setup but
it's still easy.

Or you can adjust the NIM client profile to use the mksysb image for an
install (restore install).

-Dan

Tom Van Overbeke

unread,
Apr 29, 2004, 4:46:09 AM4/29/04
to
Hi,

I am interested how you transfer an mksysb (that was written to disk) to
tape (in a bootable form).
somehow you would need to recreate the exact tape format (bootloader,
bosinst.data etc, empty block, and then the actual backup).
Is there a procedure that describes this somewhere. I was on a AIX course a
few months ago, and the teacher was unable to answer.

gr,

tom.


"Dan Foster" <use...@evilphb.org> wrote in message
news:slrnc8v9v0...@gaia.roc2.gblx.net...

Stephane GASSIES

unread,
May 3, 2004, 12:26:30 PM5/3/04
to

Here is a tool you can use to re-create a boottable tape from a mksysb file.

1) have the "mksysb-generated" file on one server of the same
hardware & sofware as the one to restore (same server is better).

# Start of script (call it as you want e.g. mk_sysb_tape)
#!/usr/bin/ksh

if [[ "H$1" = H-x ]] then
extract=1
shift
else
extract=0
fi

if [[ "H$1" = H+e ]] then
eject=0
shift
else
eject=1
fi

TAPE=${2:-rmt0}

if [[ ! -f $1 || ! -r $1 || ! -w /dev/$TAPE.1 ]] then
echo "Usage: $0 [-x] [+e] mksysb_file [tape drive]"
exit 1
fi

Rc=0

# If asked, get /image.data and /bosinst.data
if (( $extract == 1 )) then
cd /
restore -xqvf $1 ./image.data || Rc=1
(( Rc == 0 )) && { restore -xqvf $1 ./bosinst.data || Rc=2; }
cd $OLDPWD
fi

# boot waiting a block_size of 512, we set it to 512 if not the case
Bl=$(lsattr -EL $TAPE -a block_size -F value)
if (( $Bl != 512 )) then
Bl_change=1
chdev -l $TAPE -a block_size=512
else
Bl_change=0
fi

# Here we go
(( Rc == 0 )) && { bosboot -a -d /dev/$TAPE.1 || Rc=3; }
(( Rc == 0 )) && { mkinstape /dev/$TAPE.1 || Rc=4; }
(( Rc == 0 )) && {
echo "Dummy tape TOC" | dd of=/dev/rmt0.1 bs=512 conv=sync || Rc=5; }
(( Rc == 0 )) && { dd if=$1 of=/dev/$TAPE bs=1024 conv=sync || Rc=6; }


(( Rc == 0 && eject == 1 )) && mt -f /dev/rmt0 rewoffl


# Restore original block_size if changed
(( Bl_change == 1 )) && chdev -l $TAPE -a block_size=$Bl

exit $Rc

# End of script

Examples of use

mk_sysb_tape /mksysb_backup_dir/mksysb_backup_file rmt1
mk_sysb_tape -x /mksysb_backup_dir/mksysb_backup_file

OBS: Thanks to a IBM guy (whom I forgot the name) for writing the
original scriptt.

Hope this will help.
Regards,
Stephane


--
Ce message a ete poste via la plateforme Web club-Internet.fr
This message has been posted by the Web platform club-Internet.fr

http://forums.club-internet.fr/

0 new messages