mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
bitkeeper revision 1.1041.1.9 (40e43dae6tkOjKpGS7n77Q_WIw-vwg)
Fixing drive finding with scsi arrays in Xend
This commit is contained in:
1 parent
788b1c4771
commit
87a12f54d3
2 files changed
+8
-2
No files matched your search
@@ -79,8 +79,13 @@ def lookup_raw_partn(partition):
|
||||
|
||||
if not re.match( '/dev/', partition ):
|
||||
partition = '/dev/' + partition
|
||||
|
||||
drive = re.split( '[0-9]', partition )[0]
|
||||
|
||||
"""Try and match non-standard scsi raid arraysa
|
||||
"""
|
||||
if re.match( '/dev/cciss/c[0-9]+d[0-9]+p[0-9]+', partition ):
|
||||
drive = re.split( 'p[0-9]+', partition )[0]
|
||||
else:
|
||||
drive = re.split( '[0-9]', partition )[0]
|
||||
|
||||
if drive == partition:
|
||||
fd = os.popen( '/sbin/sfdisk -s ' + drive + ' 2>/dev/null' )
|
||||
|
||||