• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 899
  • Last Modified:

no-rewind tape device driver

How is it possible to write a block to a magnetic tape forcing the device driver not to rewind after having completed the write?

I know it could be done using 'mt' to seek the end of tape after the write, but it is not efficient because the tape rewinds and fast forwards to seek exactly the same position as before.

In AIX I use /dev/rmt0.1 instead of using /dev/rmt0.

In my linux system I use to write tapes using /dev/st0. I can't find /dev/st0.1 or something like that for no-rewind option.

Any hint is welcome.
  • 2
1 Solution

   Beats me, have you tried /dev/st0n  <-- n stands for no rewind.

:)   not sure it works though, but in Solaris /dev/rmt/0n will serve the purpose.

You might want to try tough.

well, using /dev/nst0 should solve the problem.

Quoting Linux documanetation:

 9 char        SCSI tape devices
                  0 = /dev/st0          First SCSI tape, mode 0
                  1 = /dev/st1          Second SCSI tape, mode 0
                 32 = /dev/st0l         First SCSI tape, mode 1
                 33 = /dev/st1l         Second SCSI tape, mode 1
                 64 = /dev/st0m         First SCSI tape, mode 2
                 65 = /dev/st1m         Second SCSI tape, mode 2
                 96 = /dev/st0a         First SCSI tape, mode 3
                 97 = /dev/st1a         Second SCSI tape, mode 3
                128 = /dev/nst0         First SCSI tape, mode 0, no rewind
                129 = /dev/nst1         Second SCSI tape, mode 0, no rewind
                160 = /dev/nst0l        First SCSI tape, mode 1, no rewind
                161 = /dev/nst1l        Second SCSI tape, mode 1, no rewind
                192 = /dev/nst0m        First SCSI tape, mode 2, no rewind
                193 = /dev/nst1m        Second SCSI tape, mode 2, no rewind
                224 = /dev/nst0a        First SCSI tape, mode 3, no rewind
                225 = /dev/nst1a        Second SCSI tape, mode 3, no rewind

                "No rewind" refers to the omission of the default
                automatic rewind on device close.  The MTREW or MTOFFL
                ioctl()'s can be used to rewind the tape regardless of
                the device used to access it.

mliberiAuthor Commented:
Thank you, it works!

where did you find the quoted informations?
that linux doc regarding devices can be found in /usr/src/linux/Documentation/devices.txt if you have installed kernel sources.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now