Re: Transferring dump file to tape?

2005-05-17 Thread Viren Patel

  On Mon, May 16, 2005 at 11:36:18AM -0500, Viren Patel
  wrote:
  Hello. I am using 'dump' to backup client filesystems
 to
  a
  disk file on an NFS mounted partition, e.g.
 
 dump -0aLu -f /bk/var-20050516 /var
 
  Now I'd like to take the backup file (var-200500516)
 and
  move it to tape (on the NFS server). However I'd like
  the
  tape to have the data just as if it had been created
  directly by 'dump', e.g.
 
 dump -0aLu -f /dev/nsa0 /var
 
  Any way to do this?
 
  You can use dd to write a file to a device (e.g.
 tape).
 
  Kris
 

 I thought so too, but it doesn't work. When I issue

dd if=var-20050516 of=/dev/nsa0

 I get the following error:

 dd: /dev/nsa0: Invalid argument
 1+0 records in
 0+0 records out
 0 bytes transferred in 0.000786 secs (0 bytes/sec)

 Since 'dump' works with /dev/nsa0 I am not sure what the
 problem is.

 I would expect the dd to work also.   You may need to do
 something
 with blocksize.

 But, we see that error a lot on different machines while
 attempting
 to write a file to a tape.   We have code that opens the
 drive and
 writes directly to it, other places that attempt to use dd
 and also
 some places that try to cat to the drive.   All of them
 work most of
 the time, but fail consistently on some machines that
 appear to be
 otherwise identical.   We have resorted to numerous tricks
 to write
 to a tape on a system that is failing, usually to no
 avail.   The error
 you report is the one we see with dd.   I generally don't
 see any
 other console message or anything that shows in a dmesg.

 I would very much like to see someone who really knows
 about writing
 tapes respond to this.   I have begun to be suspicious
 that there is
 something weird about the the sa driver or something along
 the line,
 but don't know enough to really dig it out.   I posted
 some questions
 around 3 years ago, but got no response.

 By the way, this has occurred in various versions of
 FreeBSD from
 around 3.2 through 4.9.   I haven't experimented with it
 on 5.xx yet.

 jerry


 Viren


Thanks for your input. As per Kris' suggestion adding the
blocksize worked for me. 'mt' reports my tapedrive having
a blocksize of 1024 bytes (1k), so my command was

  dd if=var-200501516 of=/dev/nsa0 bs=1k

I transfered the dump file to tape and then was able to
restore directly from tape. My test dump file was small
(140K) but today I plan to test with a full-size
multi-gigabyte dump file. I haven't played long with dd to
judge its reliability. While I was looking around, I also
came across sdd (/usr/ports/sysutils/sdd), which claims to
be a better dd replacement.

Viren

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Transferring dump file to tape?

2005-05-17 Thread Jerry McAllister
  
   Any way to do this?
  
   You can use dd to write a file to a device (e.g.
  tape).
  
   Kris
  
 
  I thought so too, but it doesn't work. When I issue
 
 dd if=var-20050516 of=/dev/nsa0
 
  I get the following error:
 
  dd: /dev/nsa0: Invalid argument
  1+0 records in
  0+0 records out
  0 bytes transferred in 0.000786 secs (0 bytes/sec)
 
  Since 'dump' works with /dev/nsa0 I am not sure what the
  problem is.
 
  I would expect the dd to work also.   You may need to do
  something
  with blocksize.
 
  But, we see that error a lot on different machines while
  attempting
  to write a file to a tape.   We have code that opens the
  drive and
 ...
  avail.   The error
  you report is the one we see with dd.   I generally don't
  see any
  other console message or anything that shows in a dmesg.
 
  I would very much like to see someone who really knows
  about writing
  tapes respond to this.   I have begun to be suspicious
  that there is
  something weird about the the sa driver or something along
  the line,
  but don't know enough to really dig it out.   I posted
  some questions
  around 3 years ago, but got no response.
 
  By the way, this has occurred in various versions of
  FreeBSD from
  around 3.2 through 4.9.   I haven't experimented with it
  on 5.xx yet.
 
  jerry
 
  Viren
 
 Thanks for your input. As per Kris' suggestion adding the
 blocksize worked for me. 'mt' reports my tapedrive having
 a blocksize of 1024 bytes (1k), so my command was
 
   dd if=var-200501516 of=/dev/nsa0 bs=1k
 
 I transfered the dump file to tape and then was able to
 restore directly from tape. My test dump file was small
 (140K) but today I plan to test with a full-size
 multi-gigabyte dump file. I haven't played long with dd to
 judge its reliability. While I was looking around, I also
 came across sdd (/usr/ports/sysutils/sdd), which claims to
 be a better dd replacement.

Adjusting the blocksize was my suggestion.
But, even doing that doesn't fix the problem we often see with
writes to tape failing in that manner. 

