Operating System - HP-UX
1836779 Members
2505 Online
110109 Solutions
New Discussion

Tape problem: restoring a file

 
Jeff Hagstrom
Regular Advisor

Tape problem: restoring a file

I have tape drive(dds 3 tapes) that I have backed up a database. The database is 10 gig in size, however th log said that it used 2.5 gig of media. Is there something in HPUX 11i that limits the size of the file on the box or something to do with the tape. When I go to restore the database on the tape it asks for another volume. I used the same tape on another 9000 box and restored the database with out any problems. It never asked for a second volume.
7 REPLIES 7
RAC_1
Honored Contributor

Re: Tape problem: restoring a file

How did you back it up??

tar/pax/cpio is restricted to 2gb. with certain patches, it goes upto 8GB.

Also your file systems needs to support the large files. (greater than 2GB)
mount -p will show you that, if not you need to enable the large files support.

fsadm -o largefiles /dev/vgxx/lvolx

Anil
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor

Re: Tape problem: restoring a file

When you don't bother to identify your backup/restore software, it's difficult to help.

The first thing that I would do is make sure that largefiles are enabled in this/these filesystem(s). It is quite possible that only 2.5GB of data were actually written for a 10GB database because the files might be quite sparse.
If it ain't broke, I can fix that.
Jeff Hagstrom
Regular Advisor

Re: Tape problem: restoring a file

All of our filesystems are set to large files NO. How do I set all the filesystems to large files YES?
Sanjay_6
Honored Contributor

Re: Tape problem: restoring a file

Hi Jeff,

Take a look at this thread on how to convert the filesystem for largefiles=yes

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063210890

The itrc doc id is S3100005498.

Hope this helps.

Regds
A. Clay Stephenson
Acclaimed Contributor

Re: Tape problem: restoring a file

I'll assume that you are running vxfs. fsadm -F vxfs -o largefiles /dev/vg02/lvol3

If you do not have OnlineJFS, you will need to unmount before changing.

You should also add the largefiles mount option in /etc/fstab.
If it ain't broke, I can fix that.
Jeff Hagstrom
Regular Advisor

Re: Tape problem: restoring a file

Both boxes has largefiles set to no.
Patrick Wallek
Honored Contributor

Re: Tape problem: restoring a file

OK, let's stop and backup for a minute.

1) I assume the 10GB database is spread across multiple files? I doubt that it is all a single file.

2) It is entirely possible that only 2.5GB of media was used. Database files are known to compress REALLY REALLY well, especially if there is not much data in the DB. All that empty space compresses really efficiently, so 10GB down to 2.5GB is entirely plausible.

3) If 1 is indeed true, then the 2GB/8GB limit for tar, if that is what was used, does not apply. That only applies to SINGLE FILES. tar can backup numerous 1GB files to tape without a problem since each file is under the 2GB / 8GB limit.

Now, if the tape restores OK on one system, but not another then chances are good that the tape is fine.

I would then look at your tape drive. First run a cleaning cartridge through it a couple of times. Next, find another tape and just write a few files to tape (something like /etc/rc.config.d works, and be sure to use relative paths - 'cd /etc ; tar -cvf /dev/rmt/?m rc.config.d') and then try reading the tape ('tar -tvf /dev/rmt/?m') and then restore to /var/tmp or some other place (cd /var/tmp ; tar -xvf /dev/rmt/?m). If it is successful, try your backup and restore on that machine.

If the restore still doesn't work then your tape drive may be going bad.