Good day everyone - This maybe somewhat OT, but I was wondering if anyone can recommend a good tool for cloning *nix drives. The one thing though is that I will be cloning a smaller drive than the destination drive and would like to distribute the free space accordingly on the new drive. Can anyone recommend anything? Thanks in advance. :::::::::::::::::::::: Dustin
You could check out g4u. I use it to duplicate drives on a pretty frequent basis, but I haven't done the redistribution of free space. My drives have always been either identical or a restore because I did a nice job of mangling something. :) It's all opensource and is based on NetBSD. http://www.feyrer.de/g4u/ -mike ----- Original Message ----- From: "lists" <mailinglists at backbonetechnology.com> To: "Centos List" <centos at centos.org> Sent: Friday, December 02, 2005 12:39 PM Subject: [CentOS] cloning drives> Good day everyone - This maybe somewhat OT, but I was wondering if anyone > can recommend a good tool for > cloning *nix drives. The one thing though is that I will be cloning a > smaller drive than the destination drive and > would like to distribute the free space accordingly on the new drive. > > Can anyone recommend anything? > > Thanks in advance. > > :::::::::::::::::::::: > Dustin > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos > >
G4U (Ghost for Unix) (http://www.feyrer.de/g4u/) It'll clone an entire drive, or by partition. The partition cloning should work for the resizing you are looking to do. Andrew lists wrote:> Good day everyone - This maybe somewhat OT, but I was wondering if anyone can recommend a good tool for > cloning *nix drives. The one thing though is that I will be cloning a smaller drive than the destination drive and > would like to distribute the free space accordingly on the new drive. > > Can anyone recommend anything? > > Thanks in advance. > > :::::::::::::::::::::: > Dustin > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >
On Fri, 2005-12-02 at 11:39, lists wrote:> Good day everyone - This maybe somewhat OT, but I was wondering if anyone can recommend a good tool for > cloning *nix drives. The one thing though is that I will be cloning a smaller drive than the destination drive and > would like to distribute the free space accordingly on the new drive. > > Can anyone recommend anything?The straightforward way to deal with size mismatches or different filesystem types is to fdisk/mkfs/mkswap the new partitions yourself then copy the contents over from the matching source partition using any number of ways that preserve the attributes. If the destination is connected in the same box I usually use: cd source_mount_point; cp --one-file-system -a . /dest_mount_point but tar and rsync work as well. You also need to either label the partitions to match the old ones or fix what will be the new /etc/fstab and /boot/grub/grub.conf to use device names for the partitions instead of labels. The last step is to run grub to make the new drive bootable. You can either hunt up the instructions to install on a different drive or just move the drive to it's new location, boot the Centos install CD with 'linux rescue' at the boot prompt, "chroot /mnt/sysinstall" when it tells you, and run grub-install from there. Then exit (twice) to reboot. An alternative that would probably work would be to boot the source machine with the CD in rescue mode, use dd to copy the source to target device, then expand the partition to use the additional space and resize the filesystem. -- Les Mikesell lesmikesell at gmail.com