Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 6F8EC2E0051 for ; Wed, 27 Feb 2008 22:32:07 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 14928-09 for ; Wed, 27 Feb 2008 22:32:04 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from weatherbeeta.com.au (unknown [218.214.212.154]) by postgresql.org (Postfix) with ESMTP id E01952E0048 for ; Wed, 27 Feb 2008 22:32:03 -0400 (AST) Received: (qmail 21443 invoked from network); 28 Feb 2008 02:32:01 -0000 X-NetworkBox-HamSign: 0101;OUT;wbeetaau1;f61e1366990e90b1d5885f89e5c450b5; Received: from mail.weatherbeeta.com.au (10.20.0.2) by network-box.weatherbeeta.com.au with SMTP; 28 Feb 2008 02:32:01 -0000 Received: (qmail 19322 invoked by uid 1166); 28 Feb 2008 13:31:59 +1100 Received: from 172.20.0.155 by mail.weatherbeeta.com.au (envelope-from , uid 1165) with qmail-scanner-1.25-st-qms (clamdscan: 0.88.6/2315. perlscan: 1.25-st-qms. Clear:RC:1(172.20.0.155):. Processed in 0.256322 secs); 28 Feb 2008 02:31:59 -0000 X-Antivirus-mail.weatherbeeta.com.au-Mail-From: phillip.smith@weatherbeeta.com.au via mail.weatherbeeta.com.au X-Antivirus-mail.weatherbeeta.com.au: 1.25-st-qms (Clear:RC:1(172.20.0.155):. Processed in 0.256322 secs Process 19313) Received: from it-phil.weatherbeeta.com.au (HELO wbaus090) (172.20.0.155) by mail.weatherbeeta.com.au with SMTP; 28 Feb 2008 13:31:58 +1100 From: "Phillip Smith" Cc: Subject: Re: Backup to Tape Incomplete Date: Thu, 28 Feb 2008 13:32:00 +1100 Organization: Weatherbeeta Pty Ptd Message-ID: <02e901c879b2$18ee0210$9b0014ac@wbaus090> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 In-Reply-To: <14600.1204092518@sss.pgh.pa.us> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 Importance: Normal X-Scanned-By-wbeetaau1: Virus scan performed by network-box X-Scanned-By-wbeetaau1: Scanner file id is wbeetaau1-1204165921.81-21435-000 X-Scanned-By-wbeetaau1: No known viruses found in message (received+scanned in 0.01/0.03 secs) X-Scanned-By-wbeetaau1: Spam-Check-Result: No, hits=0 required=7 tests= autolearn=no version=2.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.839 tagged_above=0 required=5 tests=AWL=-1.661, MIME_QP_LONG_LINE=1.819, MISSING_HEADERS=1.581, RDNS_NONE=0.1 X-Spam-Level: * X-Archive-Number: 200802/378 X-Sequence-Number: 28452 "Scott Marlowe" writes: > > I wonder what it's meaning by invalid arg? >=20 > On my Fedora machine, "man write" explains EINVAL thusly: >=20 > EINVAL fd is attached to an object which is unsuitable for writing; or > the file was opened with the O_DIRECT flag, and = either the > address specified in buf, the value specified in = count, or the > current file offset is not suitably aligned. >=20 > I'm not sure that writing to a tape is quite like O_DIRECT, but the mention of > an un-aligned count seems pretty relevant. If you grant the = assumption that > the underlying problem is that the tape drive has to be written to in > multiples of its blocksize, then this supports the idea that a = violation of > that rule would be reported as EINVAL. Interesting... If I set the block-size to 32, everything goes without = any error, But not ending with "PostgreSQL database dump complete": [postgres@stirling ~]$ mt setblk 32 [postgres@stirling ~]$ mt stat SCSI 2 tape drive: File number=3D0, block number=3D0, partition=3D0. Tape block size 32 bytes. Density code 0x25 (DDS-3). Soft error count since last status=3D0 General status bits on (41010000): BOT ONLINE IM_REP_EN [postgres@stirling ~]$ pg_dump dbname > /dev/st0 [postgres@stirling ~]$ tail - < /dev/st0 REVOKE ALL ON TABLE stock_test FROM dbuser; GRANT ALL ON TABLE stock_test TO dbuser; GRANT ALL ON TABLE stock_test TO PUBLIC; -- -- Name: stores; Type: ACL; Schema: public; Owner: dbuser -- [postgres@stirling ~]$ If I set the block-size to 0... Well it's really not happy: [postgres@stirling ~]$ mt setblk 0 [postgres@stirling ~]$ mt stat SCSI 2 tape drive: File number=3D0, block number=3D0, partition=3D0. Tape block size 0 bytes. Density code 0x25 (DDS-3). Soft error count since last status=3D0 General status bits on (41010000): BOT ONLINE IM_REP_EN [postgres@stirling ~]$ pg_dump dbname > /dev/st0 [postgres@stirling ~]$ tail - < /dev/st0 tail: error reading `standard input': Cannot allocate memory [postgres@stirling ~]$ cat /dev/st0 > /tmp/test-restore.sql cat: /dev/st0: Cannot allocate memory [postgres@stirling ~]$ THINK BEFORE YOU PRINT - Save paper if you don't really need to print this *******************Confidentiality and Privilege Notice******************* The material contained in this message is privileged and confidential to the addressee. If you are not the addressee indicated in this message or responsible for delivery of the message to such person, you may not copy or deliver this message to anyone, and you should destroy it and kindly notify the sender by reply email. Information in this message that does not relate to the official business of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta. Weatherbeeta, its employees, contractors or associates shall not be liable for direct, indirect or consequential loss arising from transmission of this message or any attachments e-mail.