(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



Best of the Newsgroups: dd from tape to tape


What is this stuff?

If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):



From: Bela Lubkin <belal@sco.com>
Subject: Re: Question about SCSI tape transfers
Date: Fri, 11 Jul 2003 23:08:08 GMT
References: <3f0ea8c9.3746006@news4.sucknews.com> 

Dave Dickerson wrote:

> Occasionally, on my OSR505 system, I have to copy the
> contents of a Travan5 tape to a Travan4 tape.
> 
> I have both tape drives connected to a common SCSI HA
> and each drive is set to an unique SCSI ID and the 
> transfer is performed using the dd command, such as:
> 
>   dd if=/dev/rStp0 of=/dev/rStp1
> 
> There are security implications for me if the bits 
> touch, say, the hard drive or are cached or buffered 
> somewhere on the system outside of the drive-HA-drive 
> path.
> 
> Question: as the bits flow from one tape cartridge
> to the other, do they ever "touch" any component of
> the system other than the HA and tape drives? 



The data is buffered in main system memory -- OpenServer does not
orchestrate direct SCSI target-to-target transfers.  Also, since `dd` is
a user-level process, its memory image _could_ get written to swap space
if the system was busy enough to be swapping during the transfer.  This
is altogether unlikely on modern systems, but you should be aware of the
possibility.

To work around the swap issue, you could write your own data transfer
program and use plock(S) to force your process not to be swapped.  The
process must run as root:

  #include <sys/lock.h>

  ...
  if (plock(DATLOCK) < 0) {
    perror("Cannot lock self in core (plock(DATLOCK))");
    exit(1);
  }

Note that this is cleared by both fork() and exec(): you cannot use it
to lock down `dd`, you have to write your own data transfer program.  Of
course it's a trivial program, in this case...

>Bela<






Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar


cartoon
Looking for Mac OS X Help?
OS X PDF e-books
Inexpensive, instant download


/Bofcusm/2206.html copyright 1997-2004 (various authors) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.



More:
       - OSR5
       - Bofcusm
       - Bela
       - Security


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress