🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.sysadmin
Article #2137

Re: Dump/restore problem with DAT-drive (Major hint!!!)

#2137
From: Max Hailperin
Date: Wed, 16 Dec 1992 10:21
63 lines
2346 bytes
In article <1gkvvfINN66@menudo.uh.edu> sears@tree.egr.uh.edu (Paul S.
Sears) writes: ...

   In article <1992Dec9.101922.618@nexcom.hanse.de> helmut@nexcom.hanse.de  
   (Helmut Schoenborn) writes: ...
   #I receive
   #
   #	Tape/disk read error: I/O error

   ... I think this is because your drive is not set to fixed block mode for  
   restore which it was during dump.  What I do, and this has ALWAYS worked,  
   is a 

   localhost:4# restore i
   /dev/rxt0: I/O error

   Then I do a

   localhost:5# restore if /dev/nrst0

   and the restore works just fine.  The default device for tape is /dev/rxt0  
   which, if I remember correctly, is a exabyte device which uses a fixed  
   block length....

This very common problem isn't fixed vs. variable block length mode,
per se, but "allow illegal length" vs. "inhibit illegal length".
Sear's workaround is a ineligant but functional way of getting the
"allow illegal length" mode set.  A cleaner way is to compile the
following and call the executable mtalill.  Then do "mtalill
/dev/nrst0" before your restore.  (I do it in the /etc/rc.local every
time the machine boots.)

#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <nextdev/scsireg.h>
#include <sys/file.h>

main(int argc, char *argv[]){
  int fd;

  if(argc != 2){
    fprintf(stderr, "Usage: %s device\n", argv[0]);
    exit(1);
    }

  if((fd = open(argv[1], O_RDONLY, 0)) < 0){
    perror(argv[1]);
    exit(1);
  }

  if(ioctl(fd, MTIOCALILL, NULL) < 0){
    perror("doing MTIOCALILL ioctl");
    exit(1);
  }

  if(close(fd) < 0){
    perror("closing");
    exit(1);
  }

  exit(0);
}
Technical Details
Message-ID: <MAX.92Dec16102112@Kolmogorov.gac.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sdd.hp.com!spool.mu.edu!umn.edu!noc.msc.net!gacvx2.gac.edu!nntp-server!max
References: <1992Dec9.101922.618@nexcom.hanse.de> <1gkvvfINN66@menudo.uh.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sdd.hp.com!spool.mu.edu!umn.edu!noc.msc.net!gacvx2.gac.edu!nntp-server!max
Newsgroups: comp.sys.next.sysadmin
Subject: Re: Dump/restore problem with DAT-drive (Major hint!!!)
Message-ID: <MAX.92Dec16102112@Kolmogorov.gac.edu>
From: max@Kolmogorov.gac.edu (Max Hailperin)
Date: 16 Dec 92 10:21:12
Reply-To: Max Hailperin <max@nic.gac.edu>
References: <1992Dec9.101922.618@nexcom.hanse.de> <1gkvvfINN66@menudo.uh.edu>
Organization: Gustavus Adolphus College, St. Peter, MN
Nntp-Posting-Host: kolmogorov.gac.edu
In-reply-to: sears@tree.egr.uh.edu's message of 15 Dec 1992 16:09:19 GMTLines: 63
Lines: 63