mhVTL-GUI tgt configuration problem in Ubuntu Server 12.04.2.
I built mhVTL on Ubuntu Server 12.04.2 64bit yesterday. And found a problem with mhVTL-GUI TGT configuration.
mhVTL and GUi are cloned from git, they should be the latest version.
tgt is installed from Ubuntu source.
When I click save the tgt configuration, mhVTL-GUI help me to save tgt configuration file to /etc/tgt/targets.conf.mhvtl.
But tgt target won't work after I reboot server or restart tgt daemon.
Finally I found the problem is caused by:
/etc/tgt/targets.conf tells tgt daemon to include /etc/tgt/conf.d/*.conf, that's why /etc/tgt/targets.conf.mhvtl is not load by tgt after system rebooted.
All I need to do is:
move /etc/tgt/targets.conf.mhvtl and rename to /etc/tgt/conf.d/targets.conf, and then restart tgt service.
Another issue found with tgt on Ubuntu is it may not add all targets as you configured. The root cause is both mhvtl and tgt start up sequence are 20, mhvtl service have not start up completely, and then tgt try to start up at the same time, some mhvtl devices are not ready, so tgt cannot add these devices to its iSCSI target list.
I tried to change the tgt start up sequence to 30 or even 50, it cannot fix. I had to modify /etc/init/tgt.conf to fix this issue. The font in bold is added by me, to let tgt wait 2 seconds.
# cat /etc/init/tgt.conf
description "tgt daemon"
start on runlevel 
stop on runlevel [!2345]
post-start exec /usr/sbin/tgt-admin -e
Now everything works fine with NetBackup 7.1.
Sorry for my bad English, I hope you can understand what I mean in this post.
This is my first time build mhVTL on Ubuntu. Ubuntu is a lot difference between RHEL.
I did build mhVTL on RHEL/CentOS with my modified startup script to start mhVTL, then tgtd, and add tgt target at the end.