[geeks] Copy a linux disk

Joshua Boyd jdboyd at jdboyd.net
Sat May 20 15:38:30 CDT 2006


On Sat, May 20, 2006 at 03:44:00PM -0500, Jonathan C. Patschke wrote:
> On Sat, 20 May 2006, Sandwich Maker wrote:
> 
> > " 1) Is there a better way to copy disks?  On Solaris I would
> > " ufsdump/ufsrestory, and likewise on Irix I would use xfsdump/xfsrestore
> >
> > is there some form of dump/restore [gdump?] in linux?  there oughta
> > be.
> 
> <quote>
> 
>    From:    Linus Torvalds
>    To:      Neil Conway
>    Subject: Re: [PATCH] SMP race in ext2 - metadata corruption.
>    Date:    Fri, 27 Apr 2001 09:59:46 -0700 (PDT)
>    Cc:      Kernel Mailing List <linux-kernel At vger Dot kernel Dot org>
> 
>    [ linux-kernel added back as a cc ]
> 
>    On Fri, 27 Apr 2001, Neil Conway wrote:
>    > > I'm surprised that dump is deprecated (by you at least ;-)).  What
>    > > to
>    > use instead for backups on machines that can't umount disks
>    > regularly?
> 
>    Note that dump simply won't work reliably at all even in 2.4.x: the
>    buffer cache and the page cache (where all the actual data is) are not
>    coherent. This is only going to get even worse in 2.5.x, when the
>    directories are moved into the page cache as well.
> 
>    So anybody who depends on "dump" getting backups right is already
>    playing Russian roulette with their backups.  It's not at all
>    guaranteed to get the right results - you may end up having stale data
>    in the buffer cache that ends up being "backed up".
> 
>    Dump was a stupid program in the first place. Leave it behind.
> 
> </quote>
> 
> I'm glad I run AIX, Solaris, and BSD.

If no one can make a dump for linux that can reliably read a RO disk,
then linux is really, really, really busted.

Currently I've settled on using cpio to copy most stuff, a script to
copy the essential parts of /dev, and grub-install from a livecd to make
the flash card bootable.

When things are finalized, I plan to just use dd to copy flash cards for
additional systems.

-- 
Joshua D. Boyd
jdboyd at jdboyd.net
http://www.jdboyd.net/
http://www.joshuaboyd.org/



More information about the geeks mailing list