Sudoapt-getinstalliscsitarget is done immediately, and then edit the configuration file: sudovim/etc/ietd. conf is the default configuration file with detailed configuration instructions and examples. This blog first backs up the file, keeps it for future research, and then clears it and writes the following data: iSNSServer192.168.100.100iSNSAccessControlNoTargetiqn. 2009-04.co
Sudo apt-get install iscsitarget
Immediately, and then edit the configuration file:
Sudo vim/etc/ietd. conf
The default configuration file has detailed configuration instructions and examples. This blog first backs up the file, keeps it for future research, clears it, and writes the following data:
ISNSServer 192.168.100.100
ISNSAccessControl No
Target iqn.2009-04.com. example: storage. disk2.sys1. xyz
Lun 0 Path =/dev/sdc, Type = fileio
Alias test
Brief explanation: iSNSServer 192.168.100.100 is the IP address where the iSCSI service is working. My server has two NICs, So I specified them;
ISNSAccessControl No. I didn't see it clearly. It seems that visitors are not allowed to control iSCSI;
Target iqn.2009-04.com. example: storage. disk2.sys1. xyz: open a Target named: iqn.2009-04.com. example: storage. disk2.sys1. xyz
Lun 0 Path =/dev/sdc, Type = fileio: Name the iqn.2009-04.com. example: storage. disk2.sys1. the Target of xyz allocates a volume and uses the/dev/sdc hard disk on my machine as the storage device. The type is fileio. This type refers to this volume, not my/dev/sdc hard disk;
Alias test: sets an Alias: test;
Save and restart iscsi target. Run the following command:
Sudo/etc/init. d/iscsitarget restart
The following message is displayed:
Removing iSCSI enterprise target devices: succeeded.
Stopping iSCSI enterprise target service: succeeded.
Removing iSCSI enterprise target modules: succeeded.
Starting iSCSI enterprise target service: succeeded.