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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hacking a mksysb...

Status
Not open for further replies.

Chapter11

Technical User
Apr 15, 2002
791
US
I am trying to get a mksysb to restore to a machine, and it's complaining that the target volumes don't have enough space.

(This is AIX 4.3.3 btw)

This has some crazy history behind it, so let me lay it out:

Original install of this OS was on an F50 with a pair of 9G's for rootvg.

I inherited the machine after the previous admin had littered the OS (stuff in /, /usr, and /var) with application-specific cruft, so I cannot merely install a new OS, import a vg and remount filesystems for the application to work. Been there, done that, doesn't work.

A few years ago, I generated a mksysb from that machine, cloned it onto an H80 with a pair of 18G's as rootvg, copied over the rest of the app, and it's been running fine.

The current setup of rootvg on the H80 has rootvg mostly full, but roughly only 1.5G or so is actual OS (the rest is allocated to other LV/filesystems).

Now I need to move that application to another F50 (not the original) that has a pair of 4G's for rootvg.

The process I have been following (and tweaking along the way) is this:

Generate a mksysb on the H80, using excludes to restrict the saved data to just the OS. I've verified that the data saved to the mksysb tape is about 1.5G in size and contains only the actual OS. (I have to dd off the mksysb to disk, ftp it to another machine, and dd it back to a different type of tape, so I know it's about 1.5G).

Boot new F50 from cd, begin system recovery, specify the tape drive (can also boot from the tape, cd is faster). When I get to the point of specifying the disks to restore to, it complains that there is not enough space.

I have hacked up the image.data and bosinst.data files:
1) I tell mksysb not to recreate the image.data
2) I have a save_bosinst.data_file (or whatever the proper filename is) so that my hacked bosinst.data is not rewritten.
3) I have specified in the bosinst.data to target the largest disk on the system (and removed all other target references)
4) I have removed all references to non-OS filesystems from those files. I have also removed mirroring information (and reduced the PP count to match LP count) trying to make sure that my target restore fits within a pair of 4's.

As far as I can tell, I've got 1.5G of data to restore to 8G worth of space. I can't find any other references that tell the mksysb to expect a pair of 18's.

And yet it still expects a huge amount of disk space despite the actual requirements being well within the target capacity.

Anyone have any thoughts? I'm brain-dead on the matter after doing this about 8 times. My next attempt is likely to be yanking one of the 4's out of the F50, connecting it to the H80, mirror the core OS to it (and bosboot it of course), then shove it back in the F50.
 
for anyone who managed to understand that, I think I finally solved it (it's restoring the mksysb anyway).

my mksysb'd paging spaces were too large for the target machine - source machine is beefy with piles of ram and paging, target machine is not so hefty. Have to remember to reduce those in the image.data file.
 
When booting from the mksysb tape or AIX cdrom for the purposes of restoring the system... when you select the "restore from a mksysb" option the next menu has a selection that reads "Shrink Filesystems (Y/N)". If you enter an "N" it should do exactly what you want without having to hack the image.data file.

 
Believe me, I did that, and did it every time I've tried. One of the problem I have with just doing that is that there is a 10G filesystem on the source machine, and even though I have everything in that FS excluded from the generation of the mkssyb via /etc/rootvg.exclude (or exclude.rootvg), a normal cloning process still wants to create that 10G filesystem which doesn't quite fit on a pair of 4G drives. Hence hacking the image.data is necessary.
 
i had to do this once or twice. a real pain, and there are two or three places you have to alter sizing on the hd6 in image.data.

IBM Certified -- AIX 4.3 Obfuscation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top