Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File number field shows -1 whatever I do any operations, but the mt command and the tape driver works. #27

Open
CherryYang05 opened this issue Oct 11, 2023 · 0 comments

Comments

@CherryYang05
Copy link

  • os version: centos7
  • linux version: 3.10.0-1160
  • arch: x86-64
  • run command: lsscsi -g
  • tape drive: 3580H9S LTO9
    [11:0:0:0] tape IBM ULT3580-HH9 N9B1 - /dev/sg0
  • mt version: 1.7
  • sas driver: mpt3sas
  • tape driver: lin_tape-3.0.60-1.src.rpm, lin_taped-3.0.60-rhel7.x86_64.rpm
  • ls /dev/ shows three tape devices: /dev/IBMtape(use mt command shows /dev/IBMtape: Resource temporarily unavailable), /dev/IBMtape0 and /dev/IBMtape0n. The last two device can work by using mt command.

Run command mt -f /dev/IBMtape0n status, it shows like below:

SCSI 2 tape drive:
File number=-1, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x60 (no translation).
Soft error count since last status=0
General status bits on (41000000):
 BOT ONLINE

The File number equals -1. Does it work correctly?

Then I setup the blocksize: mt -f /dev/IBMtape0n setblk 512

Run as above, it shows:

SCSI 2 tape drive:
File number=-1, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x60 (no translation).
Soft error count since last status=0
General status bits on (41000000):
 BOT ONLINE

And then I try to write a 1KB file(filename is "1k") to the tape, using command tar cbvf 1 /dev/IBMtape0n 1k, and check its block number mt -f /dev/IBMtape0n tell, shows At block 6, that's right.

Now check the status:

SCSI 2 tape drive:
File number=-1, block number=6, partition=0.
Tape block size 512 bytes. Density code 0x60 (no translation).
Soft error count since last status=0
General status bits on (1000000):
 ONLINE

Why the File number field is also -1? And how to correct it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant