Target: (Server with storage): 10.10.10.2/24
Client: 10.10.10.1/24
Target:
Install iSCSI Utils if not available
Edit targets.conf
vi /etc/tgt/targets.conf
Paste the configuration below, change target name based on your needs
backing-store /dev/sdc1
initiator-address 172.100.100.2
# add more initiators if you need
#initiator-address 172.50.50.2
#incominguser username password
Enable tgtd service
chkconfig tgtd on
Start the service
service tgtd start
Note: If you don’t want any volume group to be automatically recognized by the operating system of the target, please filter the volume group to be seen on boot.
Edit /etc/lvm/lvm.conf and add this global_filter
global_filter = [ "a|^/dev/sdc1$|", "r/.*/" ]