xen-drbd
diff xen-drbd-install.py @ 36:44efea4507ac
Virtual disk name can be secified after = sign (e.g.: drbd1=sda1:dns:2G )
author | igor@manas.xt.vpn |
---|---|
date | Sat Aug 30 11:14:50 2008 +0300 (2008-08-30) |
parents | 85165c844ac9 |
children | e80bdf496aa2 |
line diff
1.1 --- a/xen-drbd-install.py Mon Aug 18 12:29:26 2008 +0300 1.2 +++ b/xen-drbd-install.py Sat Aug 30 11:14:50 2008 +0300 1.3 @@ -43,9 +43,13 @@ 1.4 for dom in domains: 1.5 for disk in disk_table[dom]: 1.6 if disk.find(":") == -1: 1.7 - drbd_device[disk]=dom 1.8 + if disk.find("=") == -1: 1.9 + drbd_device[disk]=dom 1.10 + else: 1.11 + drbd_device[disk.split('=')[0]]=dom 1.12 else: 1.13 - drbd_device[disk.split(':')[0]]=disk.split(':')[1] 1.14 + disk0=disk.split(':')[0] 1.15 + drbd_device[disk0.split('=')[0]]=disk.split(':')[1] 1.16 1.17 def make_lvm(): 1.18 print "###################################################"