Portal Home > Knowledgebase > Articles Database > LINUX: Bad blocks on HDD, any way to fix and clone HDD into new one (no downtime)?


LINUX: Bad blocks on HDD, any way to fix and clone HDD into new one (no downtime)?




Posted by hostbox, 09-08-2009, 11:40 AM
Hi guys, One of my server 500GB hdd's seem to be crashing, I have fixed this block several times, however it keeps coming back. I wrote all 0's on that sector and followed a tutorial to make that block unavailable for the system. For whatever reason it seems to still be an issue so I want to swap the HDD. Are there any tools that will allow me to "clone" my linux hdd, while NOT copying over the bad sectors? I am looking at minimum downtime please. Off-line tools like Acronis would take at least 3 hours, if there was a software that I could run with the server still active it would be great. I have a spare hardware node available with the same specs.

Posted by nomankhn, 09-08-2009, 01:52 PM
Hello, As you mention you have already have same specs node ready, then transferred the related data via rsync and restart services, data should be in same directories. About tool you can use dd, dd if=/dev/sda1 of=firstpartion.iso [sda1 is the partition u want backup] after that you can transfer the file on new server and mount it like. mount firstpartion.iso -o ro,loop /mnt and you need whatever files you can copy here to new server. Down time in both cases is very rare, i am assuming your document files not going to update, so after all transfer of every thing, you can again take backup of mysql database from old server and restore to new server and change the ip address in your name server accordingly.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read