Difference between revisions of "Network/iscsi"
Jump to navigation
Jump to search
(Created page with "http://www.howtoforge.com/using-iscsi-on-debian-lenny-initiator-and-target == Target (storage) == apt-get install iscsitarget iscsitarget-modules-`uname -r` '''vi /etc/defa...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
== Target (storage) == | == Target (storage) == | ||
− | apt-get install iscsitarget iscsitarget-modules-`uname -r` | + | Install the target and associated kernel modules: |
+ | |||
+ | apt-get install iscsitarget iscsitarget-modules-`uname -r` | ||
+ | |||
+ | Activate the daemon: | ||
'''vi /etc/default/iscsitarget''' | '''vi /etc/default/iscsitarget''' | ||
Line 9: | Line 13: | ||
ISCSITARGET_ENABLE=true | ISCSITARGET_ENABLE=true | ||
</pre> | </pre> | ||
+ | |||
+ | Edit the configuration and add a ''target'': | ||
'''vi /etc/iet/ietd.conf''' | '''vi /etc/iet/ietd.conf''' | ||
<pre> | <pre> | ||
+ | ... | ||
+ | IncomingUser <username> <password> | ||
+ | OutgoingUser <username> <password> | ||
+ | ... | ||
+ | Target dedi.2011-04.fr.lunasys:storage | ||
+ | IncomingUser etienne passwd | ||
+ | OutgoingUser etienne passwd | ||
+ | Lun 0 Path=/dev/vda2,Type=fileio | ||
+ | ... | ||
</pre> | </pre> | ||
Line 28: | Line 43: | ||
/etc/init.d/open-iscsi restart | /etc/init.d/open-iscsi restart | ||
+ | |||
+ | Check the storage on target: | ||
+ | |||
+ | iscsiadm -m discovery -t st -p 192.168.101.226 | ||
+ | |||
+ | You will get something like: | ||
+ | <pre> | ||
+ | 192.168.101.226:3260,1 dedi.2011-04.fr.lunasys:storage | ||
+ | </pre> | ||
+ | |||
+ | Now login and init device with: | ||
+ | |||
+ | iscsiadm -m node --targetname "dedi.2011-04.fr.lunasys:storage" --portal "192.168.101.226:3260" --login | ||
+ | |||
+ | And mount the device: | ||
+ | |||
+ | mount /dev/sda1 /storage/ |
Latest revision as of 11:54, 21 April 2012
http://www.howtoforge.com/using-iscsi-on-debian-lenny-initiator-and-target
Target (storage)
Install the target and associated kernel modules:
apt-get install iscsitarget iscsitarget-modules-`uname -r`
Activate the daemon:
vi /etc/default/iscsitarget
ISCSITARGET_ENABLE=true
Edit the configuration and add a target:
vi /etc/iet/ietd.conf
... IncomingUser <username> <password> OutgoingUser <username> <password> ... Target dedi.2011-04.fr.lunasys:storage IncomingUser etienne passwd OutgoingUser etienne passwd Lun 0 Path=/dev/vda2,Type=fileio ...
/etc/init.d/iscsitarget start
Initiator (user)
apt-get install open-iscsi
vi /etc/iscsi/iscsid.conf
... node.startup = automatic ...
/etc/init.d/open-iscsi restart
Check the storage on target:
iscsiadm -m discovery -t st -p 192.168.101.226
You will get something like:
192.168.101.226:3260,1 dedi.2011-04.fr.lunasys:storage
Now login and init device with:
iscsiadm -m node --targetname "dedi.2011-04.fr.lunasys:storage" --portal "192.168.101.226:3260" --login
And mount the device:
mount /dev/sda1 /storage/