Add files via upload

This commit is contained in:
kneutron 2021-07-19 22:09:11 -05:00 committed by GitHub
parent d8fbbefc08
commit 6fa1f60f31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,9 @@
#!/bin/bash
# REQUIRES: https://github.com/sahlberg/libiscsi
ip=10.9.7.12 # dellap lmde, iscsi host/target
iscsi-ls iscsi://$ip
iscsi-ls -s iscsi://iscsi-user%password@$ip
#iscsi-ls -s iscsi://@$ip

View File

@ -0,0 +1,39 @@
#!/bin/bash
firstrun=0
# REQUIRES: https://github.com/iscsi-osx/iSCSIInitiator , XCODE
# REF: https://github.com/iscsi-osx/iSCSIInitiator/wiki/Target-Discovery
# REF: https://github.com/iscsi-osx/iSCSIInitiator/wiki/Authentication
# NOTE use iscsi-osx-list-luns.sh 1st
#iscsictl add target iqn.2015-01.com.example:target,192.168.1.100:3260 -interface en0
iscsictl add target iqn.2021-07.example.com:lun1,10.9.7.12:3260 -interface en0
# dellap lmde
iscsictl list targets
if [ $firstrun -gt 0 ]; then
iscsictl modify initiator-config -CHAP-name iscsi-user
iscsictl modify initiator-config -CHAP-secret
# ^ Will prompt for password - should only need to do once
iscsictl modify initiator-config -authentication CHAP
fi
if [ "$1" = "unmap" ]; then
# NOTE all zpools must be exported and indiv drives unmounted 1st
iscsictl logout iqn.2021-07.example.com:lun1,10.9.7.12
exit $? # early
fi
iscsictl login iqn.2021-07.example.com:lun1,10.9.7.12:3260 \
-authentication CHAP \
-CHAP-name iscsi-user \
-CHAP-secret
# password
echo PK
read -n 1
diskutil list |less