home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / next / sysadmin / 7092 < prev    next >
Encoding:
Text File  |  1992-12-17  |  2.2 KB  |  77 lines

  1. Path: sparky!uunet!cs.utexas.edu!sdd.hp.com!spool.mu.edu!umn.edu!noc.msc.net!gacvx2.gac.edu!nntp-server!max
  2. Newsgroups: comp.sys.next.sysadmin
  3. Subject: Re: Dump/restore problem with DAT-drive (Major hint!!!)
  4. Message-ID: <MAX.92Dec16102112@Kolmogorov.gac.edu>
  5. From: max@Kolmogorov.gac.edu (Max Hailperin)
  6. Date: 16 Dec 92 10:21:12
  7. Reply-To: Max Hailperin <max@nic.gac.edu>
  8. References: <1992Dec9.101922.618@nexcom.hanse.de> <1gkvvfINN66@menudo.uh.edu>
  9. Organization: Gustavus Adolphus College, St. Peter, MN
  10. Nntp-Posting-Host: kolmogorov.gac.edu
  11. In-reply-to: sears@tree.egr.uh.edu's message of 15 Dec 1992 16:09:19 GMTLines: 63
  12. Lines: 63
  13.  
  14. In article <1gkvvfINN66@menudo.uh.edu> sears@tree.egr.uh.edu (Paul S.
  15. Sears) writes: ...
  16.  
  17.    In article <1992Dec9.101922.618@nexcom.hanse.de> helmut@nexcom.hanse.de  
  18.    (Helmut Schoenborn) writes: ...
  19.    #I receive
  20.    #
  21.    #    Tape/disk read error: I/O error
  22.  
  23.    ... I think this is because your drive is not set to fixed block mode for  
  24.    restore which it was during dump.  What I do, and this has ALWAYS worked,  
  25.    is a 
  26.  
  27.    localhost:4# restore i
  28.    /dev/rxt0: I/O error
  29.  
  30.    Then I do a
  31.  
  32.    localhost:5# restore if /dev/nrst0
  33.  
  34.    and the restore works just fine.  The default device for tape is /dev/rxt0  
  35.    which, if I remember correctly, is a exabyte device which uses a fixed  
  36.    block length....
  37.  
  38. This very common problem isn't fixed vs. variable block length mode,
  39. per se, but "allow illegal length" vs. "inhibit illegal length".
  40. Sear's workaround is a ineligant but functional way of getting the
  41. "allow illegal length" mode set.  A cleaner way is to compile the
  42. following and call the executable mtalill.  Then do "mtalill
  43. /dev/nrst0" before your restore.  (I do it in the /etc/rc.local every
  44. time the machine boots.)
  45.  
  46. #include <stdio.h>
  47. #include <sys/ioctl.h>
  48. #include <sys/types.h>
  49. #include <nextdev/scsireg.h>
  50. #include <sys/file.h>
  51.  
  52. main(int argc, char *argv[]){
  53.   int fd;
  54.  
  55.   if(argc != 2){
  56.     fprintf(stderr, "Usage: %s device\n", argv[0]);
  57.     exit(1);
  58.     }
  59.  
  60.   if((fd = open(argv[1], O_RDONLY, 0)) < 0){
  61.     perror(argv[1]);
  62.     exit(1);
  63.   }
  64.  
  65.   if(ioctl(fd, MTIOCALILL, NULL) < 0){
  66.     perror("doing MTIOCALILL ioctl");
  67.     exit(1);
  68.   }
  69.  
  70.   if(close(fd) < 0){
  71.     perror("closing");
  72.     exit(1);
  73.   }
  74.  
  75.   exit(0);
  76. }
  77.