dd itself is reliable.   It is tried and true.   I think our
failures come from something in the sa driver because a drive
that fails usually fails for everything except maybe tar and dump.

I wonder what is better about sdd.  Guess I should look at it.

jerry

 
 Viren
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Transferring dump file to tape?

2005-05-17 Thread Kris Kennaway
On Tue, May 17, 2005 at 08:59:36AM -0400, Jerry McAllister wrote:

  Thanks for your input. As per Kris' suggestion adding the
  blocksize worked for me. 'mt' reports my tapedrive having
  a blocksize of 1024 bytes (1k), so my command was
  
dd if=var-200501516 of=/dev/nsa0 bs=1k
  
  I transfered the dump file to tape and then was able to
  restore directly from tape. My test dump file was small
  (140K) but today I plan to test with a full-size
  multi-gigabyte dump file. I haven't played long with dd to
  judge its reliability. While I was looking around, I also
  came across sdd (/usr/ports/sysutils/sdd), which claims to
  be a better dd replacement.
 
 Adjusting the blocksize was my suggestion.

Also mine :0

 But, even doing that doesn't fix the problem we often see with
 writes to tape failing in that manner. 
 
 dd itself is reliable.   It is tried and true.   I think our
 failures come from something in the sa driver because a drive
 that fails usually fails for everything except maybe tar and dump.

Are you absolutely certain that the tape device is not in use at the
time that the application receives the error?

Kris


pgpBA6Oi8GhYQ.pgp
Description: PGP signature


Re: Transferring dump file to tape?

2005-05-17 Thread Jerry McAllister
 
  But, even doing that doesn't fix the problem we often see with
  writes to tape failing in that manner.=20
 =20
  dd itself is reliable.   It is tried and true.   I think our
  failures come from something in the sa driver because a drive
  that fails usually fails for everything except maybe tar and dump.
 
 Are you absolutely certain that the tape device is not in use at the
 time that the application receives the error?

Yes.  It can even happen in single user.   So far I have only had the
problem with various levels of DAT tapes.  It has never failed that way 
with DLTs.

jerry

 
 Kris
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Transferring dump file to tape?

2005-05-16 Thread Kris Kennaway
On Mon, May 16, 2005 at 11:36:18AM -0500, Viren Patel wrote:
 Hello. I am using 'dump' to backup client filesystems to a
 disk file on an NFS mounted partition, e.g.
 
dump -0aLu -f /bk/var-20050516 /var
 
 Now I'd like to take the backup file (var-200500516) and
 move it to tape (on the NFS server). However I'd like the
 tape to have the data just as if it had been created
 directly by 'dump', e.g.
 
dump -0aLu -f /dev/nsa0 /var
 
 Any way to do this? I could use rdump/rmt to backup
 directly to the remote tape, but I am doing it this way to
 do fast disk-based backups during night and move to slower
 tapes during day. For normal restores I can use NFS-based
 files but have tapes for single-user-mode type restores.
 Thanks.

You can use dd to write a file to a device (e.g. tape).

Kris


pgpwby94thLL4.pgp
Description: PGP signature


Re: Transferring dump file to tape?

2005-05-16 Thread Viren Patel
 On Mon, May 16, 2005 at 11:36:18AM -0500, Viren Patel
 wrote:
 Hello. I am using 'dump' to backup client filesystems to
 a
 disk file on an NFS mounted partition, e.g.

dump -0aLu -f /bk/var-20050516 /var

 Now I'd like to take the backup file (var-200500516) and
 move it to tape (on the NFS server). However I'd like
 the
 tape to have the data just as if it had been created
 directly by 'dump', e.g.

dump -0aLu -f /dev/nsa0 /var

 Any way to do this? I could use rdump/rmt to backup
 directly to the remote tape, but I am doing it this way
 to
 do fast disk-based backups during night and move to
 slower
 tapes during day. For normal restores I can use
 NFS-based
 files but have tapes for single-user-mode type restores.
 Thanks.

 You can use dd to write a file to a device (e.g. tape).

 Kris


I thought so too, but it doesn't work. When I issue

   dd if=var-20050516 of=/dev/nsa0

I get the following error:

dd: /dev/nsa0: Invalid argument
1+0 records in
0+0 records out
0 bytes transferred in 0.000786 secs (0 bytes/sec)

Since 'dump' works with /dev/nsa0 I am not sure what the
problem is.

Viren

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Transferring dump file to tape?

