[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Need advice on cloning Debian server



I haven't actually done it, but you should be able to boot to a live
CD initialize the raid and LVM and then add a removable  HD to the VG.
 Create new LV's the same size as  your existing ones but make sure
you create them on the removable PV then use dd or similar to clone
the LV's.  Once cloned you can vgsplit to make the removable drive
it's own VG that  you can then make inactive with vgchange then remove
and move to the new hardware.  Once on the new hardware you vgmerge to
make it all one VG  then pvmove the LV's from the removable drive to
the new hardware. Once that is done you can vgreduce to remove the
external HD from the VG and then pvremove to remove the LVM info from
the external.  if your system can't be down that long, you might be
able to snapshot from the live cd then reboot the old system and then
do the cloning and transferring based from the snapshot.  Again -
sorry but I haven't done this to a running OS just to virtual machines
so this is a lot of theory.  Another option, (that I have absolutely
no experience with,) is doing the same thing over a SAN.  Another
thing that you will want to pay particular attention to is making sure
fstab and grub2 are configured properly for the new system.  I am sure
where you have a working system you already know this, but for those
who find this and want to put LVM on top of a raid with Grub2, make
sure you create the raid with the .9 version of the metadata or Grub2
won't work with it.

Hope this helps
Shane

On Wed, May 30, 2012 at 8:40 AM, Camaleón <noelamac@gmail.com> wrote:
> On Tue, 29 May 2012 12:35:40 +0800, Joe Aquilina wrote:
>
>> I am relatively new to Linux/Debian and need some advice on "cloning" a
>> Debian system.
>
> Then I'd ask for someone with more experience can help you with this
> because cloning a full system on different hardware with the setup you
> describe is not an easy task. Seriously.
>
>> At work we have a Debian file server, running Squeeze, which needs to be
>> cloned to new hardware and then the old machine will be retired. It is a
>> file server for a small office, has 4 smallish SATA drives and is setup
>> with RAID 5 and LVM.
>
> (...)
>
> I used in the past Clonezilla (LiveCD) to achieve the same but with a
> simpler setup (non-raided, non-lvm system), so the main things to care
> about would be the LVM volume, the raid layout (I think Clonezilla does
> not support mdadm, you will have to manually configure the raid) and also
> the boot loader.
>
> Rsync, as you mention, can be also an option but I can't comment on this
> because I have no previous experience in cloning with that tool.
>
> Greetings,
>
> --
> Camaleón
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] jq5bhm$l92$7@dough.gmane.org">http://lists.debian.org/[🔎] jq5bhm$l92$7@dough.gmane.org
>



-- 
Shane D. Johnson
IT Administrator
Rasmussen Equipment


Reply to: