All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: Kenneth Porter <shiva@sewingwitch.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: Read-only paranoia during data recovery
Date: Mon, 12 Dec 2005 11:49:26 +1000	[thread overview]
Message-ID: <439CD726.7000100@torque.net> (raw)
In-Reply-To: <9A6F28681255C988725DE82A@[10.0.0.14]>

Kenneth Porter wrote:
> I have a friend who needs to recover some data from a SCSI drive from a
> SCO system, and he wants to make sure nothing writes to the drive if he
> mounts it on his Linux system. I just want to verify that mounting it
> read-only is sufficient and won't attempt to write anything to it. (I
> recall in the old days when HD's had a write-protect jumper to protect
> it at the firmware level.) Are there other measures he should take?

Kenneth,
Many SCSI disks still have write protect jumpers, typically
on the same block that selects the SCSI id of the parallel
interface. From recent SCSI disk product manuals, I can see
that Maxtor supports the Software Write Protect (SWP) bit in
the control mode page.
A tool like sdparm could be used to set SWP:
 # sdparm --set=SWP --save /dev/sda
You need to be careful that the system you do this on
(or the following dd suggestion) does not automount file
systems.

To be safe, you could copy the contents of the SCSI disk
to the same size or larger disk (ATA or SCSI).
Something like:
 # dd if=/dev/sda of=/dev/hdb bs=512
where /dev/sda is your reference disk and /dev/hdb has nothing
important on it and is the same size or larger than /dev/sda **
Then power down the system, remove /dev/sda, power up and
try and mount the SCO partition on /dev/hdb . After getting
the data from /dev/hdb you may need to use fdisk to repartition
it (so that its extra size is not wasted).


** Using a command like 'fdisk -ul', is one way of checking
   that a disk has been copied. Keeping the first 63 sectors
   of the original /dev/hdb may also be prudent:
   "dd if=/dev/hdb of=hdb_0_62.img bs=512 count=63"

Doug Gilbert

      reply	other threads:[~2005-12-12  1:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-11 22:38 Read-only paranoia during data recovery Kenneth Porter
2005-12-12  1:49 ` Douglas Gilbert [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=439CD726.7000100@torque.net \
    --to=dougg@torque.net \
    --cc=linux-scsi@vger.kernel.org \
    --cc=shiva@sewingwitch.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.