Difference between revisions of "ISCSI initiator"
Jump to navigation
Jump to search
(Created page with "=Oracle Enterprise Linux (OEL)= Installation: <source lang="sh"> yum install iscsi-initiator-utils </source>") |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 3: | Line 3: | ||
<source lang="sh"> | <source lang="sh"> | ||
yum install iscsi-initiator-utils | yum install iscsi-initiator-utils | ||
| + | chkconfig iscsid on | ||
| + | </source> | ||
| + | |||
| + | Adding a target: | ||
| + | <source lang="sh"> | ||
| + | # Discover target: | ||
| + | iscsiadm -m discovery -t st -p <ip> -P 1 | ||
| + | |||
| + | # Add targets: | ||
| + | iscsiadm -m node -T iqn.2004-04.com.<targethost>:<targetname> [-p <ip[:port]>] -l | ||
| + | |||
| + | # Add target to auto-startup: | ||
| + | iscsiadm -m node -T iqn.2004-04.com.<targethost>:<targetname> [-p <ip[:port]>] -o update -n node.startup -v automatic | ||
| + | </source> | ||
| + | |||
| + | Removing a lun: | ||
| + | If the LUN was unpublished earlier: | ||
| + | <source lang="sh"> | ||
| + | iscsiadm -m node -T iqn.2004-04.com.<targethost>:<targetname> -p <ip> --rescan | ||
| + | |||
| + | echo 1 >/sys/block/sdX/device/delete | ||
</source> | </source> | ||
Latest revision as of 01:05, 7 May 2016
Oracle Enterprise Linux (OEL)
Installation:
yum install iscsi-initiator-utils
chkconfig iscsid on
Adding a target:
# Discover target:
iscsiadm -m discovery -t st -p <ip> -P 1
# Add targets:
iscsiadm -m node -T iqn.2004-04.com.<targethost>:<targetname> [-p <ip[:port]>] -l
# Add target to auto-startup:
iscsiadm -m node -T iqn.2004-04.com.<targethost>:<targetname> [-p <ip[:port]>] -o update -n node.startup -v automatic
Removing a lun: If the LUN was unpublished earlier:
iscsiadm -m node -T iqn.2004-04.com.<targethost>:<targetname> -p <ip> --rescan
echo 1 >/sys/block/sdX/device/delete