From gena@Burka.NetVision.net.il  Thu Jun 13 01:13:12 1996
Received: from mx10.netvision.net.il (mx10.NetVision.net.il [194.90.1.51])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id BAA02005
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Jun 1996 01:13:10 -0700 (PDT)
Received: from Burka.NetVision.net.il (burka.NetVision.net.il [194.90.6.15]) by mx10.netvision.net.il (8.7.5/8.7.3) with ESMTP id LAA08760 for <FreeBSD-gnats-submit@freebsd.org>; Thu, 13 Jun 1996 11:15:08 +0300
Received: (from gena@localhost) by Burka.NetVision.net.il (8.7.5/8.7.2) id LAA16644; Thu, 13 Jun 1996 11:16:00 +0200 (IST)
Message-Id: <199606130916.LAA16644@Burka.NetVision.net.il>
Date: Thu, 13 Jun 1996 11:16:00 +0200 (IST)
From: gena@netvision.net.il
Reply-To: gena@netvision.net.il
To: FreeBSD-gnats-submit@freebsd.org
Subject: dump limits blocksize to 32K
X-Send-Pr-Version: 3.2

>Number:         1320
>Category:       bin
>Synopsis:       dump limits blocksize to 32K
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 13 01:20:07 PDT 1996
>Closed-Date:    Sat May 27 11:19:45 PDT 2000
>Last-Modified:  Sat May 27 11:20:14 PDT 2000
>Originator:     Gennady Sorokopud
>Release:        FreeBSD 2.2-CURRENT i386
>Organization:
--------
 Gennady B. Sorokopud - System programmer at NetVision Israel.
 E-Mail: gena@NetVision.net.il
 Homepage: http://www.netvision.net.il/~gena
>Environment:

    Any freebsd system

>Description:

  when you try to back up the system usin dump (or rdump) and blocksize
  required is > 32 (like by big DLT tapes) dump exits with :
  please choose a blocksize <= 32\n

  in /usr/src/sbin/dump/main.c:

                  case 'b':               /* blocks per tape write */
                        ntrec = numarg('b', "number of blocks per write",
                            1L, 1000L, &argc, &argv);
                        /* XXX restore is unable to restore dumps that
                           were created  with a blocksize larger than 32K.
                           Possibly a bug in the scsi tape driver. */
                        if ( ntrec > 32 ) {
                                msg("please choose a blocksize <= 32\n");
                                exit(X_ABORT);
                        }               
                        break;

  All this may be true (?) for local backup , but absolutely not
  when using rdump. I back up my system on DLT SCSI tape connected
  to Solaris system and tape's manuall says that blocksize = 126
  should be spcified.

>How-To-Repeat:

 In my case it's:

 /usr/sbin/rdump 0ufdbs nvsrv:/dev/nrst28 81633 126 180000 /dev/sd0a

>Fix:
	
*** main.c.org	Thu Jun 13 11:14:12 1996
--- main.c	Thu Jun 13 11:14:20 1996
***************
*** 167,179 ****
  		case 'b':		/* blocks per tape write */
  			ntrec = numarg('b', "number of blocks per write",
  			    1L, 1000L, &argc, &argv);
- 			/* XXX restore is unable to restore dumps that 
- 			   were created  with a blocksize larger than 32K.
- 			   Possibly a bug in the scsi tape driver. */
- 			if ( ntrec > 32 ) {
- 				msg("please choose a blocksize <= 32\n");
- 				exit(X_ABORT);
- 			}
  			break;
  
  		case 'B':		/* blocks per output file */
--- 167,172 ----
>Release-Note:
>Audit-Trail:

From: "Gary Palmer" <gpalmer@FreeBSD.ORG>
To: gena@netvision.net.il
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/1320: dump limits blocksize to 32K 
Date: Thu, 13 Jun 1996 09:42:36 +0100

 gena@netvision.net.il wrote in message ID
 <199606130916.LAA16644@Burka.NetVision.net.il>:
 >   All this may be true (?) for local backup , but absolutely not
 >   when using rdump. I back up my system on DLT SCSI tape connected
 >   to Solaris system and tape's manuall says that blocksize = 126
 >   should be spcified.
 
 Your patch is wrong for just that reason ... it is true for local
 backups, and removing the code which does the check is hence
 incorrect. It should only ignore the blocksize for non-local backups,
 not ignore it totally.
 
 Gary
 --
 Gary Palmer                                          FreeBSD Core Team Member
 FreeBSD: Turning PC's into workstations. See http://www.FreeBSD.ORG/ for info

