bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-ddrescue] Question about identifying which disk has data on it


From: Bob Proulx
Subject: Re: [Bug-ddrescue] Question about identifying which disk has data on it
Date: Mon, 24 Dec 2012 11:40:33 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

David Banks wrote:
> Will wrote:
> > Q1 - Is there a command I can use to find out which disk is which?
> > One has data on from the raid, the other is brand new and has
> > never been used.
> 
> fdisk /dev/sda, use 'p' to print the partition table.  If the disk is
> the brand new one, it will have no partitions, or it may sometimes be
> preformatted with a Windows partition. If you want to be totally sure,
> just mount the disks in turn, and 'ls' the contents of the mount
> point.

At least two commands will dump the disk information which includes
the serial number of the disk.  The serial number also printed on the
physical disk means that you will know electronically which physical
disk is which.

  # hdparm -I /dev/sda

  # smartctl -i /dev/sda

Having the disk information, model name, and serial number in hand I
can be assured which disk is which disk.  Both of the above commands
provide this information.

For me since I always enable routine SMART testing using smartd the
disk that has been in service will have selftest logs.

  # smartctl -l selftest /dev/sda

> > I have a disk that I need to clone using ddrescue. It is a disk that
> > is part of a raid from a server. I have a disk to clone to which is
> > identical to the source disk.
> >
> > Q2 - I then intend to use
> > root# ddrescue -r-1 -n -S -v /dev/sda /dev/sdb recovery.log
> > to clone from sda to sdb
> > Is this correct please?
>
> Looks fine.

The command looks fine.  But I am concerned about the methodology.

You didn't say what RAID1 methodology you are using but all of the
RAID1 methods I have used normally allow the new disk to be sync'd
from the running disk using the raid management software.  It is not
typical to need to clone the disk using external means.  While
perfectly okay it seems odd to use ddrescue to clone a RAID1 to a
second disk.  It would be more normal to let the raid software do it.

Also if the source disk is running, and I read that it is since you
are trying to clone from /dev/sda to /dev/sdb, then I don't think you
will have the best result because the system will be live and running
and active and changing various parts of the disk as you are copying
it.  Depending upon many things this can lead to a corrupted
filesystem on the copy that did not exist on the source.  If the
system is mostly idle then it might work.  The question is how much
time it takes to make the copy and if during that time there are
changes to the source filesystem that are copied while it is in
process of updating.

I think, not sure, that you are trying to clone the live running
active root disk as the source to a second destination disk.  True?
False?  This is not guaranteed to be successful because the data on a
live running active root disk will be changing out from under the copy
and may leave the copy in an inconsistent state.  This scared me
enough to send this message of concern for your data.

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]