Path: utzoo!attcan!uunet!munnari.oz.au!uniwa!wacsvax!cutmcvax!architec From: architec@cutmcvax.OZ (Phil Dench ) Newsgroups: comp.sys.sgi Subject: appending to tape archives Keywords: 1/4" mag tapes, appending Message-ID: <127@cutmcvax.OZ> Date: 9 Apr 90 17:20:22 GMT Reply-To: architec@cutmcvax.oz (Phil Dench ) Organization: Curtin University of Technology, Maths & Comp Sc Lines: 38 All this talk about mag tapes has reminded me to post the following. Does anyone know how to append to existing data on a 1/4" streamer cartridge mag tape? I used to be able to do this under 3.1 (but always suspected it was a bug not a feature) ... fd = check_open( "/dev/tape", O_WRONLY | O_APPEND); ... and any subsequent writes would happily append. Now under 3.2 this just overwrites the first file on the tape. Anything else I try does the same sort of thing. I cant even do a fsf then a write because of (from mtio(1)) ... A tape is normally open for reading and/or writing, but a tape cannot be read and written simultaneously. After a rewind, an unload, or an MTAFILE ioctl, writes may follow reads and vice-versa ... A rewind is no good to me. MTAFILE doesn't work on a 1/4". And am I correct in assuming the unload is just an 'mt offline'? It would be real useful if I could append. Cartridge tapes cost $60 Australian here. I don't want to use one for each little project that I'm archiving. And I dont really want to restore all the old ones on a tape just to write them all back with a new one on the end. Phil Dench --------------------------------------------+---------------------------------- | School of Computer Science, ACSNet: architec@cutmcvax.oz | Curtin University of Technology, UUCP: ...!uunet!munnari!cutmcvax!architec | Kent Street, ARPA: architec%cutmcvax.oz@uunet.UU.NET | Bentley | Western Australia, 6102 --------------------------------------------+----------------------------------