From: Gennady Sorokopud <gena@NetVision.net.il>
To: "Gary Palmer" <gpalmer@FreeBSD.ORG>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/1320: dump limits blocksize to 32K
Date: Thu, 13 Jun 1996 11:59:25 +0200 (IST)

 Hello!
 On 13-Jun-96 "Gary Palmer" wrote:
 [skip]
 >Your patch is wrong for just that reason ... it is true for local
 >backups, and removing the code which does the check is hence
 >incorrect. It should only ignore the blocksize for non-local backups,
 >not ignore it totally.
 Oh well, i though that local backups will work with this as well
 and 32 is just some ancient limit.
 
 Anyway , try this one:
 
 *** main.c.org	Thu Jun 13 11:14:12 1996
 --- main.c	Thu Jun 13 11:57:36 1996
 ***************
 *** 167,179 ****
   		case 'b':		/* blocks per tape write */
   			ntrec =3D numarg('b', "number of blocks per write",
   			    1L, 1000L, &argc, &argv);
 - 			/* XXX restore is unable to restore dumps that=20
 - 			   were created  with a blocksize larger than 32K.
 - 			   Possibly a bug in the scsi tape driver. */
 - 			if ( ntrec > 32 ) {
 - 				msg("please choose a blocksize <=3D 32\n");
 - 				exit(X_ABORT);
 - 			}
   			break;
  =20
   		case 'B':		/* blocks per output file */
 --- 167,172 ----
 ***************
 *** 263,268 ****
 --- 256,271 ----
   		exit(X_ABORT);
   #endif
   	}
 + 	else 	{
 + 		/* XXX restore is unable to restore dumps that=20
 + 		   were created  with a blocksize larger than 32K.
 + 		   Possibly a bug in the scsi tape driver. */
 + 		if ( ntrec > 32 ) {
 + 			msg("please choose a blocksize <=3D 32\n");
 + 				exit(X_ABORT);
 + 				  }
 + 		}
 +=20
   	(void)setuid(getuid()); /* rmthost() is the only reason to be setuid */
  =20
   	if (signal(SIGHUP, SIG_IGN) !=3D SIG_IGN)
 >
 >Gary
 >--
 >Gary Palmer                                          FreeBSD Core Team Member
 >FreeBSD: Turning PC's into workstations. See http://www.FreeBSD.ORG/ for info
 
 Best regards.
 --------
  Gennady B. Sorokopud - System programmer at NetVision Israel.
  E-Mail: Gennady Sorokopud <gena@NetVision.net.il>
  Homepage: http://www.netvision.net.il/~gena
 
  This message was sent at 06/13/96 11:59:25 by XF-Mail
State-Changed-From-To: open->analyzed 
State-Changed-By: wosch 
State-Changed-When: Wed Sep 25 16:48:44 PDT 1996 
State-Changed-Why:  

Analyzed by Gary 



Responsible-Changed-From-To: freebsd-bugs->gpalmer 
Responsible-Changed-By: wosch 
Responsible-Changed-When: Wed Sep 25 16:48:44 PDT 1996 
Responsible-Changed-Why:  
State-Changed-From-To: analyzed->suspended 
State-Changed-By: phk 
State-Changed-When: Mon Apr 13 02:18:07 PDT 1998 
State-Changed-Why:  
->suspended. 
I think the local/remote distinction is bogus.  If I try to read a 
tape that was written remotely with a larger blocksize, on my 
local DLT, I will loose, right ? 


Responsible-Changed-From-To: gpalmer->freebsd-bugs 
Responsible-Changed-By: phk 
Responsible-Changed-When: Mon Apr 13 02:18:07 PDT 1998 
Responsible-Changed-Why:  
.. 
State-Changed-From-To: suspended->closed 
State-Changed-By: nrahlstr 
State-Changed-When: Sat May 27 11:19:45 PDT 2000 
State-Changed-Why:  
Fixed in version 1.18 of main.c by andreas. 

>Unformatted:
