Last active
January 2, 2016 02:39
-
-
Save skarllot/8238311 to your computer and use it in GitHub Desktop.
Managing iSCSI into Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create ifaces | |
iscsiadm -m iface -I iface0 -o new | |
iscsiadm -m iface -I iface0 | |
iscsiadm -m iface -o update -I iface0 -n iface.net_ifacename -v eth0 | |
# Discovery | |
iscsiadm -m discovery -t sendtargets -p 192.168.0.1 -I iface0 -I iface1 | |
# Delete undesired targets | |
iscsiadm -m node -T iqn.2014-01.com.example:vol0 -p 192.168.0.1 -o delete | |
# Login to target | |
iscsiadm -m node -l -T iqn.2014-01.com.example:vol0 -p 192.168.0.1 | |
# Get device name | |
iscsiadm -m session -P 3 | |
# Get SCSI WWID | |
scsi_id -g -u -d /dev/sda | |
# Get device vendor | |
cat /sys/block/sdb/device/vendor | |
# Get device product | |
cat /sys/block/sdb/device/model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blacklist { | |
wwid "*" | |
} | |
blacklist_exceptions { | |
wwid "0123456789abcdef" | |
} | |
multipaths { | |
multipath { | |
wwid 0123456789abcdef | |
alias DEV0 | |
} | |
} | |
devices { | |
device { | |
vendor "FreeBSD" | |
product "iSCSI Disk" | |
path_grouping_policy multibus | |
getuid_callout "/sbin/scsi_id -g -u -d /dev/%n" | |
features "1 queue_if_no_path" | |
path_checker readsector0 | |
failback immediate | |
path_selector "round-robin 0" | |
rr_min_io 10 | |
rr_weight uniform | |
no_path_retry fail | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment