LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   What is the best way to replace a dying SCSI Hard Drive? (https://www.linuxquestions.org/questions/linux-hardware-18/what-is-the-best-way-to-replace-a-dying-scsi-hard-drive-712533/)

LinuxLuvr 03-18-2009 11:18 AM

What is the best way to replace a dying SCSI Hard Drive?
 
Scenario: I have an old computer that has a total of 4 SCSI HD.

sda1 = /
sdc1 = /mnt/hd
sdd1 = /home

sdb1 is present and contains fat32 file system but is unmounted.

Goal: sdd1 is dying and I want to replace it with sdb1.

I'm thinking if I mount sdb1 under say '/mnt/newdrive' and format/partition it with fdisk, I can then copy the contents of sdd1 to it. Once that is done I will update fstab to point to the new drive and restart.

Will this accomplish what I need?

TIA!!!

abolishtheun 03-18-2009 12:53 PM

You would actually partition, format, then mount (not mount first), but yes, should be straightfoward. The commands you want are fdisk, mkfs.ext3, and mount. And you don't even have to reboot after adding an entry to fstab.

anutosho 03-19-2009 08:31 AM

Don't forget to cp with the -a flag in order to keep all the file attributes (e.g. owner).
If you have a huge drive and the new drive has the same size than the old one it is ways faster with

# dd if=/dev/sdd of=/dev/<new-hdd> bs=32000000

which produces an exact copy sector wise thus minimizing head movement.


All times are GMT -5. The time now is 09:04 PM.