Ask a Question related to Ubuntu, Design and Development.
-
Michael Hopkins #1
Cloning a disk
Hi all
What are people's preferences here on how to clone a server disk to a new
larger one? Am about to replace 60G IDE with faster 250G SATA.
I would like it to:
- be difficult to mess up, preferably a debian/ubuntu package that takes
care of all messy details e.g. symlinks, permissions, dates
- be completely reliable
- avoid fiddling about too much i.e. the use of floppies or ftp servers
TIA
Michael
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ _/ _/_/_/ Hopkins Research Ltd
_/ _/ _/ _/
_/_/_/_/ _/_/_/ [url]http://www.hopkins-research.com/[/url]
_/ _/ _/ _/
_/ _/ _/ _/ 'touch the future'
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Michael Hopkins Guest
-
Cloning
Okay, well that is what they call it in that Jasc software. But in illustrtor what would I do to do this? (Imagine a stick figure with trees behind... -
labeling a disk on AIX 5L / disk cmds
Hi folks ! I have got two question about disk operations: (01) Is there a separate cmd to explictly label a disk ? I don't mean assigning a... -
Removable disk, mapped network disk and drive letter problem
I don't know why this is such a big problem in Windows, but I hope somebody has a solution for it. You know those USB card readers used for... -
Installing Oracle Software on Local Disk Vs Shared Disk
Hi I am investigating on several options for a multi node VCS cluster to house oracle databases. Where would it be most advantageous to... -
Robert Hull #2
Re: Cloning a disk
In uk.comp.os.linux, on Mon 08 May 2006 12:28, Michael Hopkins
<michael.hopkins@hopkins-research.com> wrote:
> What are people's preferences here on how to clone a server disk to a
> new larger one? Am about to replace 60G IDE with faster 250G SATA.
man fdisk
man cp (pay attention to the -a option)
fdisk is not very easy to mess up>
> I would like it to:
>
> - be difficult to mess up,
cp will not copy nothing over something so is also hard to mess up
Sorry, fdisk and cp are basic shell commands rather than a debian> preferably a debian/ubuntu package
package :-(
cp -a does this>
> that takes care of all messy details e.g. symlinks, permissions,
> datescp is very reliable>
> - be completely reliableNo need for either>
> - avoid fiddling about too much i.e. the use of floppies or ftp
> servers
>
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/> TIA
>
> Michael
>
>
>_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/>
> _/ _/ _/_/_/ Hopkins Research Ltd
> _/ _/ _/ _/
> _/_/_/_/ _/_/_/ [url]http://www.hopkins-research.com/[/url]
> _/ _/ _/ _/
> _/ _/ _/ _/ 'touch the future'
>
>
Please correct your .sig separator
--
Robert HULL
Archival or publication of this article on any part of thisishull.net
is without consent and is in direct breach of the Data Protection Act
Robert Hull Guest
-
VS #3
Re: Cloning a disk
Michael Hopkins wrote:
>
> Hi all
>
> What are people's preferences here on how to clone a server disk to a new
> larger one? Am about to replace 60G IDE with faster 250G SATA.
>
> I would like it to:
>
> - be difficult to mess up, preferably a debian/ubuntu package that takes
> care of all messy details e.g. symlinks, permissions, dates
>
> - be completely reliable
>
> - avoid fiddling about too much i.e. the use of floppies or ftp servers
>
> TIA
>
> Michael
Hi Michael,
The disk-duplicator program (man dd) can be used to copy partitions
across disks, and may be worth looking at. Since it copies whole
partitions, symlinks, permissions, etc. are maintained across copies.
If both hard disks are on the same machine, booting off Knoppix and
copying partitions should be fairly easy. For eg: dd if=/dev/hda1
of=/dev/sda1
Regards,
Vinay.
VS Guest
-
Greg Hennessy #4
Re: Cloning a disk
On Mon, 08 May 2006 12:28:45 +0100, Michael Hopkins
<michael.hopkins@hopkins-research.com> wrote:
Download the bootable iso of G4U and use it.>
>
>Hi all
>
>What are people's preferences here on how to clone a server disk to a new
>larger one? Am about to replace 60G IDE with faster 250G SATA.
>
>I would like it to:
>
> - be difficult to mess up, preferably a debian/ubuntu package that takes
> care of all messy details e.g. symlinks, permissions, dates
>
> - be completely reliable
>
> - avoid fiddling about too much i.e. the use of floppies or ftp servers
[url]http://www.feyrer.de/g4u/[/url]
greg
--
Every Villian Is Lemons
Greg Hennessy Guest
-
Rikishi 42 #5
Re: Cloning a disk
Michael Hopkins wrote:
Put the new disk in the machine, partition it and use somthing like:> What are people's preferences here on how to clone a server disk to a new
> larger one? Am about to replace 60G IDE with faster 250G SATA.
cp -var /source/ /destination/
Check.> I would like it to:
>
> - be difficult to mess up, preferably a debian/ubuntu package that takes
> care of all messy details e.g. symlinks, permissions, dates
You'd get an error message, if there was a problem.> - be completely reliable
Fiddle-free.> - avoid fiddling about too much i.e. the use of floppies or ftp servers
--
Research is what I'm doing, when I don't know what I'm doing.
(von Braun)
Rikishi 42 Guest
-
Michael Hopkins #6
Re: Cloning a disk
On 8/5/06 22:45, in article [email]ioq4j3-431.ln1@whisper.geuens.org[/email], "Rikishi 42"
<fsck_spam@telenet.be> wrote:
Thanks to all for suggestions.> Michael Hopkins wrote:
>> Put the new disk in the machine, partition it and use somthing like:>> What are people's preferences here on how to clone a server disk to a new
>> larger one? Am about to replace 60G IDE with faster 250G SATA.
> cp -var /source/ /destination/
>> Check.>> I would like it to:
>>
>> - be difficult to mess up, preferably a debian/ubuntu package that takes
>> care of all messy details e.g. symlinks, permissions, dates
>> You'd get an error message, if there was a problem.>> - be completely reliable
>> Fiddle-free.>> - avoid fiddling about too much i.e. the use of floppies or ftp servers
>
I am used to rsync, so I will probably partition disk and then go that way
with excludes for /swap & such. I hadn't thought about cp -var but may look
into that too.
M
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ _/ _/_/_/ Hopkins Research Ltd
_/ _/ _/ _/
_/_/_/_/ _/_/_/ [url]http://www.hopkins-research.com/[/url]
_/ _/ _/ _/
_/ _/ _/ _/ 'touch the future'
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Michael Hopkins Guest
-
Gordon Henderson #7
Re: Cloning a disk
In article <hIL7g.84335$dW3.22247@newssvr21.news.prodigy.com> ,
VS <vs@noidea.net> wrote:
I'm just being a boring old fart who'd been using *nix for almost 30>The disk-duplicator program (man dd) can be used to copy partitions
>across disks, and may be worth looking at. Since it copies whole
>partitions, symlinks, permissions, etc. are maintained across copies.
years now... dd means convert and copy, but cc had already been used.
It's original use was for converting tape files, and dealing with EBCDIC
and ASCII conversions.
However, it does copy disks and partitions quite well.
The down-side is that the partitions & disks need to be exactly the same
size to do the copy successfully, and although there does exist various
partition and filesystem re-sizing utilities, you're far better off
without them IMO unless it's a real emergency, or you have no other
choice.
Gordon
Gordon Henderson Guest
-
Simon Waters #8
Re: Cloning a disk
On Mon, 08 May 2006 23:01:44 +0100, Michael Hopkins wrote:
I've just been through both with Debian Sarge,>
> Thanks to all for suggestions.
>
> I am used to rsync, so I will probably partition disk and then go that way
> with excludes for /swap & such. I hadn't thought about cp -var but may look
> into that too.
dd and rsync copies of boxes.
I much preferred dd, which also does XP disk upgrades fine as well;
[url]http://www.debian-administration.org/users/simonw/weblog/34[/url]
Roughly the rsync route was;
Base install on new server.
Sync apt settings (used rsync on /etc/apt). apt-get update.
Use dpkg set selection to match up the base systems (probably not strictly
required as rsync does most of this, but I figured better safe than
sorry). I manually changed the kernel entries and one or two others in the
selection file.
Then (and it'll need customising).
rsync -avz \
--exclude /etc/apt \
--exclude /sys \
--exclude /dev \
--exclude /proc \
--exclude /boot \
--exclude "/vmlinu*" \
--exclude "/initrd*" \
--exclude /etc/network \
--exclude /etc/modules \
--exclude /etc/modules.conf \
--exclude /lib/modules \
--exclude /etc/mdadm \
--exclude /etc/fstab \
--exclude /etc/mtab \
--exclude "/var/lib/dpkg/info/kernel-image-2.4.27-2-686-smp*" \
--exclude "/var/lib/dpkg/info/kernel-image-2.6.8-2-386*" \
--exclude /var/spool \
--exclude /var/run \
/ $DESTINATION:/
I then had separate scripts to sync some data from "/var/spool" once the
mail server and other services were stopped. And also one to sort out
"/etc/network/interfaces".
I also wrote a script to stop/start services on both boxes (same set of
services of course, so same script), since that is useful, and easier than
single user mode.
Running "update-grub" on the target is a good idea afterwards depending
what happened to the kernel packages, but of course grub give you plenty
of scope to TRY(!) and rescue things if you didn't.
Chances are your mileage will vary -- I had to mess about a bit because
the new machine couldn't use the same stock Debian kernels as the old. So
far my frankstein machine doesn't show any ill effects from the move, and
I used the same scripts to clone it back to the original when the hardware
was fixed.
I also did the odd "apt-get clean" and purged CPAN cache, and excluded
backups etc, to speed the process before I ran the rsync.
The good thing about rsync is you can do it again after testing, if it
didn't work. But note I didn't include "--delete" so you risk accumulating
spare files.
Compared to "dd" this all seems very hit and miss to me, I have more faith
in gparted, and the ability of most modern filesystems to be resized, than
in my ability to get this transfer 100%.
Although generally for dd you ideally want a large external hard disk,
and plenty of down time, the sarge server I did got swapped with less than
5 minutes down time, and most of that was me manually running a handful
of scripts, and a reboot to make sure it looked solid.
Use "dd", live less close to the edge.
Simon Waters Guest



Reply With Quote

