Skip to content

targetclilib

PhilippeLeroux edited this page Oct 9, 2018 · 5 revisions

Table of contents


targetclilib.sh last modified : 30/09/2018

  • Publics functions : 14
  • Undocumented functions : 0
  • Privates functions : 0

Public functions

Public function set_targetcli_default_settings

set default setting of targetclif

Public function reset

Reset all config and call set_targetcli_default_settings

Public function set_working_vg

$1 name of VG to used.

Public function check_params

$1 function name
$2 number parameters required for function
$3 number of parameters for function

exit 1 if $2 -ne $3

Public function create_iscsi_initiator

Create iSCSI initiator.

$1	initiator name
$2	portal
$3	userid
$4	password

Public function delete_iscsi_initiator

delete initiator $1.

Public function get_lv_name

Print to stdout LV name

$1 LUN number
$2 LV prefix

Public function get_disk_name

$1 LUN number
$2 LV prefix

Print to stdout disk name.

Now just call get_lv_name else name is too long.

Public function create_backstore

Create a LUN to the backstore.

$1 LUN number
$2 LV prefix

Public function delete_backstore

Delete a LUN from the backstore.

$1 #LUN
$2 LV prefix

Public function create_lun

Create a LUN

$1	LUN number
$2	initiator name
$3	LV prefix

Public function delete_backstore_range

Delete from the backstore all LUN in range [$1,$2]

$1	First LUN number.
$2	Last LUN number.

Public function create_backstore_range

Create LUN in the backstore

$1	First LUN number.
$2	Last LUN number.
$3	LV prefix

Public function create_lun_range

Create LUNs

$1	First LUN number.
$2	Last LUN number.
$3	l_initiator_name
$4	LV prefix

Clone this wiki locally