2005-05-16 Thread Kris Kennaway
On Mon, May 16, 2005 at 01:52:18PM -0500, Viren Patel wrote:
  On Mon, May 16, 2005 at 11:36:18AM -0500, Viren Patel
  wrote:
  Hello. I am using 'dump' to backup client filesystems to
  a
  disk file on an NFS mounted partition, e.g.
 
 dump -0aLu -f /bk/var-20050516 /var
 
  Now I'd like to take the backup file (var-200500516) and
  move it to tape (on the NFS server). However I'd like
  the
  tape to have the data just as if it had been created
  directly by 'dump', e.g.
 
 dump -0aLu -f /dev/nsa0 /var
 
  Any way to do this? I could use rdump/rmt to backup
  directly to the remote tape, but I am doing it this way
  to
  do fast disk-based backups during night and move to
  slower
  tapes during day. For normal restores I can use
  NFS-based
  files but have tapes for single-user-mode type restores.
  Thanks.
 
  You can use dd to write a file to a device (e.g. tape).
 
  Kris
 
 
 I thought so too, but it doesn't work. When I issue
 
dd if=var-20050516 of=/dev/nsa0
 
 I get the following error:
 
 dd: /dev/nsa0: Invalid argument
 1+0 records in
 0+0 records out
 0 bytes transferred in 0.000786 secs (0 bytes/sec)
 
 Since 'dump' works with /dev/nsa0 I am not sure what the
 problem is.

You need to specify a block size compatible with your tape drive,
e.g. 32k.

Kris


pgpOnE0EHH2J7.pgp
Description: PGP signature


Re: Transferring dump file to tape?

2005-05-16 Thread Viren Patel
 On Mon, May 16, 2005 at 01:52:18PM -0500, Viren Patel
 wrote:
  On Mon, May 16, 2005 at 11:36:18AM -0500, Viren Patel
  wrote:
  Hello. I am using 'dump' to backup client filesystems
 to
  a
  disk file on an NFS mounted partition, e.g.
 
 dump -0aLu -f /bk/var-20050516 /var
 
  Now I'd like to take the backup file (var-200500516)
 and
  move it to tape (on the NFS server). However I'd like
  the
  tape to have the data just as if it had been created
  directly by 'dump', e.g.
 
 dump -0aLu -f /dev/nsa0 /var
 
  Any way to do this? I could use rdump/rmt to backup
  directly to the remote tape, but I am doing it this
 way
  to
  do fast disk-based backups during night and move to
  slower
  tapes during day. For normal restores I can use
  NFS-based
  files but have tapes for single-user-mode type
 restores.
  Thanks.
 
  You can use dd to write a file to a device (e.g.
 tape).
 
  Kris
 

 I thought so too, but it doesn't work. When I issue

dd if=var-20050516 of=/dev/nsa0

 I get the following error:

 dd: /dev/nsa0: Invalid argument
 1+0 records in
 0+0 records out
 0 bytes transferred in 0.000786 secs (0 bytes/sec)

 Since 'dump' works with /dev/nsa0 I am not sure what the
 problem is.

 You need to specify a block size compatible with your tape
 drive,
 e.g. 32k.

 Kris



doh! Thanks.

Viren

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Transferring dump file to tape?

2005-05-16 Thread Jerry McAllister
 
  On Mon, May 16, 2005 at 11:36:18AM -0500, Viren Patel
  wrote:
  Hello. I am using 'dump' to backup client filesystems to
  a
  disk file on an NFS mounted partition, e.g.
 
 dump -0aLu -f /bk/var-20050516 /var
 
  Now I'd like to take the backup file (var-200500516) and
  move it to tape (on the NFS server). However I'd like
  the
  tape to have the data just as if it had been created
  directly by 'dump', e.g.
 
 dump -0aLu -f /dev/nsa0 /var
 
  Any way to do this? 
 
  You can use dd to write a file to a device (e.g. tape).
 
  Kris
 
 
 I thought so too, but it doesn't work. When I issue
 
dd if=var-20050516 of=/dev/nsa0
 
 I get the following error:
 
 dd: /dev/nsa0: Invalid argument
 1+0 records in
 0+0 records out
 0 bytes transferred in 0.000786 secs (0 bytes/sec)
 
 Since 'dump' works with /dev/nsa0 I am not sure what the
 problem is.

I would expect the dd to work also.   You may need to do something
with blocksize.   

But, we see that error a lot on different machines while attempting
to write a file to a tape.   We have code that opens the drive and
writes directly to it, other places that attempt to use dd and also
some places that try to cat to the drive.   All of them work most of
the time, but fail consistently on some machines that appear to be
otherwise identical.   We have resorted to numerous tricks to write 
to a tape on a system that is failing, usually to no avail.   The error
you report is the one we see with dd.   I generally don't see any 
other console message or anything that shows in a dmesg.

I would very much like to see someone who really knows about writing 
tapes respond to this.   I have begun to be suspicious that there is 
something weird about the the sa driver or something along the line, 
but don't know enough to really dig it out.   I posted some questions
around 3 years ago, but got no response.

By the way, this has occurred in various versions of FreeBSD from
around 3.2 through 4.9.   I haven't experimented with it on 5.xx yet.

jerry

 
 Viren
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]