Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ncr-sd.UUCP Path: utzoo!watmath!clyde!cbosgd!ncr-sd!laman From: laman@ncr-sd.UUCP (Mike Laman) Newsgroups: net.unix-wizards Subject: Re: seek on raw magtape Message-ID: <385@ncr-sd.UUCP> Date: Thu, 9-Jan-86 15:12:14 EST Article-I.D.: ncr-sd.385 Posted: Thu Jan 9 15:12:14 1986 Date-Received: Fri, 10-Jan-86 05:37:35 EST References: <6267@utzoo.UUCP> <1277@sdcsvax.UUCP> <2704@umcp-cs.UUCP> Reply-To: laman@ncr-sd.UUCP (Mike Laman) Distribution: net Organization: NCR Corporation, San Diego Lines: 38 Keywords: tape directory error gap rewrite erase In article <2704@umcp-cs.UUCP> chris@umcp-cs.UUCP (Chris Torek) writes: >Of course, if you wanted to kludge up your Unix kernel, you could >make the block tape device use large interrecord gaps, and then you >could even make a file system on tape. (Did this once work? It >does not in 4.[23]BSD.) If you put a file system on tape blocked with the same blocking factor internal to the kernel (so offset are happy), mount the tape as a READ ONLY file system, you could do it (/etc/mount /dev/mt/0 -r). I have done it myself. I thought it would be an amusing test to run after I finished writing a tape driver. It was amusing to see the system accessing various blocks on the file system. It certainly took a while to load a program since I had constructed the file system with a default rotational gap (via ``mkfs''). It was interesting to see the system access the superblock, inodes, directories and file blocks. I had the files a level down in the hierarchy so the system had to get the super block, root inode, root directory, subdirectory inode, subdirectory directory, file inode, file blocks. Seeing is believing. I'm afraid you lost me, Chris, about using large interrecord gaps. I don't see what it has to do with file systems on tape. I guess I got into the conversation too late. What is important is to get the tape driver's blocking factor and the system's internal block size in agreement, so filesystems offsets match with device driver offsets. This scheme should work for System V, System III, V7, and V6. I don't know enough about BSD systems to say. I would think it would work if the BSD kernel really doesn't update the superblock, but if the kernel does, your out of luck. The idea was suggested to me by Greg Noel. It seems he needed to access some data on a tape, but didn't have enough space on the disks, so he mounted the tape as a file system (pun intended) and left for the night. (He did this back in his V6 days about 6-8 years ago). Mike Laman, NCR, Rancho Bernardo UUCP: {ucbvax,philabs,sdcsla}!sdcsvax!ncr-sd!laman