[opensuse] Re: hard drive replacement question
David C. Rankin a écrit :
dd if=/dev/sda of=/dev/sdb
if fstab uses /dev/sdx system, with disk names or ID, have to change it anually works if disks are same size jdd -- http://www.dodin.net http://valerie.dodin.org http://news.opensuse.org/2009/04/13/people-of-opensuse-jean-daniel-dodin/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Le April 25, 2009 06:16:45 am jdd, vous avez écrit :
David C. Rankin a écrit :
dd if=/dev/sda of=/dev/sdb
if fstab uses /dev/sdx system, with disk names or ID, have to change it anually
works if disks are same size
jdd
-- http://www.dodin.net http://valerie.dodin.org http://news.opensuse.org/2009/04/13/people-of-opensuse-jean-daniel-dodin/
What about Clonezilla: http://clonezilla.org/ Andre. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi there, David is totally correct about dd being the way to go - one slightly better way to go though is ddrescue with does a much better job at recovering the salvageable sections first, then retrying the bad sector areas. You can also use a log file so the operation can be resumed if interrupted, etc. Also, verify the drive geometries are exactly correct, just because you have two "160GB drives" does not mean they have the same CHS values and (more important) sectors, which can cause corruption if the destination has fewer sectors - your will get all kinds of interesting fsck messages ;) http://www.timelordz.com/wiki/index.php/Dd_Rescue ddrescue is on most live CDs, etc. Note there are two programs, ddrescue and dd_rescue - I recommend ddrescue for the log file capability. Good luck! Pete -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday, 2009-04-25 at 10:22 -0400, peby@sagonet.com wrote:
David is totally correct about dd being the way to go - one slightly better way to go though is ddrescue with does a much better job at recovering the salvageable sections first, then retrying the bad sector areas. You can also use a log file so the operation can be resumed if interrupted, etc.
I have to disagree. Not unless you have to do an fsck on the image, or if there are bad areas which you try to recover. The old HD is still working, and there is a full backup. And even in that case, a file copy works fine, it will simply fail on broken files, which can then be recovered from the backup instead. Not to forget, there is clonezilla, specifically made for this situation: replacing a HD, cloning a system. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAknzJcQACgkQtTMYHG2NR9UI7QCbBvdCayRQE4l7SeBW7U3b40bk kUgAn0MENOrTxytOrvkX1/W7m49arLaT =G77K -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday, 2009-04-25 at 10:22 -0400, peby@sagonet.com wrote:
David is totally correct about dd being the way to go - one slightly better way to go though is ddrescue with does a much better job at recovering the salvageable sections first, then retrying the bad sector areas. You can also use a log file so the operation can be resumed if interrupted, etc.
I have to disagree.
Not unless you have to do an fsck on the image, or if there are bad areas which you try to recover. The old HD is still working, and there is a full backup.
And even in that case, a file copy works fine, it will simply fail on broken files, which can then be recovered from the backup instead.
Not to forget, there is clonezilla, specifically made for this situation: replacing a HD, cloning a system.
- -- Cheers, Carlos E. R.
Carlos, Clonezilla is file system aware - and does not work on LVM, it simply falls back to dd anyway in that case, and he might well be using LVM if he used the default partitioning of a newer distro. If there are bad sectors (which in this case it appears there are) using a block copy method might be a better way to go and could potentially even recover a read error on a sector where as rsync certainly will not. It is also possibly rsync will simply fail depending on the number of bad sectors, etc. Either way will work, but why worry about partitioning, rsyncing, read errors and recovery from backups when one command will likely accomplish it all? ddrescue /dev/sda /dev/sdb. Done. Pete -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
peby@sagonet.com wrote:
Clonezilla is file system aware - and does not work on LVM,
The webpage says it does.
Either way will work, but why worry about partitioning, rsyncing, read errors and recovery from backups when one command will likely accomplish it all? ddrescue /dev/sda /dev/sdb. Done.
Does ddrescue also automagically resize the filesystem? /Per -- Per Jessen, Zürich (22.8°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday April 25 2009, Per Jessen wrote:
...
Does ddrescue also automagically resize the filesystem?
Ddrescue is an I/O utility, not a filesystem utility. All it does is try very hard to overcome transient I/O errors by retrying a lot until it gets no reported I/O error. (I don't know offhand whether it reads multiply to make sure that even in the absence of a reported error the data is not varying. I know there are CD ripping programs that do that.) So the answer is "no, ddrescue does not automatically—or even manually— resize filesystems."
/Per
-- Per Jessen, Zürich (22.8°C)
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz wrote:
On Saturday April 25 2009, Per Jessen wrote:
...
Does ddrescue also automagically resize the filesystem?
Ddrescue is an I/O utility, not a filesystem utility. All it does is try very hard to overcome transient I/O errors by retrying a lot until it gets no reported I/O error. (I don't know offhand whether it reads multiply to make sure that even in the absence of a reported error the data is not varying. I know there are CD ripping programs that do that.)
So the answer is "no, ddrescue does not automatically—or even manually— resize filesystems."
That's what I thought - and why I thought it would be a poor choice. /Per -- Per Jessen, Zürich (13.6°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday, 2009-04-25 at 11:51 -0400, peby@sagonet.com wrote:
If there are bad sectors (which in this case it appears there are)
He didn't say so.
Either way will work, but why worry about partitioning, rsyncing, read errors and recovery from backups when one command will likely accomplish it all? ddrescue /dev/sda /dev/sdb. Done.
Because the original HD is only 8GB, and the new one could be anything from 10 to 100 times bigger. There is need to repartition. Because replacing a disk is a good opportunity to change partition layout. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAknzQcwACgkQtTMYHG2NR9XWWgCfWQ7cQTYRGXMrPSox0ftka2KN 26YAmweIgJbIRUipsE94qiSUb5FW3ybf =Gx0H -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (6)
-
Andre Malin
-
Carlos E. R.
-
jdd
-
peby@sagonet.com
-
Per Jessen
-
Randall R Schulz