Senin, 09 Desember 2024

ISCSI-ubuntu to windows

https://github.com/HealisticEngineer/iSCSI/blob/master/Ubuntu%20to%20Windows.cfg

https://www.youtube.com/watch?v=iHcFmTSM_mI


 Remember to change IP and tid to fit your network.


#

# Ubuntu commands

#


#Install iSCSI

apt -y install tgt

#create folder and file

mkdir /var/lib/iscsi_disks

dd if=/dev/zero of=/var/lib/iscsi_disks/disk01.img count=0 bs=1 seek=10G

#create target

tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.2018-05.lab.local:ubuntu-iscsi

#assign disk to target

tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 20 -b /var/lib/iscsi_disks/disk01.img

#assgin initiator

tgtadm --lld iscsi --op bind --mode target --tid 1 --initiator-address 10.0.2.12

#check config

tgtadm --mode target --op show 

#Save config

tgt-admin --dump > /etc/tgt/targets.conf



#

# Now the windows commands

#


#Start the service

Start-Service msiscsi

Set-Service msiscsi -startuptype "automatic"

#iscsi firewall

netsh advfirewall firewall set rule group = "iSCSI Service" new enable = yes 

# connect to ubuntu

New-iSCSITargetPortal -TargetPortalAddress 10.0.2.11

Connect-IscsiTarget -NodeAddress (Get-IscsiTarget).NodeAddress -IsPersistent $true

Tidak ada komentar:

Posting Komentar