[lkml]   [1998]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: tapefs

A tape file-system by any name is just a program (read user-mode)
that puts directories for all the files on the tape SOMEWHERE.

You can preallocate some blocks at the beginning for a directory
that contains directory information plus the starting offset tape
block, or you can put directory information between the files
themselves. Both methods have been used by Digital. You can make
a RMS file-system on a tape and then "mount" it, or you can
mount a raw tape (called "foreign" in DEC lingo). Note that
`tar` creates a "file-system" on the tape so you can restore
individual files, etc.

The problem is that a tape is a sequential device. You can't extend
a file, you can't delete a file (although you can pretend to by
marking its directory entry deleted).

The result is a write-once file-system with abysmal performance.
In the "olden" days, we had reel-to-reel tapes that could "seek".
These tapes could rapidly find "file-marks" so you could get some
random-access. The modern tape drives don't "remember" where they
are, so to count file-marks, you have to rewind and start from
the beginning. They are just not designed for random access.

Nevertheless, a user-mode program can be written to process file-
system data, buffer it to improve performance, and write dirty
buffers to a tape. You can even run such a program as a daemon
and "mount" it so, to a user, it looks like an ext2 file-system.

It becomes basically a RAM disk, with overflow , and everything
necessary to restore it, written to the tape.

However, before you write such a thing, experiment with a simple
program that opens/writes/rewinds/reads your tape. The performance
you get is positively awful. I've done this to stream raw data
to a SCSI Tape, once it gets going, it's okay. However, a rewind
to read takes well, maybe you can compile the kernel while
you are waiting.

FYI, the source-code for `mt` contains everything you need to know
about accessing these beasties.

Dick Johnson
Penguin : Linux version 2.1.118 on an i586 machine (66.15 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:44    [W:0.072 / U:3.448 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site