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

  1. Newsgroups: comp.sys.next.sysadmin
  2. Path: sparky!uunet!mcsun!Germany.EU.net!news.Hamburg.Germany.EU.net!malihh!nexcom.hanse.de!helmut
  3. From: helmut@nexcom.hanse.de (Helmut Schoenborn)
  4. Subject: Dump/restore problem with DAT-drive - solved !!
  5. Message-ID: <1992Dec17.104536.273@nexcom.hanse.de>
  6. Organization: Nexcom
  7. Date: Thu, 17 Dec 1992 10:45:36 GMT
  8. Lines: 56
  9.  
  10. I recently posted an article because when I tried to restore from tape by 
  11.  
  12.     restore if /dev/rst0
  13.  
  14. I received
  15.  
  16.     Tape/disk read error: I/O error
  17.  
  18. Via email (special thanks to Max Hailperin and Lewis Van Winkle !) the
  19. solution arrived. The block size has to be specified to restore by
  20.  
  21.     restore ibf 10 /dev/rst0
  22.  
  23. and everything works fine. An other possibility is to inhibit illegal
  24. length errors. Max Hailperin sent the following code, which he runs in
  25. his /etc/rc.local :
  26.  
  27. /* mtinill.c */
  28. #include <stdio.h>
  29. #include <sys/ioctl.h>
  30. #include <sys/types.h>
  31. #include <nextdev/scsireg.h>
  32. #include <sys/file.h>
  33.  
  34. main(int argc, char *argv[]){
  35.   int fd;
  36.  
  37.   if(argc != 2){
  38.     fprintf(stderr, "Usage: %s device\n", argv[0]);
  39.     exit(1);
  40.     }
  41.  
  42.   if((fd = open(argv[1], O_RDONLY, 0)) < 0){
  43.     perror(argv[1]);
  44.     exit(1);
  45.   }
  46.  
  47.   if(ioctl(fd, MTIOCINILL, NULL) < 0){
  48.     perror("doing MTIOCINILL ioctl");
  49.     exit(1);
  50.   }
  51.  
  52.   if(close(fd) < 0){
  53.     perror("closing");
  54.     exit(1);
  55.   }
  56.  
  57.   exit(0);
  58. }
  59.  
  60. Again, many thanks
  61. -- 
  62.  
  63.                      __   __
  64. Helmut Schoenborn   /\_\_/\_\       email: helmut@nexcom.hanse.de
  65. Rheingoldweg 13     \/_/ \/_/       voice (040) 810 816
  66.