[comp.sys.dec] rdump from sun

Steve Hayman <sahayman@porbeagle.cs.indiana.edu> (05/20/91)

>#!/bin/csh
>time rdump 0ubsdf 126 9154 12000 hermes:/dev/rmt1h $1
>				   ^
>				   | this is the DS3100.
>
>The error message on the sun is 'broken pipe, dump aborted, etc...'  


I was able to reproduce this between a Sun and DS3100 here.

Your rdump parameters are asking /etc/rmt on hermes - which is the
program that actually does tape I/O when you run rdump - to write
64512-byte buffers.  From a quick look at the Ultrix source, it appears
that Ultrix /etc/rmt has a 10K limit on the size of a block you can write.

I suggest obtaining the BSD version of rmt (which you can ftp from
uunet, it's in bsd-sources/usr.sbin/rmt) and installing it instead of
/etc/rmt.  The BSD version dynamically allocates buffers and can
read/write whatever large block size you want.  Installing the bsd rmt
here fixed the problem.

hope this helps.
steve
-- 
Steve Hayman    Workstation Manager    Computer Science Department   Indiana U.
sahayman@iuvax.cs.indiana.edu                                    (812) 855-6984
NeXT Mail: sahayman@spurge.bloomington.in.us

wcwang@iuvax.cs.indiana.edu (Bill Wang) (05/21/91)

I could get rdump from the sun to dec station 3100 working.  The script is
as follows (on the SUN Sparc):

#!/bin/csh
time rdump 0ubsdf 126 9154 12000 hermes:/dev/rmt1h $1
				   ^
				   | this is the DS3100.

The error message on the sun is 'broken pipe, dump aborted, etc...'  BTW,
simular script on another DS to hermes worked find.

Any help would be appreciated.


-- 
Bill Wang
US Mail = Psychology Department, Indiana University, Bloomington, IN 47405
UUCP  = {rutgers, att, ames}!iuvax!wcwang
Internet = wcwang@iuvax.cs.indiana.edu

aej@manyjars.WPI.EDU (Allan E Johannesen) (05/21/91)

Yes, BSD rmt will handle an rdump from another UNIX box.  Note,
however, that BSD rmt will fail if the rdump is from a DECstation.  If
you want DECstation rdumps to work as well as Sun (or other) rdumps,
you have to hack in DEC's changes to the BSD rmt...

This was my guess at those changes:

*** rmt.c~bsd	Mon May 20 20:18:51 1991
--- rmt.c	Sat Mar 16 13:26:13 1991
***************
*** 22,27 ****
--- 22,32 ----
  #include <sys/types.h>
  #include <sys/socket.h>
  #include <sys/mtio.h>
+ #include <sys/stat.h>
+ #include <sys/ioctl.h>
+ #include <sys/devio.h>
+ #include <sys/param.h>
+ #include <sys/fs.h>
  #include <errno.h>
  
  int	tape = -1;
***************
*** 30,41 ****
  int	maxrecsize = -1;
  char	*checkbuf();
  
! #define	SSIZE	64
! char	device[SSIZE];
! char	count[SSIZE], mode[SSIZE], pos[SSIZE], op[SSIZE];
  
  extern	errno;
! char	*sys_errlist[];
  char	resp[BUFSIZ];
  
  char	*sprintf();
--- 35,46 ----
  int	maxrecsize = -1;
  char	*checkbuf();
  
! #define	aSSIZE	64
! char	device[aSSIZE];
! char	count[aSSIZE], mode[aSSIZE], pos[aSSIZE], op[aSSIZE];
  
  extern	errno;
! extern char	*sys_errlist[];
  char	resp[BUFSIZ];
  
  char	*sprintf();
***************
*** 54,62 ****
  	char c;
  	int n, i, cc;
  
! 	argc--, argv++;
! 	if (argc > 0) {
! 		debug = fopen(*argv, "w");
  		if (debug == 0)
  			exit(1);
  		(void) setbuf(debug, (char *)0);
--- 59,66 ----
  	char c;
  	int n, i, cc;
  
! 	{
! 		debug = fopen("/tmp/debrmt", "w");
  		if (debug == 0)
  			exit(1);
  		(void) setbuf(debug, (char *)0);
***************
*** 148,153 ****
--- 152,197 ----
  		  goto top;
  		}
  
+ /* my guess as the DEC "enhanncements"... */
+ 
+ 	      case 'T':
+ 		getstring(device);
+ 		DEBUG1("rmtd: T %s\n",device);
+ 		{ struct stat sts;
+ 		  if (stat(device,&sts) != 0)
+ 		    goto ioerror;
+ 		  rval = sizeof(sts);
+ 		  (void) sprintf(resp,"A%d\n",rval);
+ 		  (void) write(1,resp,strlen(resp));
+ 		  (void) write(1,(char *)&sts,sizeof(sts));
+ 		  goto top; }
+ 
+ 	      case 'D':
+ 		if (read(0, &c, 1) != 1)
+ 		  exit(0);	/* gobble linefeed */
+ 		DEBUG("rmtd: D\n");
+ 		{ struct devget dvg;
+ 		  if (ioctl(tape,DEVIOCGET,(char *)&dvg) != 0)
+ 		    goto ioerror;
+ 		  rval = sizeof(dvg);
+ 		  (void) sprintf(resp,"A%d\n",rval);
+ 		  (void) write(1,resp,strlen(resp));
+ 		  (void) write(1,(char *)&dvg,sizeof(dvg));
+ 		  goto top; }
+ 
+ 	      case 'P':
+ 		if (read(0,&c,1) != 1)
+ 		  exit(0);
+ 		DEBUG("rmtd: P\n");		
+ 		{ struct pt ptab;
+ 		  if (ioctl(tape,DIOCDGTPT,(char *)&ptab) != 0)
+ 		    goto ioerror;
+ 		  rval = sizeof(ptab);
+ 		  (void) sprintf(resp,"A%d\n",rval);
+ 		  (void) write(1,resp,strlen(resp));
+ 		  (void) write(1,(char *)&ptab,sizeof(ptab));
+ 		  goto top; }
+ 
  	default:
  		DEBUG1("rmtd: garbage command %c\n", c);
  		exit(3);
***************
*** 168,174 ****
  	int i;
  	char *cp = bp;
  
! 	for (i = 0; i < SSIZE; i++) {
  		if (read(0, cp+i, 1) != 1)
  			exit(0);
  		if (cp[i] == '\n')
--- 212,218 ----
  	int i;
  	char *cp = bp;
  
! 	for (i = 0; i < aSSIZE; i++) {
  		if (read(0, cp+i, 1) != 1)
  			exit(0);
  		if (cp[i] == '\n')

pearmana@prlhp1.prl.philips.co.uk (Andy Pearman) (05/23/91)

What does rdump give you that dump doen't ?

Using dump I can dump to   hostname:/dev/mt0   etc etc.

Does rdump do something clever ?

  Andy

-- 

Andy Pearman, Computer Dept, Philips Research Labs, Redhill, Surrey, England. 
              pearmana@prl.philips.co.uk

ehrlich@cs.psu.edu (Dan Ehrlich) (05/24/91)

In article <1333@prlhp1.prl.philips.co.uk> pearmana@prlhp1.prl.philips.co.uk (Andy Pearman) writes:

Andy> What does rdump give you that dump doen't ?

Andy> Using dump I can dump to   hostname:/dev/mt0   etc etc.

Andy> Does rdump do something clever ?

Back in the early days when BSD was it, dump and rdump were seperate
programs.  Some clever soul merged them together.  If one checks, rdump
is a symbolic link to dump under SunOS.

--
Dan Ehrlich - Sr. Systems Programmer - Penn State Computer Science
<ehrlich@cs.psu.edu>/Voice: +1 814 863 1142/FAX: +1 814 865 3176

carre@lapin.ens-lyon.fr (Giles Carre) (05/24/91)

In article <1333@prlhp1.prl.philips.co.uk>, pearmana@prlhp1.prl.philips.co.uk (Andy Pearman) writes:
|> 
|> What does rdump give you that dump doen't ?
|> 
|> Using dump I can dump to   hostname:/dev/mt0   etc etc.
|> 
|> Does rdump do something clever ?
|> 
|>   Andy
|>

It's fully the same command. rdump is a symbolic link to dump, and still
exists for compatibility with old scripts. Dump now includes the remote cases.

-- 
Giles Carre
Ecole Normale Superieure   46, allee d'Italie  69364 LYON CEDEX 07 FRANCE
Phone    : (+33) 72 72 84 12	EARN/BITNET 	 : carre@frensl61.bitnet
Fax	 : (+33) 72 72 80 80	FNET/EUNET/UUNET : carre@ensl.ens-lyon.fr

grr@cbmvax.commodore.com (George Robbins) (05/25/91)

In article <1991May24.112058.4368@lip.ens-lyon.fr> carre@lapin.ens-lyon.fr (Giles Carre) writes:
> In article <1333@prlhp1.prl.philips.co.uk>, pearmana@prlhp1.prl.philips.co.uk (Andy Pearman) writes:
> |> 
> |> What does rdump give you that dump doen't ?
> |> 
> |> Using dump I can dump to   hostname:/dev/mt0   etc etc.
> |> 
> |> Does rdump do something clever ?
> |> 
> |>   Andy
> |>
> 
> It's fully the same command. rdump is a symbolic link to dump, and still
> exists for compatibility with old scripts. Dump now includes the remote cases.

Since we're cross posting here, let's note the while the Sun dump/rdump may be
links to the same program, the Ultrix ones, at least up thru 4.1 are still
different objects.  It is possible that rdump can/could do everything that
dump does, but I don't know if this is so...
-- 
George Robbins - now working for,     uucp:   {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing:   domain: grr@cbmvax.commodore.com
Commodore, Engineering Department     phone:  215-431-9349 (only by moonlite)

perl@dwrsun2.UUCP (Robert Perlberg) (06/08/91)

In article <ja2Hgbdc@cs.psu.edu>, ehrlich@cs.psu.edu (Dan Ehrlich) writes:
> If one checks, rdump
> is a symbolic link to dump under SunOS.

True.  In addition, the documentation states:

     If dump is called as rdump,  the  dump  device  defaults  to
     dumphost:/dev/rmt8.

Robert Perlberg
Dean Witter Reynolds Inc., New York
murphy!dwrsun2!perl
	-- "I am not a language ... I am a free man!"