8.3.2 Using Restore to
Verify a Tape
User data in rootvg is stored with mksysb depending on what file systems you have mounted at the time of the execution of the command and the contents of the /etc/exclude.rootvg file. Alternatively, you can use the tar, cpio, dd, or backup commands to save user files, directories, and file system.
Since the mksysb command only backs up rootvg, in order to save user volume groups, use the savevg command. Refer to Figure 99 to see the flow of the savevg command. The volume group you are trying to save must be varied-on, and the file systems must be mounted. All logical volume information in the volume group is archived and will be recreated. However, only JFS mounted file system data will be archived. Raw logical volume data will not be archived using the savevg command. In order to save a raw logical volume use the dd command and proceed with the following sequence of steps to save your raw logical volumes:
tctl -f /dev/rmtxx status
chdev -l rmtxx -a block_size=<tape block size>
dd if=/dev/lvname of=/dev/rmtxx ibs=512 obs=<tape block size>
This will create a back up of the raw logical volume on the tape.
If you use the savevg command to save a rootvg the only difference between a mksysb image and an savevg image is that the mksysb command creates the bos/install images and places them on the tape to create a bootable/ installable tape. A savevg image is not capable of being installed directly.
Generally, the problems encountered during verification or restoration of data on your system are related to incompatibility of block sizes between your drive and tape. You can use several methods to determine the block size of the data that was written on a tape. Following are a few methods to find out the block size:
Use dd command to read a single block from the device and find out what is the block size used for the archive:
dd if=/dev/rmtxx bs=128k count=1 | wc -c
This will return to you the size in bytes of the block being read. Assuming that your backup was made with the same physical block size, you can change your device to use this block size.
Use tcopy command as follows to find out the block size.
#tcopy /dev/rmtxx tcopy : Tape File: 1; Records: 1 to 7179 ; size:512 tcopy : Tape File: 1; End of file after :7179 records; 3675648 bytes tcopy : Tape File: 2; Records: 1 to 2900 ; size:512 tcopy : Tape File: 2; End of file after 2900 records, 76890 bytes ...
This will give you a list of all the files found on the media with their byte count, the block size used and the total number of records for each individual file.