Differences
This shows you the differences between two versions of the page.
linux_wiki:iscsi [2016/01/08 17:01] billdozor [Adding Disks] |
linux_wiki:iscsi [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Iscsi ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | iSCSI operations on Linux. | ||
- | |||
- | **Checklist** | ||
- | * Enterprise Linux 6/7 | ||
- | |||
- | ---- | ||
- | |||
- | ====== Adding Disks ===== | ||
- | |||
- | - Get the iscsi initiator name on the client< | ||
- | - Use the initiator name to configure the Host Group, LUN, and Host Affinity on your storage device. (Or send the initiator name to the storage admin) | ||
- | - From the client, discover the available LUNs on the storage device< | ||
- | - Start and enable the iscsi daemon | ||
- | - EL6<code bash> | ||
- | chkconfig iscsid on</ | ||
- | - EL7<code bash> | ||
- | systemctl enable iscsid</ | ||
- | - Log-in to the LUN with the iscsi client< | ||
- | - Create / | ||
- | - Configure multipath< | ||
- | # Blacklist exception for your device | ||
- | blacklist_exceptions { | ||
- | # WWN of LUN via iSCSI LUN group | ||
- | wwid " | ||
- | } | ||
- | |||
- | # Setup your storage device specifics | ||
- | devices { | ||
- | device { | ||
- | vendor " | ||
- | product " | ||
- | # specify other options | ||
- | } | ||
- | } | ||
- | |||
- | # Setup the multipath | ||
- | multipaths { | ||
- | | ||
- | wwid 123456789 | ||
- | alias friendly_name_here | ||
- | } | ||
- | } | ||
- | </ | ||
- | - Start and enable multipathd | ||
- | - EL6<code bash> | ||
- | chkconfig multipathd on</ | ||
- | - EL7<code bash> | ||
- | systemctl enable multipathd</ | ||
- | - Re-scan the scsi bus<code bash> | ||
- | - Where < | ||
- | - The hyphens represent controller, | ||
- | - Verify paths< | ||
- | - Add mount entry to /etc/fstab | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | ====== Clean Device Removal ====== | ||
- | |||
- | Red Hat's recommended procedure for removing storage devices. | ||
- | |||
- | - Ensure all files open on the device are closed< | ||
- | - Backup/move data as needed | ||
- | - Remove device from any software RAID or LVM volume | ||
- | - Remove device from multipath | ||
- | - Flush outstanding I/O (important for raw devices)< | ||
- | - Remove references to the device from applications, | ||
- | - Remove each path to the device from the SCSI subsystem< | ||
- | - Where < | ||
- | |||
- | ---- | ||
- | |||
- | ====== iSCSI Admin ====== | ||
- | |||
- | Example iscsiadm commands. | ||
- | |||
- | View iscsi target node IP addresses and target names | ||
- | <code bash> | ||
- | iscsiadm --mode node | ||
- | </ | ||
- | |||
- | Enable iscsi target: Login to iscsi target | ||
- | <code bash> | ||
- | iscsiadm --mode node --targetname < | ||
- | </ | ||
- | |||
- | Disable iscsi target: Logout from iscsi target | ||
- | <code bash> | ||
- | iscsiadm --mode node --targetname < | ||
- | </ | ||
- | |||
- | Delete iscsi target | ||
- | <code bash> | ||
- | iscsiadm --mode node -o delete --targetname < | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Related Multipath Commands ===== | ||
- | |||
- | If the iSCSI device that is removed is also multipath' | ||
- | |||
- | View multipath devices | ||
- | <code bash> | ||
- | multipath -ll | ||
- | </ | ||
- | |||
- | Remove (flush) an unused multipath device | ||
- | <code bash> | ||
- | multipath -F | ||
- | </ | ||
- | |||
- | After, restart multipathd to ensure it doesn' | ||
- | * EL6<code bash> | ||
- | * EL7<code bash> | ||
- | |||
- | ---- | ||