open-iscsi initiator device files

The setup

  • storage node STOR01 @ x.x.x.1
    • based on openfiler [www.openfiler.com]
    • 2 NICs
  • processing node PROC01 @ x.x.x.2 and y.y.y.1
    • Centos 5
    • XEN
    • open-iscsi-initiator 
    • 2 NICs
  • both nodes are connected back-to-back through x.x.x.0 subnet
  • STOR01 has several ISCSI targets exposed 
  • PROC01 connectes to the thargets exposed by STOR01
  • Xen domUs use thos iscsi targets as disks 
    • disk = [ 'phy:/dev/sdh,hda,w'] #/dev/sdh is the iscsi target 

The problem

i had all my targets connected to PROC01, Xen domains onf files written, domains started successfully and OS was installed.

Now after a reboot of PROC01 all is lost, no xen domU started...

why? simply because the iscsi targets were linked to different device files, e.g. instead of /dev/sdh it was on /dev/sdi

now how do i make sure that doesn't happen again?

  • In Debian/Ubuntu the iscsi target is located at /dev/mapper/$iqn/disk
  • in Centos iscsi target is located at /dev/disk/by-path/ip-$ip-iscsi-$iqn
  • those files are symlinks to /dev/sd? , now either you can use those symlinks script something to modify the xen conf files before starting the domUs