02/28/96, 4FAX# 4510 How to Alter/Restore a Missing .fs.size File SPECIAL NOTICES Information in this document is correct to the best of our knowledge at the time of this writing. Please send feedback by fax to "AIXServ Information" at (512) 823-4009. Please use this information with care. IBM will not be responsible for damages of any kind resulting from its use. The use of this information is the sole responsibility of the customer and depends on the customer's ability to eval- uate and integrate this information into the customer's operational environment. ABOUT THIS DOCUMENT This .fs.size file is used by the mksysb (system backup) command to create logical volumes and filesystems when restoring from a backup This fax describes how to alter or restore a missing .fs.size file when restoring a mksysb tape. This document applies to AIX 3.2 and 4.1. You must know the names of the filesystems and logical volumes and the sizes if you are creating a .fs.size file from scratch. RECOVERY OF THE .FS.SIZE FILE FOR AIX 3.2 The general sequence is: 1. Boot from some bootable media (usually the mksysb tape). 2. Use the echo command to create a corrected .fs.size file on the ram disk. | 3. Create a temporary restbyname or pax command that will | get the .fs.size file from the ram disk instead of the | tape drive. 4. Restore the mksysb tape normally. Recovery 1. Boot the machine to maintenance mode using the mksysb tape or other boot media. If not booted from the mksysb tape, place it in the tape drive now. 2. Enter the limited function maint shell. DO NOT do getrootfs. (choice #4 on the menu) In 4.1, you will need to select 'start maintenance mode' from the welcome menu, then from the maintenance menu select 'advanced maintenance mode' and from there enter the limited function maintenance shell. NOTE: Be careful to not use any control sequences like control C or control D while in the limited shell. If How to Alter/Restore a Missing .fs.size File 1 02/28/96, 4FAX# 4510 this occurs, subshell could be broken and you will not be able to return to the menu. 3. Use the echo command to create the .fs.size file like the sample shown below, in the /mnt directory. The .fs.size file consists of one line with "imageinstall" followed by 1 line for each filesystem to be created. the format is: volume group name (rootvg) PP size (in Mbytes) for the logical partition (usually 4 on smaller disks) the logical volume name (like hd4) the number of logical partitions for that lv the total space used (PP size times # of logical partitions) filesystem type (jfs) Sample: cd /mnt echo 'imageinstall rootvg 4 hd4 / 4 16 jfs rootvg 4 hd1 /home 35 140 jfs rootvg 4 hd3 /tmp 5 20 jfs rootvg 4 lv03 /tools 2 8 jfs rootvg 4 lv04 /top20 1 4 jfs rootvg 4 lv02 /u/pmp 1 4 jfs rootvg 4 hd2 /usr 56 224 jfs rootvg 4 lv00 /usr/vice/cache 4 16 jfs rootvg 4 hd9var /var 4 16 jfs rootvg 4 lv05 /work 90 360 jfs' >/mnt/.fs.size 4. Use: cat /mnt/.fs.size, to examine the file and compare it to to the sample file. | Depending upon the level of AIX 3.2 that you BOOT from | you will replace EITHER /usr/sbin/restbyname OR | /bin/pax. AIX 3.2.3e and before used the pax command to | recover the .fs.size file and 3.2.5 and above, use the | restbyname command. Depending upon your level of AIX | 3.2.4, the mksysb command may be using EITHER the pax or | the restbyname command. You will have to determine via | several trys which command is used in your version. Try | steps 8, 9 & 10 first. If the problem remains, try it | again with steps 5, 6 & 7, or boot with a level of AIX | where the command used is known. | Prior to 3.2.4: | 5. cd /bin | 6. cp pax pax.good | 7. echo '/bin/cp /mnt/.fs.size /.fs.size | /bin/cp /bin/pax.good /bin/pax' >/bin/pax | Go to step 11. | 3.2.5 or later release: How to Alter/Restore a Missing .fs.size File 2 02/28/96, 4FAX# 4510 | 8. cd /usr/sbin 9. cp restbyname restbyname.good 10. echo '/bin/cp /mnt/.fs.size /.fs.size /bin/cp /usr/sbin/restbyname.good /usr/sbin/restbyname' >restbyname NOTE: The command listed above should be typed as shown above with a new line between the first and second lines. 11. To exit the maint shell: exit NOTE: If you do not return to the shell, reboot and repeat the steps above. Take caution and do not use any control characters. 12. Select restore from the mksysb RECOVERY FOR .FS.SIZE.FILE FOR AIX 4.1 These steps describe installing from mksysb and altering the image.data file. If the system that the backup was created on is still viable: 1. Backup a copy of the image.data file on the system and make the required changes to the backup copy. 2. Place the altered image.data file in a directory. 3. Create a second file in the directory and name it 'sig- nature'. This file should contain a single one line entry with the word 'data' starting in line one, column one. 4. Backup the two files to diskette with the following command: find . -print | backup -ivf /dev/fd0 Run this command from the directory containing the two files. 5. Verify that the files are on the diskette with the fol- lowing: restore -Tvf /dev/fd0 This should show only the two files on the diskette in relative backup format; ./image.data and ./signature. 6. Boot the system to be installed with the diskette in the diskette drive and the mksysb tape in the tape drive. How to Alter/Restore a Missing .fs.size File 3 02/28/96, 4FAX# 4510 The install process will read and use the image.data file on the diskette instead of the one on the backup media. If the system that the backup was created on is no longer viable, you can copy the image.date file on the backup tape with the following commands: | tctl -f /dev/rmt0 rewind | restore -s4 -xvf /dev/rmt0.1 ./image.data restore -s4 -xvf /dev/rmt0.1 ./image.data NOTE: You can build this diskette from either 3.2 or 4.1. The backup command at 3.2 is compatible with 4.1. The following stanza is an example IF you need to modify /usr filesystem. You will need to modify the lv_data and the fs_data that corresponds to the filesystem you need to change. lv_data: VOLUME_GROUP= rootvg LV_SOURCE_DISK_LIST= hdisk1 hdisk0 LV_IDENTIFIER= 00015772dc0c2dbd.5 LOGICAL_VOLUME= hd2 VG_STAT= active/complete TYPE= jfs MAX_LPS= 512 COPIES= 1 LPs= 78 STALE_PPs= 0 INTER_POLICY= minimum INTRA_POLICY= center MOUNT_POINT= /usr MIRROR_WRITE_CONSISTENCY= on LV_SEPARATE_PV= yes PERMISSION= read/write LV_STATE= opened/syncd WRITE_VERIFY= off PP_SIZE= 4 SCHED_POLICY= parallel "**" PP= 78 BB_POLICY= relocatable RELOCATABLE= yes UPPER_BOUND= 32 LABEL= /usr MAPFILE= LV_MIN_LPS= 76 fs_data: FS_NAME= /usr "**" FS_SIZE= 638976 (this is in 512-blocks) NOTE: 8192 512-blocks =4M FS_MIN_SIZE= 619080 FS_LV= /dev/hd2 FS_FS= 4096 FS_NBPI= 4096 FS_COMPRESS= no Note: Fields marked with "**" are where you will increase/decrease. Note also that the PP_SIZE field is 4M in this example. For example, if you increase the How to Alter/Restore a Missing .fs.size File 4 02/28/96, 4FAX# 4510 LPs and PP fields by 10 the /usr will increase by 40m and you would need to increase the FS_SIZE field to 81920. 7. Alter the image.data file and follow the step from "boot the system" above. How to Alter/Restore a Missing .fs.size File 5 02/28/96, 4FAX# 4510 READER'S COMMENTS Please fax this form to (512) 823-4009, attention "AIXServ Informa- tion". You may also e-mail comments to: elizabet@austin.ibm.com. These comments should include the same customer information requested below. Use this form to tell us what you think about this document. If you have found errors in it, or if you want to express your opinion about it (such as organization, subject matter, appearance) or make sug- gestions for improvement, this is the form to use. If you need technical assistance, contact your local branch office, point of sale, or 1-800-CALL-AIX (for information about support offer- ings). These services may be billable. Faxes on a variety of sub- jects may be ordered free of charge from 1-800-IBM-4FAX. Outside the U.S. call 415-855-4329 using a fax machine phone. When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any way it believes appropriate without incurring any obligation to you. NOTE: If you have a problem report or item number, supplying that number may help us determine why a procedure did or did not work in your specific situation. Problem Report or Item #: Branch Office or Customer #: Be sure to print your name and fax number below if you would like a reply: ______________________________________________________________________ END OF DOCUMENT (fix.fs.size.file.bak, 4FAX# 4510) How to Alter/Restore a Missing .fs.size File 6