Duane Clark wrote:
> 
> cmead wrote:
> > > Greg Wright wrote:
> > > > Look in the archives for various answers....but
> > > >
> > > > cp /dev/hdx /dev/hdx     where x is a different drive should copy
> > > > everything, cannot comment on flaws though...
> > >
> > > This would indeed copy the disk. But your new 40 GB disk would magically
> > > become a 10 GB disk!, and the only way to recover the missing space
> > > would be to reformat the disk. Not sure if that counts as a flaw though
> > >:-) This method really best works on identical disks.
> > >
> > > david wrote:
> > > > cp doesn't keep permissions, I learned this the hard way...
> > >
> > > You will notice that the copy command he was using specified raw devices
> > > rather than a filesystem. In that case, cp does in fact preserve
> > > everything. In fact, there is no need to partition the new disk, because
> > > cp will create and copy over all the partitions, including extended
> > > partitions. This includes Linux, boot, and swap partitions, and even
> > > Windoze partitions. I do this on a semi-regular basis. But again, it
> > > really only works well on identical disks.
> > >
> >
> > I suppose that you are rebutting Davids comments and not giving advice to my
> > problem: D
> >
> > Is that correct or am I misreading your comments?
> 
> Yes, that's right. While I regularly copy identical disks with cp, and
> so feel comfortable commenting on that, I have not done the task you are
> trying to do. Though typically when I want to copy entire pieces of a
> filesystem tree while preserving permissions, I use something along the
> lines of:
> 
> cd /home
> find . -mount | cpio -pvum  /mnt/tmp
> 
> But I have not tried that on the root disk, so I don't know whether it
> preserves all the special files like device files etc (though I think it
> does).
> 
> >
> > Essentially what you are saying is that if I did do the 'cp' command is
> > would preserve all permissions however the 40GB would be seen as two 5GB
> > partions ? and /home respectively?
> >
> 
> When copying raw devices, yep, that is what would happen. Plus
> presumably your original disk contains boot and swap partitions, so
> those would be copied too.
> 

  Personally I use cat or dd when bit level coping disks.  Example "cat
/dev/hda >/dev/hdb" is pretty much the fastest way to copy a disk to
another disk of the same type and size.  


  In any event.  Wouldn't it be easier to do a "cp -ax / /mnt/tmp"?  
Sure you could use a complex tar or cpio command, but why?



-- 
Solving people's computer problems always
requires more hardware be given to you.
(The Second Rule of Hardware Acquisition)
Samuel J. Flory  <[EMAIL PROTECTED]>



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to