1

Is there a way via mtx or mt, or else via some value stored in /sys or /proc, to know the capacity of a tape in a tape drive (such as a LTO7 cassette in a DELL TL4000)?

I have attempted mt with the operations tell and status.

status

    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.)

tell

    (SCSI tapes) Tell the current block on tape.  This operation is available on some Tandberg and Wangtek streamers and some SCSI-2 tape drives.

but even being uid=0 (root) it reports /dev/sg2: operation not permitted.

fraleone
  • 797

1 Answers1

0

When you use the mt command, you need to use /dev/stN instead of /dev/sgN because mt uses tape driver.  For example, load the cartridge into the drive and try this way:

$ mt -f /dev/st0 status

NOTE that /dev/st0 depends on your environment.