ia64/xen-unstable

changeset 1657:720ab2010246

bitkeeper revision 1.1041.1.9 (40e43dae6tkOjKpGS7n77Q_WIw-vwg)

Fixing drive finding with scsi arrays in Xend
author tw275@striker.cl.cam.ac.uk
date Thu Jul 01 16:37:02 2004 +0000 (2004-07-01)
parents c6692e37c11f
children d9a96380ff94
files BitKeeper/etc/logging_ok tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/BitKeeper/etc/logging_ok	Thu Jul 01 15:20:59 2004 +0000
     1.2 +++ b/BitKeeper/etc/logging_ok	Thu Jul 01 16:37:02 2004 +0000
     1.3 @@ -39,4 +39,5 @@ smh22@uridium.cl.cam.ac.uk
     1.4  sos22@labyrinth.cl.cam.ac.uk
     1.5  tlh20@elite.cl.cam.ac.uk
     1.6  tlh20@labyrinth.cl.cam.ac.uk
     1.7 +tw275@striker.cl.cam.ac.uk
     1.8  xenbk@gandalf.hpl.hp.com
     2.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Thu Jul 01 15:20:59 2004 +0000
     2.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Thu Jul 01 16:37:02 2004 +0000
     2.3 @@ -79,8 +79,13 @@ def lookup_raw_partn(partition):
     2.4  
     2.5      if not re.match( '/dev/', partition ):
     2.6          partition = '/dev/' + partition
     2.7 -
     2.8 -    drive = re.split( '[0-9]', partition )[0]
     2.9 +        
    2.10 +    """Try and match non-standard scsi raid arraysa
    2.11 +    """
    2.12 +    if re.match( '/dev/cciss/c[0-9]+d[0-9]+p[0-9]+', partition ):
    2.13 +        drive = re.split( 'p[0-9]+', partition )[0]
    2.14 +    else:
    2.15 +        drive = re.split( '[0-9]', partition )[0]
    2.16  
    2.17      if drive == partition:
    2.18          fd = os.popen( '/sbin/sfdisk -s ' + drive + ' 2>/dev/null' )