mhVTL-GUI tgt configuration problem in Ubuntu Server 12.04.2.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

mhVTL-GUI tgt configuration problem in Ubuntu Server 12.04.2.

tsunami_liao
Hi there,

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 [2345]
stop on runlevel [!2345]

expect fork
respawn

pre-start script
  sleep 2
end script


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.
Reply | Threaded
Open this post in threaded view
|

Re: mhVTL-GUI tgt configuration problem in Ubuntu Server 12.04.2.

Mark Harvey
Administrator
Many thanks for the bug reports..

nia is responsible for mhVTL-GUI so I'll let him respond from the GUI side of the equation..

As for the mhVTL / tgt daemon start issue..
There should be some method to set dependencies in the rc scripts.
So the tgtd rc script should wait for mhVTL to start (in this case)..

One solution would be to modify the tgt script and BEFORE tgt is started - start mhvtl.
i.e. Use the one rc script to start both sets of daemons.

Cheers
Mark
Regards from Australia
Mark Harvey
nia
Reply | Threaded
Open this post in threaded view
|

Re: mhVTL-GUI tgt configuration problem in Ubuntu Server 12.04.2.

nia
Administrator
In reply to this post by tsunami_liao
Related to GUI, additional enhancement for this maybe in order .. Will try to include them in future releases.

I am currently working on version 2.0 of the GUI  that will include many enhancements

Regards,

-nia
Reply | Threaded
Open this post in threaded view
|

Re: mhVTL-GUI tgt configuration problem in Ubuntu Server 12.04.2.

tsunami_liao
In reply to this post by Mark Harvey
Thanks Mark and Nia.

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.