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!

Mounting a tape backup + RedHat

Status
Not open for further replies.

kakaroto57

Technical User
Sep 19, 2002
3
CR

Hi guys!

Kind of newbie.OK

I tried to mount the tape in both RedHat 7.3 & 9.0 and I get a " Cannot mount the block device " or somethig like that error message.
I then reinstall the whole operative system ...same error.
Change then the tape unit....same error.

What I'm doing wrong??

Thanks
Vic
 
Hi kakaroto57:

First, need more information.

1: How are you trying to mount the tape devive.

2: SCSI? If so, what kind of scsi card?

3: What kind of tape device? Is it a loader or single tape device?

4: What are you trying to accompish? You do not need to mount the tape when using tar to copy to or from?

Lets get some of these questions answered and see what is left. :)



>---------------------------------------Lawrence Feldman
SR. QA. Engineer SNAP Appliance
lfeldman@snapappliance.com

 

Thanks for answering that fast!

1: How are you trying to mount the tape devive.
Linux already installed. OS detectes the SCSI card and the tape....asign the dev/st to it.

I try the following instruccion :
mount -t msdos dev/sd0 /mnt/tape

2: SCSI? If so, what kind of scsi card?
Adaptec card. Linux detects and recognize the card.

3: What kind of tape device? Is it a loader or single tape device?
Try with 2 single tape davice that worked just fine in the same PC but with Windows 2000.

4: What are you trying to accompish? You do not need to mount the tape when using tar to copy to or from?
I need to recover info from the tape. I didn't try the TAR cause I tought that it need to be mounted before!!! FUC$%!!

Should I try the TAR skipping the MOUNT stuff??

Thanks!
 
You don't mount tape drives. You use tar to remove files if that is how they were put on the tape.

you use mt to check the status of the drive and to rewind, move around the tape, etc.

in my case on my redhat i have 2 devices for my tape drive. they are /dev/st0 and /dev/nst0 st0 is rewinding and nst0 is not rewinding. to check the status of the tape you can use mt from a shell like this

mt -f /dev/nst0 status

tar vztf /dev/nst0 shows me the files on the tape in order but it moves forward as it reads. (I keep them sequentially) so what I do when I need the latest file is I use the tar above to work through until I find the last file, use mt to rewind the tape and then work my way back to right before the file i want and then extract it with

tar vzxf /dev/nst0 and that extracts the file off the tape.

I'm new at this like you. I've seen scripts that automate looking for the latest file, etc. With some digging around you should be able to find them on the web.

It took me quite a while to get it figured out as I tried the same as you - to mount the dumb thing. Then documentation I found was for other systems, etc. I wont forget it though after figuring it out the hard way.
 
Correct, you do not mount the tape drive. You directly attach to it using tar, cpio, backup package etc.

Yes skip mount and use tar.

You must make a decision

1: DO I want my tars to append on the tape everytime
or
2: DO i want them to rewind and overwrite what I have everytime.

/dev/st0 = rewinding scsitape0
/dev/nst0 = nonrewinding scsitape0

If you want to append the tapes use nst0, if you want to overwrite everytime to backup to tpae then use rewind. It starts at the beginning of the tape everytime you access it.


So to use tar:

to create a tar directly to the device
tar -cvf /dev/nst0 /dir_to_backup (c = create v= verbose f=file)

When you create a tar to device the "name" is the device itself.

You can create a tar that does not go to tape, but is on the local file system. IE. you download a tarball. The tarball is a tar created on the filesystem, not directly onto tape. Replace /dev/nst0 with a name that you want to give the tarball.
tar -cvf my_tar_ball /home/me

This is when you use compression, when on local filesystems. man tar to see which versions of compression to use. the standard is gzip. add a z to options tar -czvf 0r tar -zxvf. To use bzip2 use -j instead of -z.

to retrieve from tape
tar -xvf /dev/nst0 (x=extract v=verbose f=file)

DO NOT USE SOFTWARE COMPRESSION. Let the hardware do its own compression. It will be faster and better.

I hope this helps. :)

>---------------------------------------Lawrence Feldman
SR. QA. Engineer SNAP Appliance
lfeldman@snapappliance.com

 

Well...I should look like a stupid at this point.
I expend a couple of days trying so hard to mount the tape!!

I think that's it.

Thanks to Tek-Tips forums and you guys.

Pura Vida from Costa Rica!
 
glad to help :)



>---------------------------------------Lawrence Feldman
SR. QA. Engineer SNAP Appliance
lfeldman@snapappliance.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top