Install the packages:
apt-get install libssl-dev
apt-get install iscsitarget
Edit /etc/default/iscsitarget and set:
ISCSITARGET_ENABLE=true
Make a new Partition or new disk, for Example /dev/sda3.
Edit /etc/ietd.conf:
change this line:
Lun 0 Path=/dev/sda3,Type=fileio
Restart the iscsitarget service:
/etc/init.d/iscsitarget restart
Use iscsi:
Windows:
Run iscsi-initiator, add the Ubuntu machine IP in Discovery tab, under Target Portals.
Connect to iscsi by pressing Log On, in Target tab. Close the iscsi-initiator.
Add iscsi Partition in Windows Partitions same as a new partition.
Linux:
run this command:
iscsiadm -m discovery -t st -p IP-FOR-ISCSI-TARGET
The informations of nodes are saving in /etc/iscsi/nodes.
Then run this:
iscsiadm -m node --targetname "UNIQUE-NAME-OF-TARGET" --portal "IP-FOR-ISCSI-TARGET:3260" --login
You can Mount the new device. See fdsik -l
No comments:
Post a Comment