Results 1 to 13 of 13
  1. #1

    Tape drive problem!

    Hello,
    I have searched around the net for 3 hours but nothing:
    I have a tape drive on my server for backups:
    [email protected] [~]# cat /proc/scsi/scsi
    Attached devices:
    Host: scsi0 Channel: 00 Id: 00 Lun: 00
    Vendor: HP Model: C7438A Rev: V312
    Type: Sequential-Access ANSI SCSI revision: 03
    [email protected] [~]#

    I have tried to delete the contents of a tape by typing:

    rm -rf /dev/st0 *

    So as you guessed I actually deleted the contents of the folder st0.
    How can I take back this mistake?
    What's the command for deleting the content of tapes?
    I'm on CentOS 3.7 i686, CPanel 10.
    Thank you,
    Rocco.

  2. #2
    Join Date
    Sep 2005
    Location
    Southern California
    Posts
    179
    You could probably just reboot to fix the device problem.

    To deal with the tapes, please read the manual regarding the 'mt' and 'tar' commands.

  3. #3
    Hi,
    I have rebooted before I started this thread but nothing!
    Yes I know about tar -xvf and mt but still how do I restore /st0?

  4. #4
    Join Date
    Sep 2005
    Location
    Southern California
    Posts
    179
    Does it still show up in dmesg?

    By the way, did you actually type:
    rm -rf /dev/st0 * ?????

    If so you have bigger problems.


    If st0 isn't showing up, its likely that it was actually a symbolic link to somewhere else, which is what you would have to figure out.

    I personally have never used a tape drive on linux before, so i can't speculate on that.

  5. #5
    Yes it shows in dmesg
    Yes I did type rm -rf /dev/st0 *
    st0 is not showing up!

  6. #6
    Join Date
    Sep 2005
    Location
    Southern California
    Posts
    179
    If you typed that command, you removed every file in your working directory. Whatever directory you were in when you typed that, all of the files in it are now gone.

    If it shows up in dmesg, go to /dev and type:

    find . -name st0

    that should find it for you

  7. #7
    It was without the dot
    Well the command run but still st0 is out of order.
    I also rebooted again, but still.

  8. #8
    Join Date
    Jun 2003
    Location
    UK
    Posts
    6,601
    How about...

    cd /dev
    sh MAKEDEV st0

    Rus
    Russ Foster - Industry Curmudgeon

  9. #9
    I get:
    [email protected] [/dev]# sh MAKEDEV st0
    MAKEDEV: MAKEDEV: cannot execute binary file

  10. #10
    Join Date
    Jun 2003
    Location
    UK
    Posts
    6,601
    Try ./MAKEDEV st0
    Russ Foster - Industry Curmudgeon

  11. #11
    a2b2,
    You have a new customer!

  12. #12
    That's a difficult task indeed!
    Last edited by host4good; 12-04-2006 at 04:21 PM.

  13. #13
    Hi,
    Since the guy I hired for 30$ cannot give me an answer here is the story:
    I run: # mt -f /dev/st0 erase

    then I ctrl-c because it took too long to wait. Since then no matter what command I type for the tape drive I receive:

    [email protected] [~]# tar tf /dev/st0
    tar: /dev/st0: Cannot read: Input/output error
    tar: At beginning of tape, quitting now
    tar: Error is not recoverable: exiting now
    [email protected] [~]#

    Anyone else?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •