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-devel

[Xen-devel] blkif requires /dev/hdX for xm create /w devfs

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] blkif requires /dev/hdX for xm create /w devfs
From: "Erik de Bruijn - BudgetDedicated.com" <Erik@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 27 Nov 2004 00:22:27 +0100
Delivery-date: Sat, 27 Nov 2004 17:46:21 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Organization: BudgetDedicated
Reply-to: Erik@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.9 (Windows/20041103)
Hello all,

We have a host that has no /dev/hd{a,b,c,d}, only serial ATA (/dev/hde through hdi). It runs devfs, so it has no entries for devices that do not seem to be present. /dev/hda1 does not exist.

When trying to create a new xm domain, it will not be able to stat /dev/hda1 when it tries to look up the device number(s) of it. When /dev/hda1 exists it does work. Is this behavior appropriate? Are domain0's major/minor number better to use than the known standard entries? If not, I suggest modifying it. If it is, the patch could still be aplied for systems that lack the /dev/ entries as fallback information.

It can probably rely on the following information, because it's common to most/all POSIX systems:

hda: 3,0
hda1-20: 3,1-20
hdb: 3,64
hdb1-20: 3,65-84
hdc: 22,0
hdc1-20: 22,1-20
hdd: 22,64
hdd1-20: 22,65-84

If you don't want to assume such a numbering scheme it would be nicest to have it recognise devfs, making it devfs compliant, though I'd understand if you have more important things to do!

I'm no python expert, but here's a pseudocode patch:

INPUT: $hddev (examples: hda1, hdd8)

hd_offsets = [ a = 0, b = 64, c = 0, d = 64 ]
$1, $2 = regex("hd([a-d])([0-9]{1,2})",$hddev)

hd_offset = $hd_offsets[$1]
hd_minor = $2 + hd_offset
hd_majors = [ a = 3, b = 3, c = 22, d = 22 ]
hd_major = hd_majors[$1]

OUTPUT: hd_major, hd_minor

I believe this should be written for xen-2.0.bk/dist/install/lib/python/xen/xend/server/blkif.py, somewhere below line 54.

I hope this stupid example speeds up the process of resolving this issue. In the mean time I'll work around it by providing a fake /dev.

My assumptions are based on this output:

host home # tail -f /var/log/xend.log
host home # xm create pijan.xenconf -c
Using config file "pijan.xenconf".
Error: Error creating domain: vbd: Device not found: hda1
host home # [2004-11-26 23:28:32 xend] DEBUG (XendDomainInfo:720) init_domain> Created domain=24 name=bla memory=512 [2004-11-26 23:28:32 xend] INFO (console:92) Created console id=13 domain=24 port=9624 [2004-11-26 23:28:32 xend] DEBUG (XendDomainInfo:1102) Creating vbd dom=24 uname=file:/home/VMs/bla//root_fs [2004-11-26 23:28:32 xend] DEBUG (blkif:63) exception looking up device number for hda1: [Errno 2] No such file or directory: '/dev/hda1' [2004-11-26 23:28:32 xend] DEBUG (XendDomainInfo:674) Destroying vbds for domain 24
[2004-11-26 23:28:32 xend] DEBUG (blkif:541) Destroying blkif domain=24
[2004-11-26 23:28:32 xend] DEBUG (XendDomainInfo:634) Closing console, domain 24 [2004-11-26 23:28:32 xend] DEBUG (XendDomainInfo:622) Closing channel to domain 24 [2004-11-26 23:28:32 xend] ERROR (SrvBase:162) op=create: Error creating domain: vbd: Device not found: hda1

As comparison, a working device number (when issuing it with "hdi1"):

[2004-11-26 23:45:40 xend] INFO (console:92) Created console id=13 domain=25 port=9625 [2004-11-26 23:45:41 xend] DEBUG (XendDomainInfo:1102) Creating vbd dom=25 uname=file:/home/VMs/bla/root_fs [2004-11-26 23:45:41 xend] DEBUG (blkif:146) Connecting blkif <BlkifBackendInterface 25 0> [2004-11-26 23:45:41 xend] DEBUG (XendDomainInfo:1102) Creating vbd dom=25 uname=file:/home/VMs/bla/swap_fs [2004-11-26 23:45:41 xend] DEBUG (blkif:63) exception looking up device number for hda2: [Errno 2] No such file or directory: '/dev/hda2' [2004-11-26 23:45:41 xend] DEBUG (XendDomainInfo:674) Destroying vbds for domain 25
[2004-11-26 23:45:41 xend] DEBUG (blkif:541) Destroying blkif domain=25
[2004-11-26 23:45:41 xend] DEBUG (blkif:397) Destroying vbd domain=25 idx=0
[2004-11-26 23:45:41 xend] DEBUG (XendDomainInfo:634) Closing console, domain 25 [2004-11-26 23:45:41 xend] DEBUG (XendDomainInfo:622) Closing channel to domain 25 [2004-11-26 23:45:41 xend] ERROR (SrvBase:162) op=create: Error creating domain: vbd: Device not found: hda2

I hope I'm helpful!

--
Kind regards,

Erik de Bruijn
BudgetDedicated

www.BudgetDedicated.com | Tel. +31 492 430559 | Fax. +31 492 663870 | Mob. +31 
6 21856715 | Adres: Haagwinde 16 | Zipcode NL-5731 WD Mierlo



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

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