0

I'm working with a Linux server with a failing drive, and am interested in the best/easiest way to transfer the existing data onto a new drive, and reboot with the new hardware.

The server is running a fairly ancient version of SUSE (2.6.8-24 kernel), and contains two internal SCSI drives. One is divided into the various standard partitions. The second is mapped to a custom mount point to hold certain data. It is the first drive that is failing.

The OS detected an error, and automatically remounted the /home partition read-only.

I have spare drives of the same size and type of the failing drive. I also have some larger drives.

1
  • 1
    Just curious - how do you know the OS disk is failing?
    – fpmurphy
    Commented Dec 29, 2011 at 14:19

1 Answer 1

2

You can use the dd if=/dev/sda of=/dev/sdb bs=1M command to copy the raw data from one unmounted drive to another. Then swap the drives and reboot. Be sure to set the block size correctly to avoid a very slow copy. see also https://serverfault.com/questions/4906/using-dd-for-disk-cloning

edit: Fixed the block size in the example command to be more realistic for modern systems.

1
  • 2
    Actually, I would use a block size larger than 1 KB - try 1 MB or something like that. Also note that while dd is good for cloning, the drives effectively must be of the exact same size (which they would be in the OP's case, but which definitely isn't the general case) for it to work out nicely.
    – user
    Commented Jan 1, 2012 at 18:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .