1

Is there any way to find out the file system from a tape under Linux (CentOS)? I need this to figure out if a tape is already LTFS or not.

At the moment I know:

  • mtx # for managing a tape library
  • mt # for controlling the tape
  • tapeinfo # for general tape information
  • tapestat # for statistics
  • mkltfs # for formatting a tape
  • ltfs # for mounting a tape
  • unltfs # for removing the file system from tape

I think none of them can show the actual file system from a tape.

Have you any suggestion for me?

mivk
  • 3,457
  • 1
  • 34
  • 29
jb_alvarado
  • 130
  • 2
  • 10

1 Answers1

2

This is mostly a wild guess, but ...

The first thing I would probably try is a raw read of the first ~1MB of the tape to a tempfile. Then try using file tempfile. The file command can recognize many types data types based on what it finds.

Zoredache
  • 128,755
  • 40
  • 271
  • 413
  • 1
    Thank you! I have now try this: ``dd if=/dev/st1 of=st1-raw bs=256 count=2000000000000``, but I can also do it with count=2000, both time I get a 80b file. The command **file ...** gives me: ``st1-raw: ASCII text, with no line terminators`` but when I open the file with less the content is this: ``VOL1 L LTFS 4``. I'm not exactly understand why I get no bigger file, and when I do the same command with an empty tape, my dd output has 0b, but in a way I get the information, I need. – jb_alvarado Dec 09 '17 at 19:26
  • This appears to be the first partition of the tape and pretty obviously it's LTFS. Have you tried mouting it? – Zac67 Dec 19 '17 at 12:01
  • Yes I can mount the tape, I only needed a way to figure out before mounting, that there is LTFS on it or not. – jb_alvarado Jan 12 '18 at 12:46