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] disk devices are always /dev/xvdX

To: Simon Hobson <linux@xxxxxxxxxxxxxxxx>, "xen-users@xxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-users] disk devices are always /dev/xvdX
From: "Fan, Huaxiang" <hufan@xxxxxxxxxxxx>
Date: Thu, 12 May 2011 07:19:20 +0000
Accept-language: en-US
Cc:
Delivery-date: Thu, 12 May 2011 00:21:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <p06240829c9f137977e08@xxxxxxxxxxxxxxxxxxxxxx>
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: <697078.94163.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <E71FC5D6F96C3C4B93FC8FF942D924C6379984A5@xxxxxxxxxxxxxxxxxxxxxx> <BANLkTinm_WUVOkZJgG0g9QGQV=grZPuWmQ@xxxxxxxxxxxxxx> <E71FC5D6F96C3C4B93FC8FF942D924C6379984F7@xxxxxxxxxxxxxxxxxxxxxx> <p06240829c9f137977e08@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AQHMEGHbwNp+Pn2y70mEaPC+QTuNmJSIpA+ggAB/f4D//5xtkIAAfCKA//+MMqA=
Thread-topic: [Xen-users] disk devices are always /dev/xvdX
Hi Simon,
Thanks for your teaching! I totally agree with all your points. They are kind 
of legacy codes. We might put effort to review those codes if we can't rename 
xvdb back to sdb elegantly.
Thanks,
Huaxiang

-----Original Message-----
From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx 
[mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Simon Hobson
Sent: Thursday, May 12, 2011 3:11 PM
To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-users] disk devices are always /dev/xvdX

Fan, Huaxiang wrote:

>We have some bash/python scripts hardcode /dev/sdb and 
>/sys/block/sdb/size. udev rules can not change sysfs, right? Those 
>scripts work on 2.6.18-xen domu, but when we migrate to 2.6.32.39 
>domu, it seems we are reluctant to adjust those codes.

Oops. It's always a good idea to set values like that once at the top 
of a script, if not in a separate config file. With bash it's fairly 
easy to do :

   config=/etc/default/myscript-settings
   [ -r "${config} ] && . "${config} || <report an error>

It's even more important to do this if you have several separate 
scripts that woudl share common settings.

Never hard code them throughout the code or you find it causes 
maintenance problems down the road.
It doesn't need Xen to change device names under you - some recent 
changes have meant hd* devices changing to sd* devices for example.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<br>To report this as spam, please forward to spam@xxxxxxxxxxxxx  Thank you.

Protected by Websense Email Security Gateway - www.websense.com


 Protected by Websense Hosted Email Security -- www.websense.com 

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