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

Copying logical volumes from tape

Status
Not open for further replies.

marcmcconnell

Technical User
Apr 19, 2001
25
GB
I have several logical volumes stored on 1 tape. I would like to copy one of these onto a logical volume I have created on my RS6K. I know I have to use the dd command, but how would I copy only 1 logical volume from the tape.

Thanks in advance.
 
I guess the question is how were the tapes made? mksysb, backup, tar, cpio?

if you use the dd...you are not getting the creation of new logical volumes that are functioning..........and how would you know where to stop and start?

I think you are talking about either restoring the logical volumes or.... getting the size of the logical volumes and then creating them on your new disk (under a different name) and then restoring the data to the newly created logical volume?

If they are mksysb

Get sizes of old logical volumeS:
make sure that the tape is rewound. Enter:
tctl -f /dev/rmt0 rewind
Restore the image.data file from the second image of the mksysb tape. Enter:
restore -s2 -xqvf /dev/rmt0.1 ./image.data
------------------------
THEN after you create the new lvs....restore the data?

Restoring individual files from a mksysb tape

1.To restore individual files or directories from a mksysb tape, find out the blocksize of the fourth image. To
obtain this information, run the following commands:

cd /tmp
tctl -f /dev/rmt# rewind (# to be replaced by a number)
chdev -l rmt# -a block_size=512
restore -s2 -xqdvf /dev/rmt#.1 ./tapeblksz
cat ./tapeblksz

The output that is given is the blocksize to which the tape drive was set when the mksysb was made.

2.Next, set the blocksize of the tape drive accordingly by running the following command:

chdev -l rmt# -a block_size=[number in the
./tapeblksz file]

3.Restore the files or directories by running the following commands:

cd / (if the file is to be restored to its original place)
tctl -f /dev/rmt# rewind
restore -s4 -xqdvf /dev/rmt#.1 ./dir/filename (for one file)

OR

restore -s4 -xqdvf /dev/rmt#.1 ./dir (for all files in dir)

----------------------

Perhaps I did not understand your question....but it is based on how the tapes were backed up...........I believe.
 

Thanks for your help,

I have backed up 10 logical volumes onto one tape using the dd command. I have now created 10 new logical volumes on a different machine and would like to restore these 10 logical volumes from tape into the 10 logical volumes on this machine.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top