Give a tape to a vm, but the tape change the host ID at reboot.

Gianni

New Member
Aug 25, 2010
14
0
1
Trento, Italy
Good morning,
a friend asked me an opinion on a problem that happens on a machine proxmox v 1.8.
He wants to give a tape to a vm.
No problem, fill in the file:

proxmox: ~ # cat /etc/scst.conf

[HANDLER tape]
DEVICE [6:0:3:0]

[ASSIGNMENT Default]
DEVICE [6:0:3:0], 0

The problem arises however when rebooting the virtualizer proxmox.
The tape changes the host ID [host:bus:target:lun] as you can see:

First reboot:
[6:0:3:0] tape HP Ultrium 1-SCSI P61D / dev/st0

Second:
[0:0:3:0] tape HP Ultrium 1-SCSI P61D / dev/st0

Third:
[4:0:3:0] tape HP Ultrium 1-SCSI P61D / dev/st0

our genial friend Diaolin advised us through a work arround with this script:

##Script creato per gestire il cambiamento dei map sui device
DEVICE=$(lsscsi | grep tape| awk '{print $1}' )


DEVICE=${DEVICE##*[}
DEVICE=${DEVICE%%]*}

cp /etc/scst.conf /etc/scst.conf.$$

echo -ne "
[HANDLER tape]
DEVICE ${DEVICE}

[ASSIGNMENT Default]
DEVICE ${DEVICE},0
" > /etc/scst.conf

/etc/init.d/scst reload

###Fine dello script creato per gestire i device

This work fine!
But we will understand why this happens?
I read here that if you have a device that is sometimes off line the kernel remap the following device sequentially. (Example iscsi)
http://www.linuxdocs.org/HOWTOs/SCSI-2.4-HOWTO/scsiaddr.html
Have you any idea?

Thanks in advanced,
Gianni
 
You get that behavior when you boot the same kernel version? Or only when you boot into another kernel?
 
The same kernel.
Alex type only reboot at prompt, with all vm stopped and when the proxmox restart the tupla [h:b:t:id] is changed.

Jan