moving stuffs between harddisk
Roger Oberholtzer
roger
Sun Feb 6 11:04:22 PST 2005
On Sun, 2005-02-06 at 22:18 +0800, Man-wai Chang wrote:
> the old 5400rpm 20G harddisk (hda) of my linux server is getting.
> I have a spare 7200rpm 20G harddisk (hdc).
>
> what's the fastest way of moving everything from the old harddisk to the
> new harddisk? is it:
>
> dd if=/dev/hda of=/dev/hdc bs=1024000
>
> if the 2 disks have different geometry, will it work?
As long as the new hard disk is not smaller than the old it should work.
Keep in mind that this may also copy /proc, /dev and a few other places
that should probably not just be copied. So, after the copy, I would
make sure they are empty on the new disk.
Another approach is to make a partition on the new disk (mounted as,
say, /dst) and then use 'cp -a / /dst'. You can also mount your current
'/' a second time on, say, /src, and then when you do the copy, no other
things like /proc or mounted files systems will be copied. There is some
mount option that lets you do this remount in the needed way. I can find
it out if you need. This would also ley to change the file system type
to something else at the same time (being sure support is in the kernel
before making the change).
--
Roger Oberholtzer <roger at opq.se>
More information about the Linux-users
mailing list