WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] dual personalities - solved!

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] dual personalities - solved!
From: Urs Thuermann <urs@xxxxxxxxxxxxxxxxx>
Date: 30 Sep 2005 07:37:43 +0200
Delivery-date: Fri, 30 Sep 2005 05:37:46 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <433B6B12.3040102@xxxxxxxxxx>; from Kent Watsen on Wed, 28 Sep 2005 21:18:26 -0700
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <433A64F1.7010804@xxxxxxxxxx> <433A6EDC.2040603@xxxxxxxxxxxx> <433AB7E5.9060909@xxxxxxxxxx> <433B6B12.3040102@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7
Kent Watsen <kent@xxxxxxxxxx> writes:

> I should have called:
> 
>     cp -ax /mnt/hdb1/* /mnt/suse-root

Using cp with multiple (esp. directory) arguments often does not
exactly what one expects, because it works very similar to

    for d in /mnt/hdb1/*; do cp -ax $d /mnt/suse-root; done

and that means, a file that is hardlinked in several of these
directories will not be hardlinked in the copy, but instead you will
have multiple copies of it.  I have sometimes used something like

    cp -ax /mnt/hdb1 /mnt/suse-root
    mv /mnt/suse-root/hdb1/* /mnt/suse-root
    rmdir /mnt/suse-root/hdb1

instead but usually I prefer using tar that doesn't have this problem
(or dd if copying whole block devices as in your case).

Having hardlinks between different top-level directories is very
unlikely it's not a problem in this case but you should always
remember this behavior when cp'ing multiple directories.


urs

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>