Loading ...
Sorry, an error occurred while loading the content.

dd from a tape created by ufsdump

Expand Messages
  • erlasagn
    hi everybody, I need to dump a tape (created by ufsdump) using dd in to a temporary filesystem (a single file). The platform is SunOS5.9. The command I
    Message 1 of 4 , Feb 9, 2006
    View Source
    • 0 Attachment
      hi everybody,
      I need to dump a tape (created by ufsdump) using dd in to a temporary
      filesystem (a single file).
      The platform is SunOS5.9.

      The command I executed, and the error I got, are:
      # dd if=/dev/rmt/0 of=/home/export/temp.dd
      read: not enough space

      (obviously the size of the ufsdump was lot smaller then the space
      available on the target filesystem)

      Any suggestions on this issue?
      I don't want to use ufsrestore because I need to create a single file
      to transfer via scp to another host, and I don't want to actually
      restore the system.

      Thanks in advance, rgds,
      Alfredo.
    • nikkel@digitalforensics.ch
      ... Alfredo, That error may have something to do with the block size. Try specifying a block size like 64k or 128k: # dd if=/dev/rmt/0 of=/home/export/temp.dd
      Message 2 of 4 , Feb 9, 2006
      View Source
      • 0 Attachment
        On Thu, Feb 09, 2006 at 01:51:19PM -0000, erlasagn wrote:
        > hi everybody,
        > I need to dump a tape (created by ufsdump) using dd in to a temporary
        > filesystem (a single file).
        > The platform is SunOS5.9.
        >
        > The command I executed, and the error I got, are:
        > # dd if=/dev/rmt/0 of=/home/export/temp.dd
        > read: not enough space
        >
        > (obviously the size of the ufsdump was lot smaller then the space
        > available on the target filesystem)
        >
        > Any suggestions on this issue?
        > I don't want to use ufsrestore because I need to create a single file
        > to transfer via scp to another host, and I don't want to actually
        > restore the system.
        >
        > Thanks in advance, rgds,
        > Alfredo.
        >

        Alfredo,

        That error may have something to do with the block size. Try
        specifying a block size like 64k or 128k:

        # dd if=/dev/rmt/0 of=/home/export/temp.dd bs=128k

        Bruce
      • Steve Gibson
        You might also have to play with the block size setting on the tape drive itself if it isn t set to 0 (auto). You can find out what the hardware block size is
        Message 3 of 4 , Feb 9, 2006
        View Source
        • 0 Attachment
          You might also have to play with the block size setting on the tape
          drive itself if it isn't set to 0 (auto). You can find out what the
          hardware block size is set to by issuing the 'status' command to the
          device using mt:

          # mt -f /dev/rmt/0 status

          To set the block size use the 'setblk' command with mt:

          # mt -f /dev/rmt/0 setblk 65536 (or whatever you want to try -- tar
          usually defaults to 10k blocks and I think it is pretty common to use
          64k blocks with dump, but YMMV)

          In my experience it has worked best to set block size 0 on the device
          itself and then specify the block size on the dd command. But you may
          have to play with it.. .different hardware and different Unixes...

          Also be aware that there may be more than one file on the tape. So you
          may have to run dd multiple times to get them all and then tar them all
          up into one file for transmittal. Also be aware that different block
          sizes can be used for different files on a tape, so some experimentation
          may be in order. To have the tape drive maintain its position after
          dumping a file you will want to be sure to use the non-rewind
          specification for the tape device. I think in your case it would be
          /dev/rmt/0n but you will want to verify that.

          Do a 'man mt' to get other tape manipulation commands.

          An easy way to verify the block size is to do a test dump with dd but
          specify a very large size:
          # dd if=/dev/rmt/0 of=test bs=256k count=1

          Then check the size of the file "test". That should tell you the block
          size.

          -Steve

          nikkel@... wrote:
          > On Thu, Feb 09, 2006 at 01:51:19PM -0000, erlasagn wrote:
          >
          >> hi everybody,
          >> I need to dump a tape (created by ufsdump) using dd in to a temporary
          >> filesystem (a single file).
          >> The platform is SunOS5.9.
          >>
          >> The command I executed, and the error I got, are:
          >> # dd if=/dev/rmt/0 of=/home/export/temp.dd
          >> read: not enough space
          >>
          >> (obviously the size of the ufsdump was lot smaller then the space
          >> available on the target filesystem)
          >>
          >> Any suggestions on this issue?
          >> I don't want to use ufsrestore because I need to create a single file
          >> to transfer via scp to another host, and I don't want to actually
          >> restore the system.
          >>
          >> Thanks in advance, rgds,
          >> Alfredo.
          >>
          >>
          >
          > Alfredo,
          >
          > That error may have something to do with the block size. Try
          > specifying a block size like 64k or 128k:
          >
          > # dd if=/dev/rmt/0 of=/home/export/temp.dd bs=128k
          >
          > Bruce
          >
          >
          >
        • Gary Funck
          ... Solaris has a convenient command called tcopy , which copies a tape, but can also be used to list some info. about the contents of the tape,
          Message 4 of 4 , Feb 9, 2006
          View Source
          • 0 Attachment
            > From: erlasagn
            > Sent: Thursday, February 09, 2006 5:51 AM
            >
            > I need to dump a tape (created by ufsdump) using dd in to a temporary
            > filesystem (a single file).
            > The platform is SunOS5.9.

            Solaris has a convenient command called 'tcopy', which copies a
            tape, but can also be used to list some info. about the contents
            of the tape,
            http://docs.sun.com/app/docs/doc/816-0210/6m6nb7mmr?a=view
            which may not be what you're after at the moment, but may come
            in handy at some point.

            Separately, I've written a short C program that will list or
            copy everything on a tape (up until it finds two back to back
            file marks). It has the advantage that it can write to a disk
            file or a pipe, and print info. about the record sizes. If
            there's any interest, I'll upload the source code.
          Your message has been successfully submitted and would be delivered to recipients shortly.