From owner-freebsd-bugs Fri Jun 9 06:11:28 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id GAA09142 for bugs-outgoing; Fri, 9 Jun 1995 06:11:28 -0700 Received: from fitipc31.tu-graz.ac.at (root@fitipc31.tu-graz.ac.at [129.27.146.51]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id GAA09136 for ; Fri, 9 Jun 1995 06:11:24 -0700 Received: (from ruplit@localhost) by fitipc31.tu-graz.ac.at (8.6.9/8.6.9) id PAA13803; Fri, 9 Jun 1995 15:11:07 +0200 Date: Fri, 9 Jun 1995 15:11:07 +0200 (MET DST) From: Michael Ruplitsch To: freebsd-bugs@FreeBSD.org Subject: dump having problems with remote tape drive Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: bugs-owner@FreeBSD.org Precedence: bulk Hi, Today I wanted to use `dump' to backup my hard drive onto a remote scsi tape drive. dump terminated with the message: Cannot open output "/dev/rmt/ctapen". I found out that dump tries to open the remote tape for reading and writing (by sending "Otape-device\n2\n" to rmt where 2 means O_RDWR) instead of opening it for writing only (`1' instead of `2'). Is this a bug or is it a feature of dump? Michael P.S.: In case it is a bug here is the patch (to be applied in src/sbin/dump): -------------------- cut here ----------------------------------------------- *** tape.c.orig Tue May 30 08:08:55 1995 --- tape.c Fri Jun 9 13:16:01 1995 *************** *** 595,601 **** msg("Dumping volume %d on %s\n", tapeno, tape); } #ifdef RDUMP ! while ((tapefd = (host ? rmtopen(tape, 2) : pipeout ? 1 : open(tape, O_WRONLY|O_CREAT, 0666))) < 0) #else while ((tapefd = (pipeout ? 1 : --- 595,601 ---- msg("Dumping volume %d on %s\n", tapeno, tape); } #ifdef RDUMP ! while ((tapefd = (host ? rmtopen(tape, 1) : pipeout ? 1 : open(tape, O_WRONLY|O_CREAT, 0666))) < 0) #else while ((tapefd = (pipeout ? 1 : -------------------- cut here -----------------------------------------------