From owner-freebsd-scsi Tue Nov 5 4:24:41 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09FFA37B401 for ; Tue, 5 Nov 2002 04:24:40 -0800 (PST) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FA3943E42 for ; Tue, 5 Nov 2002 04:24:35 -0800 (PST) (envelope-from ru@whale.sunbay.crimea.ua) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Sunbay) with ESMTP id gA5COORK080600 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Tue, 5 Nov 2002 14:24:24 +0200 (EET) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.6/8.12.6/Submit) id gA5CONt2080595 for scsi@FreeBSD.org; Tue, 5 Nov 2002 14:24:23 +0200 (EET) Date: Tue, 5 Nov 2002 14:24:23 +0200 From: Ruslan Ermilov To: scsi@FreeBSD.org Subject: ``mt erase 0'' on a non-rewinded tape Message-ID: <20021105122423.GA79188@sunbay.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-Disposition: inline User-Agent: Mutt/1.4i Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi there! I have a script that does automated file system backups using mt(1) and dump(8). My tape drive is: sa0: Removable Sequential Access SCSI-2 device) When doing a level 0 backup, the script does a quick erase of the tape, then does the retension, then does the backup. When doing an incremental backup, it seeks to the end of recorded medium, then does the backup. The script works with the no-rewind device, /dev/nsa0. The script always used to fail with EINVAL attempting to run a quick erase, ``mt erase 0''. After a bit of experimenting, it turned out that `erase' only works if I rewind the tape (either through by using the rewind device, or by running the `rewind' or `retension' commands in advance). Here is my question. Is this always the case that MTERASE only works with a rewinded tape, or is this device-dependent? If the former, what would be an appropriate way to document it? (I am reluctant to find myself where this EINVAL is coming from, and there is a plenty of them under sys/cam/.) Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE9x7h3Ukv4P6juNwoRAhHqAJ94w8Bz9GgJAfksGOsCagcYfwZYzwCdFHKf KYRdEhPLPYL90pI2DI5l4VA= =l1kQ -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message