Currently if you restart the server running nova-volume
or restart tgt, you will loose your iscsi targets that
have been created. This is not good.
In order for iscsi targets to be persistent across
reboots or restarts, one has to have the target's configuration
information in /etc/tgt/targets.conf or /etc/tgt/conf.d.
So when tgtd is restarted then the iscsi targets will be there
as expected.
This patch will add a configuration file to $state_path/volumes
when the volume is created. The configuration file is identified by
the volume uuid. It creates a logicalunit when the volume is created
as well. The iscsi target and configuration file
will be removed once the volume has been removed as well.
In order to use this, you have to include the following in
your /etc/tgt/targets.conf
include $state_path/volumes/*
For upgrades, it will just re-create the volumes
already in the volumes table.
Reviewed: https:/ /review. openstack. org/10417 github. com/openstack/ cinder/ commit/ c401895f8f2b6f1 693601f7996da88 d7b3d45fa0
Committed: http://
Submitter: Jenkins
Branch: master
commit c401895f8f2b6f1 693601f7996da88 d7b3d45fa0
Author: Chuck Short <email address hidden>
Date: Fri Jul 27 12:05:55 2012 -0500
Add persistent volumes for tgtd.
Currently if you restart the server running nova-volume
or restart tgt, you will loose your iscsi targets that
have been created. This is not good.
In order for iscsi targets to be persistent across targets. conf or /etc/tgt/conf.d.
reboots or restarts, one has to have the target's configuration
information in /etc/tgt/
So when tgtd is restarted then the iscsi targets will be there
as expected.
This patch will add a configuration file to $state_path/volumes
when the volume is created. The configuration file is identified by
the volume uuid. It creates a logicalunit when the volume is created
as well. The iscsi target and configuration file
will be removed once the volume has been removed as well.
In order to use this, you have to include the following in targets. conf
your /etc/tgt/
include $state_ path/volumes/ *
For upgrades, it will just re-create the volumes
already in the volumes table.
Fixes LP: #1011159
Change-Id: Ib74dcc1efa0332 842041b4c045ca5 fa85d4a32ca
Signed-off-by: Chuck Short <email address hidden>