[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.