Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-21-2011, 01:43 PM   #1
LQ Newbie
Registered: Jan 2011
Posts: 1

Rep: Reputation: 0
Does the output of this mt indicate a tape existence ?

Dear Experts,
I'm a beginner with Linux. I'm working on a server running SuSE linux SP10. I want to make a backup using MondoRescue. I've only CLI access to the server and I don't know whether there's a tape or not in the server. I ran the commands below:
# mt status
mt: /dev/tape is not a character special file.
# ls -l /dev/tape
Total 0
Drwrx-xr-x 2 root root

Does this show that I've a tape in my server or there's a tape drive but no tape in it ?

Also the used capacity in the server HD is 27 GB and the free capacity is only 7GB under /opt. If there's no tape then I can backup and burn to DVD but the procedures require me to create an ISO image in the HD first then burn, this 7GB free space is not enough to create the ISO image for the whole system, if you know any other techniques I'll appreciate sharing with me.

Old 01-21-2011, 01:50 PM   #2
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 987
Blog Entries: 4

Rep: Reputation: 252Reputation: 252Reputation: 252

First, you cannot burn more than 4.7 (or 8.4) gigabytes to one DVD. You mention you have 27 gigabytes to backup.
Second, perhaps the man page for mt would help you out (just type "man mt")

You might want to check out this doc on Linux tape backups.

Here's a man page for mt (you'rs might differ)

mt(1) - Linux man page
mt - control magnetic tape drive operation
mt [-h] [-f device] operation [count] [arguments...]
This manual page documents the tape control program mt. mt performs the given operation, which must be one of the tape operations listed below, on a tape drive. The commands can also be listed by running the program with the -h option. The version of mt is printed with the -v or --version option. The path of the tape device on which to operate can be given with the -f or -t option. If neither of those options is given, and the environment variable TAPE is set, it is used. Otherwise, a default device defined in the file /usr/include/sys/mtio.h is used.

Some operations optionally take an argument or repeat count, which can be given after the operation name and defaults to 1. The postfix k , M , or G can be used to give counts in units of 1024, 1024 * 1024, or 1024 * 1024 * 1024, respectively.

The available operations are listed below. Unique abbreviations are accepted. Not all operations are available on all systems, or work on all types of tape drives.

    Forward space count files. The tape is positioned on the first block of the next file. 
    Forward space past count file marks, then backward space one file record. This leaves the tape positioned on the last block of the file that is count-1 files past the current file. 
    Backward space count files. The tape is positioned on the last block of the previous file. 
    Backward space past count file marks, then forward space one file record. This leaves the tape positioned on the first block of the file that is count-1 files before the current file. 
    The tape is positioned at the beginning of the count file. Positioning is done by first rewinding the tape and then spacing forward over count filemarks. 
    Forward space count records. 
    Backward space count records. 
    (SCSI tapes) Forward space count setmarks. 
    (SCSI tapes) Backward space count setmarks. 
eod, seod
    Space to end of valid data. Used on streamer tape drives to append data to the logical end of tape. 
    Rewind the tape. 
offline, rewoffl, eject
    Rewind the tape and, if applicable, unload the tape. 
    Rewind the tape, then wind it to the end of the reel, then rewind it again. 
