On Tue, 15 Aug 2006, andy liebman wrote:
-- If I were to create disk images of EACH drive (i.e., /dev/sda and
/dev/sdb), could I restore each of those images to NEW drives -- with
all of their respective partitions -- and have a working RAIDED OS? I
ask because my ultimate goal is to put a RAIDED OS on many systems, and
once I get ONE working, it would be nice to clone them the way I already
clone SINGLE OS drives. Can you clone RAIDS?
Yes.
I did this some time back to create half a dozen identical systems. I did
it with IDE drives, but I don't see why it won't work with SCSI/SATA.
The first thing you need is to make sure the partition tables are
identical on both drives. (you probably don't, but it'll be much easier)
So I started with my good system, and had a copy of the partition table on
hda:
# sfdisk -d /dev/hda > ~hda.part
Made sure all partitions were insync, then shut it down and remove hdb,
and replace it with a new blank disk of the same size.
It booted just fine, with all partitions degraded.
Put the parittion table on the new blank hdb:
# sfdisk /dev/hdb < ~/hda.part
then I hot-added each partition. eg:
# mdadm --add /dev/md1 /dev/hdb1
and so on.
Thanks Gordon,
I may not have been clear what I was asking. I wanted to know if you can
make DISK IMAGES -- for example, with a program like Norton Ghost or
Acronis True Image (better) -- of EACH of the two OS drives from a
mirrored pair. Then restore Image A to one new disk, Image B to another
disk. And then have a new working mirrored pair.
There is absolutely NO PROBLEM making images of single disks and
restoring them to new disks (thus, creating clones). And it is very
fast. For an OS drive with about 4 GBs of data, it only takes about 5
minutes to make the image and 3 to restore it. So, after making the
first set of images, it would in theory take under 10 minutes to restore
a mirrored pair.
I'm just trying to find out if there would be any "gotchas" in restoring
mirrored drives. I can't think of any, but you never know. I'm not
worried about hostnames. That's easy to fix.
Andy
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html