ISCSI target conservation goals after a reboot?

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
Can anyone tell me how to save the configured target (iscsi target) server in Ubuntu 18.04 after reboot?
So the goal was set up successfully and it can be seen from windows 10 (read and write). Article on customizing
$ sudo mkdir /var/lib/iscsi
$ sudo dd if=/dev/zero of=/var/lib/iscsi/ubuntu-1604 bs=1M count=1K
$ sudo tgtadm --lld iscsi --op new --mode target --tid 1-T
$ sudo tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /var/lib/iscsi/ubuntu-1604
$ sudo tgtadm --lld iscsi --op bind --mode target --tid 1-I ALL

But this command in the article is not working. From tgtadm there is no such option –dump
$ sudo tgtadm --dump | sudo tee /etc/tgt/conf.d/ubuntu-1604.conf
Save the configuration for the iSCSI target. If you do not save the configuration, the configuration will be removed after restarting tgtd.

How to save goal after a reboot? They need somewhere to register? But where and how?
Thanks in advance.
by | 31 views

1 Answer

0 like 0 dislike
create in /etc/tgt targets file.conf, write include /etc/tgt/conf.d/*.conf, create a /etc/tgt conf directory.d, in it create a file ubuntu-1604.conf file and in it write:
default-driver iscsi backing-store /var/lib/iscsi/ubuntu-1604 

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked Mar 24, 2019 by niakrisn
0 like 0 dislike
1 answer
asked Jun 9, 2019 by Ded_Undead
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
35,405 users