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: "Fajar A. Nugraha" <list@xxxxxxxxx>
Subject: RE: [Xen-users] disk devices are always /dev/xvdX
From: "Fan, Huaxiang" <hufan@xxxxxxxxxxxx>
Date: Thu, 12 May 2011 06:51:14 +0000
Accept-language: en-US
Cc: "xen-users@xxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 11 May 2011 23:54:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BANLkTinm_WUVOkZJgG0g9QGQV=grZPuWmQ@xxxxxxxxxxxxxx>
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>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AQHMEGHbwNp+Pn2y70mEaPC+QTuNmJSIpA+ggAB/f4D//5xtkA==
Thread-topic: [Xen-users] disk devices are always /dev/xvdX
Thanks Fajar,

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.

Thanks,
Huaxiang

-----Original Message-----
From: Fajar A. Nugraha [mailto:list@xxxxxxxxx] 
Sent: Thursday, May 12, 2011 1:43 PM
To: Fan, Huaxiang
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] disk devices are always /dev/xvdX

On Thu, May 12, 2011 at 12:10 PM, Fan, Huaxiang <hufan@xxxxxxxxxxxx> wrote:
> Thanks Mark,
> I used the domu kernel built from stable/2.6.32.x git branch. It seems only 
> accept xvdX. Any workaround you can offer to rename xvdX to sdX? Otherwise, 
> we might need to change our codes.

AFAIK there is no way to do that.

What change of code do you mean? If it's OS config files (like grub's
menu.lst, or fstab), then the best practice right now is to use LABEL
or UUID so it doesn't really care what the actual disk names are.

Another approach you can take is to create custom udev rules which
(for example) create a link /dev/sda to /dev/xvda. See existing udev
rules for persistent storage (usually in /etc/udev/rules.d or
/lib/udev/rules.d)

-- 
Fajar

>
> Thanks in advance
> Huaxiang
>
> -----Original Message-----
> From: Mark Pryor [mailto:tlviewer@xxxxxxxxx]
>
>
> --- On Wed, 5/11/11, Fan, Huaxiang <hufan@xxxxxxxxxxxx> wrote:
>
> From: Fan, Huaxiang <hufan@xxxxxxxxxxxx>
> Subject: [Xen-users] disk devices are always /dev/xvdX
> To: "xen-users@xxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxx>
> Date: Wednesday, May 11, 2011, 9:50 PM
>
>
>
> Hi gurus,
>
> The page
> http://wiki.xensource.com/xenwiki/XenParavirtOps says disk devices on domu 
> are always /dev/xvdX. And I failed when I try to map a raw disk to domu with 
> the name /dev/sdb. The line  'phy:sdb,sdb,w' in domu config file doesn't take 
> effect. Actually I found
>  a raw disk named /dev/xvdf on the domu.
> Anybody got any idea why xen4 put such restriction? How to map to other names 
> such as /dev/sdb on domu?
>
> Thanks,
>
> HUAXIANG FAN
> -------------------
>
> Maverick (10.10) will accept sdX from the xm config. Maybe Natty will too, 
> but not Lucid or Karmic, which want xvdX.
>
> See also:
> http://lists.xensource.com/archives/html/xen-users/2011-01/msg00120.html
>
>
<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