Iscsi - target and initiator setup debian: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
<pre> | <pre> | ||
http://iscsitargetandinitiator.blogspot.dk/ | http://iscsitargetandinitiator.blogspot.dk/ | ||
</pre> | |||
== Show target devices and initiators connected == | |||
<pre> | |||
tgtadm --lld iscsi --op show --mode target | |||
</pre> | |||
== Add devices/disks/partitions to target == | |||
<pre> | |||
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/sdb | |||
</pre> | </pre> | ||
Revision as of 21:47, 15 November 2012
iSCSI - target (server) setup
We'll use tgt to handle everything dynamically
iSCSI - initiator (client) setup
Link to page:
http://iscsitargetandinitiator.blogspot.dk/
Show target devices and initiators connected
tgtadm --lld iscsi --op show --mode target
Add devices/disks/partitions to target
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/sdb
Re-adding LVM based iscsi disks after reboot
Requires a change in how LVM 'attaches' to disks.
So if you've added say /dev/sdb to be a complete iscsi device and on the initiator using it as a LVM, it does not attach itself to the target on reboot.
Edit /etc/lvm/lvm.conf and change:
# By default we accept every block device: #filter = [ "a/.*/" ] # Every block device except /dev/sdb, that is. filter = [ "r|/dev/sdb|" ]
More info here: http://www.sysarchitects.com/iscsi_target_on_rhel6