weof, eof
    Write count EOF marks at current position. 
    (SCSI tapes) Write count setmarks at current position (only SCSI tape). 
    Erase the tape. 
    Print status information about the tape unit. (If the density code is "no translation" in the status output, this does not affect working of the tape drive.) 
    (SCSI tapes) Seek to the count block on the tape. This operation is available on some Tandberg and Wangtek streamers and some SCSI-2 tape drives. The block address should be obtained from a tell call earlier. 
    (SCSI tapes) Tell the current block on tape. This operation is available on some Tandberg and Wangtek streamers and some SCSI-2 tape drives. 
    (SCSI tapes) Switch to the partition determined by count. The default data partition of the tape is numbered zero. Switching partition is available only if enabled for the device, the device supports multiple partitions, and the tape is formatted with multiple partitions. 
    (SCSI tapes) The tape position is set to block count in the partition given by the argument after count. The default partition is zero. 
    (SCSI tapes) Format the tape with one (count is zero) or two partitions (count gives the size of the second partition in megabytes). The tape drive must be able to format partitioned tapes with initiator-specified partition size and partition support must be enabled for the drive. 
    (SCSI tapes) Send the load command to the tape drive. The drives usually load the tape when a new cartridge is inserted. The argument count can usually be omitted. Some HP changers load tape n if the count 10000 + n is given (a special funtion in the Linux st driver). 
    (SCSI tapes) Lock the tape drive door. 
    (SCSI tapes) Unlock the tape drive door. 
    (SCSI tapes) Set the block size of the drive to count bytes per record. 
    (SCSI tapes) Set the tape density code to count. The proper codes to use with each drive should be looked up from the drive documentation. 
    (SCSI tapes) Write explanation of some common density codes to standard output. 
    (SCSI tapes) Set the tape drive buffer code to number. The proper value for unbuffered operation is zero and "normal" buffered operation one. The meanings of other values can be found in the drive documentation or, in the case of a SCSI-2 drive, from the SCSI-2 standard. 
    (SCSI tapes) The compression within the drive can be switched on or off using the MTCOMPRESSION ioctl. Note that this method is not supported by all drives implementing compression. For instance, the Exabyte 8 mm drives use density codes to select compression. 
    (SCSI tapes) Set the driver options bits for the device to the defined values. Allowed only for the superuser. The bits can be set either by ORing the option bits from the file /usr/include/linux/mtio.h to count, or by using the following keywords (as many keywords can be used on the same line as necessary, unambiguous abbreviations allowed): 
    buffered writes enabled 
    asynchronous writes enabled 
    read-ahead for fixed block size 
    debugging (if compiled into driver) 
    write two filemarks when file closed 
    space directly to eod (and lose file number) 
    don't wait until rewind, etc. complete 
    automatically lock/unlock drive door 
    the block size and density are for writes 
    drive can space backwards as well 
    drive doesn't support read block limits 
    drive can handle partitioned tapes 
    seek and tell use SCSI-2 logical block addresses instead of device dependent addresses 

enable the System V semantics

    (SCSI tapes) Set selected driver options bits. The methods to specify the bits to set are given above in the description of stoptions. Allowed only for the superuser. 
    (SCSI tapes) Clear selected driver option bits. The methods to specify the bits to clear are given above in description of stoptions. Allowed only for the superuser. 
    (SCSI tapes) The write threshold for the tape device is set to count kilobytes. The value must be smaller than or equal to the driver buffer size. Allowed only for the superuser. 
    (SCSI tapes) Set the default block size of the device to count bytes. The value -1 disables the default block size. The block size set by setblk overrides the default until a new tape is inserted. Allowed only for the superuser. 
    (SCSI tapes) Set the default density code. The value -1 disables the default density. The density set by setdensity overrides the default until a new tape is inserted. Allowed only for the superuser. 
    (SCSI tapes) Set the default drive buffer code. The value -1 disables the default drive buffer code. The drive buffer code set by drvbuffer overrides the default until a new tape is inserted. Allowed only for the superuser. 
    (SCSI tapes) Set the default compression state. The value -1 disables the default compression. The compression state set by compression overrides the default until a new tape is inserted. Allowed only for the superuser. 
    sets the normal timeout for the device. The value is given in seconds. Allowed only for the superuser. 
    sets the long timeout for the device. The value is given in seconds. Allowed only for the superuser. 
    set the cleaning request interpretation parameters.

mt exits with a status of 0 if the operation succeeded, 1 if the operation or device name given was invalid, or 2 if the operation failed.
The program is written by Kai Makisara <>.
The program and the manual page are copyrighted by Kai Makisara, 1998-2005. They can be distributed according to the GNU Copyleft.
See Also
Referenced By
dump(8), loaderinfo(1), mtx(1), qping(1), restore(8), star(1), stinit(8), tapeinfo(1)

Last edited by xeleema; 01-21-2011 at 01:52 PM. Reason: Added dmesg & tape info


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
tape input/output error sridhar_dct3 Linux - Hardware 0 05-21-2008 02:31 AM
Hp Tape Drive Input/Output Error ammar_linux Linux - Newbie 0 12-31-2007 02:58 AM
how does grub knows about existence of other OS? mohit_garg Linux - Newbie 29 07-13-2005 07:24 PM
Scanner's temporal existence phantompgr Fedora 0 10-14-2004 06:51 PM
Input/output error beim Schreib-/Lesezugriff auf Streamer Tape RetroFX Linux - Hardware 2 09-16-2003 08:26 AM

All times are GMT -5. The time now is 02:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration