Loading ...
Sorry, an error occurred while loading the content.
 

Command to get tape capacity status?

Expand Messages
  • Scott R. Ehrlich
    Hello to all: I have an Overland tape library connected, via SCSI card, to an out-of-box, full install of CentOS 5 install on an old PC. I have a script that
    Message 1 of 4 , Apr 11, 2008
      Hello to all:

      I have an Overland tape library connected, via SCSI card, to an out-of-box,
      full install of CentOS 5 install on an old PC.

      I have a script that uses tar to archive data to tape and mtx to change tapes.
      What I don't know, if possible, is to obtain the status of how much tape is
      left in the drive. If I get a write failure, I'd like to know if the tape is
      bad or has run out of space.

      I know of bacula, amanda, and other backup methods, but I prefer to use the
      simplest options possible, mainly because if a hard drive failure occurs, which
      has happened at the last minute, I can take the original CentOS 5 media from
      CD, install it, and get back up and running in no time.

      So, any way to inquire remaining tape status and [estimated] capacity?

      Thanks.

      Scott
    • Hermann Kerr
      ... Scott Tar is a great KISS backup system and easy restore. Tapes capacity available is an estimate that you will have to figure out for yourself. It depends
      Message 2 of 4 , Apr 12, 2008
        Scott R. Ehrlich wrote:
        >
        >
        > Hello to all:
        >
        > I have an Overland tape library connected, via SCSI card, to an out-of-box,
        > full install of CentOS 5 install on an old PC.
        >
        > I have a script that uses tar to archive data to tape and mtx to change
        > tapes.
        > What I don't know, if possible, is to obtain the status of how much tape is
        > left in the drive. If I get a write failure, I'd like to know if the
        > tape is
        > bad or has run out of space.
        >
        > I know of bacula, amanda, and other backup methods, but I prefer to use the
        > simplest options possible, mainly because if a hard drive failure
        > occurs, which
        > has happened at the last minute, I can take the original CentOS 5 media
        > from
        > CD, install it, and get back up and running in no time.
        >
        > So, any way to inquire remaining tape status and [estimated] capacity?
        >
        > Thanks.
        >
        > Scott
        >
        Scott
        Tar is a great KISS backup system and easy restore. Tapes capacity
        available is an estimate that you will have to figure out for yourself.
        It depends on how optimistic you are. Manufactures like to estimate 2:1
        compression ratio but I would estimate very conservative mission
        critical compression at 1.2:1 or less critical at 1.5:1. You could
        build in tape error detection and recovery so if you hit the end of tape
        mark, then you could get the script to switch tapes and resave the block
        but you would not want to do that as a regular method. As you have
        implemented a KISS backup system I recommend that you keep it that way.
        I run a mission critical backup - I know how much data I am backing up -
        I concurrently create a backup log and check it - I store the tapes and
        log in a fire proof safe away from the data centre. If I have a problem
        in the backup I change the backup script. I haven't touched the backup
        script in several years except for a distinct date control file and the
        backup script runs via cron. I have had to do restores after disk
        crashes and have had no problems (via booting from a version compatible
        live linux cd). This may help you as well: What I also do is for each
        backup block I dump the directory listing into a file and I back up
        these files into there own tar block - to estimate the data size would
        be straight forward at that time and these files are valuable if ever
        you need to find and restore a specific user file without having to use
        tar to scan the backed up files.

        Hermann
      • Scott R. Ehrlich
        ... What options within tar, or other method, would you recommend for building such an error detection and recovery system? Thanks. Scott
        Message 3 of 4 , Apr 12, 2008
          On Sat, 12 Apr 2008, Hermann Kerr wrote:

          > Scott R. Ehrlich wrote:
          >>
          >>
          >> Hello to all:
          >>
          >> I have an Overland tape library connected, via SCSI card, to an out-of-box,
          >> full install of CentOS 5 install on an old PC.
          >>
          >> I have a script that uses tar to archive data to tape and mtx to change
          >> tapes.
          >> What I don't know, if possible, is to obtain the status of how much tape is
          >> left in the drive. If I get a write failure, I'd like to know if the
          >> tape is
          >> bad or has run out of space.
          >>
          >> I know of bacula, amanda, and other backup methods, but I prefer to use the
          >> simplest options possible, mainly because if a hard drive failure
          >> occurs, which
          >> has happened at the last minute, I can take the original CentOS 5 media
          >> from
          >> CD, install it, and get back up and running in no time.
          >>
          >> So, any way to inquire remaining tape status and [estimated] capacity?
          >>
          >> Thanks.
          >>
          >> Scott
          >>
          > Scott
          > Tar is a great KISS backup system and easy restore. Tapes capacity
          > available is an estimate that you will have to figure out for yourself.
          > It depends on how optimistic you are. Manufactures like to estimate 2:1
          > compression ratio but I would estimate very conservative mission
          > critical compression at 1.2:1 or less critical at 1.5:1. You could
          > build in tape error detection and recovery so if you hit the end of tape
          > mark, then you could get the script to switch tapes and resave the block
          > but you would not want to do that as a regular method. As you have

          What options within tar, or other method, would you recommend for building
          such an error detection and recovery system?

          Thanks.

          Scott

          > implemented a KISS backup system I recommend that you keep it that way.
          > I run a mission critical backup - I know how much data I am backing up -
          > I concurrently create a backup log and check it - I store the tapes and
          > log in a fire proof safe away from the data centre. If I have a problem
          > in the backup I change the backup script. I haven't touched the backup
          > script in several years except for a distinct date control file and the
          > backup script runs via cron. I have had to do restores after disk
          > crashes and have had no problems (via booting from a version compatible
          > live linux cd). This may help you as well: What I also do is for each
          > backup block I dump the directory listing into a file and I back up
          > these files into there own tar block - to estimate the data size would
          > be straight forward at that time and these files are valuable if ever
          > you need to find and restore a specific user file without having to use
          > tar to scan the backed up files.
          >
          > Hermann
          >
          > ------------------------------------
          >
          > To unsubscribe, email linux-unsubscribe@yahoogroups.com, or visit http://www.yahoogroups.com.Yahoo! Groups Links
          >
          >
          >
          >
        • Hermann Kerr
          ... FROM WITHIN TAR (from the info pages) Multi-volume archives With `--multi-volume (`-M ), `tar will not abort when it cannot read or write any more data.
          Message 4 of 4 , Apr 13, 2008
            Scott R. Ehrlich wrote:
            >
            >
            > On Sat, 12 Apr 2008, Hermann Kerr wrote:
            >
            > > Scott R. Ehrlich wrote:
            > >>
            > >>
            > >> Hello to all:
            > >>
            > >> I have an Overland tape library connected, via SCSI card, to an
            > out-of-box,
            > >> full install of CentOS 5 install on an old PC.
            > >>
            > >> I have a script that uses tar to archive data to tape and mtx to change
            > >> tapes.
            > >> What I don't know, if possible, is to obtain the status of how much
            > tape is
            > >> left in the drive. If I get a write failure, I'd like to know if the
            > >> tape is
            > >> bad or has run out of space.
            > >>
            > >> I know of bacula, amanda, and other backup methods, but I prefer to
            > use the
            > >> simplest options possible, mainly because if a hard drive failure
            > >> occurs, which
            > >> has happened at the last minute, I can take the original CentOS 5 media
            > >> from
            > >> CD, install it, and get back up and running in no time.
            > >>
            > >> So, any way to inquire remaining tape status and [estimated] capacity?
            > >>
            > >> Thanks.
            > >>
            > >> Scott
            > >>
            > > Scott
            > > Tar is a great KISS backup system and easy restore. Tapes capacity
            > > available is an estimate that you will have to figure out for yourself.
            > > It depends on how optimistic you are. Manufactures like to estimate 2:1
            > > compression ratio but I would estimate very conservative mission
            > > critical compression at 1.2:1 or less critical at 1.5:1. You could
            > > build in tape error detection and recovery so if you hit the end of tape
            > > mark, then you could get the script to switch tapes and resave the block
            > > but you would not want to do that as a regular method. As you have
            >
            > What options within tar, or other method, would you recommend for building
            > such an error detection and recovery system?
            >
            FROM WITHIN TAR (from the info pages)

            Multi-volume archives

            With `--multi-volume' (`-M'), `tar' will not abort when it cannot
            read or write any more data. Instead, it will ask you to prepare a new
            volume. If the archive is on a magnetic tape, you should change tapes
            now; if the archive is on a floppy disk, you should change disks, etc.

            Each volume of a multi-volume archive is an independent `tar'
            archive, complete in itself. For example, you can list or extract any
            volume alone; just don't specify `--multi-volume' (`-M'). However, if
            one file in the archive is split across volumes, the only way to extract
            it successfully is with a multi-volume extract command `--extract
            --multi-volume' (`-xM') starting on or before the volume where the file
            begins.

            For example, let's presume someone has two tape drives on a system
            named `/dev/tape0' and `/dev/tape1'. For having GNU `tar' to switch to
            the second drive when it needs to write the second tape, and then back
            to the first tape, etc., just do either of:

            $ tar --create --multi-volume --file=/dev/tape0 --file=/dev/tape1
            FILES
            $ tar cMff /dev/tape0 /dev/tape1 FILES


            FROM OUTSIDE OF TAR
            capture and examine the error message
            1) capture error messages from tar using BASH file redirection (I
            use redirection to creating my log file). Example "tar ..... 2>error.txt
            " now error.txt will contain the error message if there is one.
            2) Test $? return value using the BASH "if" block


            > Thanks.
            >
            > Scott
            >
            > > implemented a KISS backup system I recommend that you keep it that way.
            > > I run a mission critical backup - I know how much data I am backing up -
            > > I concurrently create a backup log and check it - I store the tapes and
            > > log in a fire proof safe away from the data centre. If I have a problem
            > > in the backup I change the backup script. I haven't touched the backup
            > > script in several years except for a distinct date control file and the
            > > backup script runs via cron. I have had to do restores after disk
            > > crashes and have had no problems (via booting from a version compatible
            > > live linux cd). This may help you as well: What I also do is for each
            > > backup block I dump the directory listing into a file and I back up
            > > these files into there own tar block - to estimate the data size would
            > > be straight forward at that time and these files are valuable if ever
            > > you need to find and restore a specific user file without having to use
            > > tar to scan the backed up files.
            > >
            > > Hermann
            > >
            > > ------------------------------------
            > >
            Hermann
          Your message has been successfully submitted and would be delivered to recipients shortly.