Hi all
The situation is as follows:
We need to take an mksysb image from an AIX 6.1 server. From some reason (irrelevant to this discussion) this server does not have access to a local CD-ROM or a tape drive. We do have another server with AIX 6.1 (but different technology level) which got access to a tape device. Both servers are connected through LAN. Can i make an mksysb image from server 1 and - somehow - write it to the tape device of the second server? I need the tape to be bootable that's why i am not just FTPying the mksysb image to the target server.
Any suggestions?
---------- Post updated 10-15-12 at 01:59 AM ---------- Previous update was 10-14-12 at 11:59 AM ----------
Ok everybody i found the solution. For anyone who's searching for this here is the answer:
The scenarios is as follows:
Machine A : We need to take an mksysb image on a tape. The tape should be bootable. The machine does not have access to a tape drive.
Machine B: Does have access to a tape drive and is connected to machine A via LAN.
Procedure:
A bootable tape as a result of mksysb contains 4 records (set of data).
Boot image - should contain all drivers from and for backed up server, so I reccomend to create own image for every backed up server (Doesnt take a lot of time anyway)
mkinsttape image - contains some install data and structure and mountpoints of rootvg
Dummy "Table of Content" record - not used, it is here only for some compatibility reasons
mksysb image - archive of rootvg files - the "core" part of tape
Steps: (our working directory on both servers will be /opt)
Machine A:
Create a bootable image on machine A:
bosboot -ad /dev/rmt0 -b /opt/1_bosboot.img
Mkinsttape image:
mkinsttape /opt/2_mkinsttape.img
mksysb image:
mksysb -e -i -p /opt/4_mksysb.img #### with -e is for exluding files, it is optional only
Notice that the files are named in the order they will be written on the tape.
Copy the three resulting files: 1_bosboot.img, 2_mkinsttape.img, and 4_mksysb.img to machine B via FTP or SCP or whatever method.
Machine B:
Prepare the tape
chdev -l rmt0 -a extfm=yes
Rewind it
tctl -f /dev/rmt0 rewind
Change the block size to 512
chdev -l rmt0-a block_size=512
Rewind it again
tctl -f /dev/rmt0 rewind
Write the first file
dd if=/opt/1_bosboot.img of=/dev/rmt0 bs=512 conv=sync
Rewind the tape
tctl -f /dev/rmt0 rewind
Position the writer to write after the first file:
tctl -f /dev/rmt0.1 fsf 1 ## Notice that we used the non-rewindable device rmt0.1 rather than the normal one rmt0
Write the second file:
dd if=/opt/2_mkinsttape.img of=/dev/rmt0.1 bs=512
Rewind
tctl -f /dev/rmt0 rewind
Position the writer to write after the second file:
tctl -f /dev/rmt0.1 fsf 2
Create and save the dummy TOC to tape (required by bootable tapes):
echo "Dummy tape TOC" | dd of=/dev/rmt0.1 bs=512 conv=sync
Rewind:
tctl -f /dev/rmt0 rewind
Position the writer to write after the third file:
tctl -f /dev/rmt0.1 fsf 3
Write the final file:
dd if=/opt/4_mksysb.img of=/dev/rmt0.1 bs=512
Eject the tape and you're done.