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] hotplug Backup-hdd

To: "Tegger" <xen@xxxxxxxxx>, "Xen Users" <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-users] hotplug Backup-hdd
From: "James Harper" <james.harper@xxxxxxxxxxxxxxxx>
Date: Mon, 27 Sep 2010 17:27:59 +1000
Cc:
Delivery-date: Mon, 27 Sep 2010 00:29:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C9EB4A5.8060706@xxxxxxxxx>
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4C9EB4A5.8060706@xxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: ActdJaEwT/697keAQBOpSF59LZtt8AA7r/pg
Thread-topic: [Xen-users] hotplug Backup-hdd
> 
> i have a system with
> 
> /dev/sda - System Hard Drive
> 
> /dev/md0 - SoftwareRaid 5 for Data
> with
> /dev/sdb
> /dev/sdc
> /dev/sdd
> 
> 
> Now i have one more in a removeable frame for Backup
> /dev/sde
> 
> /dev/md0 is forwarded to an Samba-Domain for Data service in the
network.
> What's the best way to sync the data from /dev/md0 to /dev/sde ?
> 
> is a domain hotplug able ? So when i plug in /dev/sde, it's automatic
> forwards to Samba domain, is this possible ?
> 

'xm block-attach' and 'xm block-detach' are the commands to plug and
unplug devices from a DomU. You should be able to do this automatically
via udev - make a rule that identifies your device by serial number or
path (/dev/disk/by-id/... or /dev/disk/by-path/...) and make a RUN +=
command that does the 'xm block-attach', and the opposite on unplug. Not
sure if you're asking for trouble with the unplug though - domu might
get upset when the underlying device goes missing before it is unplugged
from the domain.

As I hinted above, it really is best to use /dev/disk/by-id/ or
/dev/disk/by-path/ to be absolutely sure that you have the right device.
If you attach an eSATA device one day and it bumps all your devices up
by one (eg /dev/sdd becomes /dev/sde) then you'll suddenly have one of
your RAID devices attached to your DomU instead, and nothing good will
come of that.

/dev/disk/by-id/... is useful when you want a specific physical disk as
you can refer to it via make, model, and serial number.

/dev/disk/by-path/... is useful when you want to refer to a disk plugged
into a specific USB port (unless your USB adapters are enumerated in
random order... then you're screwed!). I do this will USB backup disks.

James

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

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