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.

Duane



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

Reply via email to