-
Announcements
-
Forum closed 06/30/2018
PLEASE NOTE: This forum is closed and no longer moderated. Please visit https://www.studionetworksolutions.com/support/ for assistance with your SNS products. Follow Studio Network Solutions on Twitter. Thank you!
-

chezpaul
Members-
Content count
6 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout chezpaul
-
Rank
Newbie
-
Scripting the connect/mounting and unmounting/disconnect on Mac OS X Sierra
chezpaul replied to chezpaul's topic in globalSAN iSCSI Initiator and globalSAN Xtarget Storage Server
I got it working Thought I'd share the script here. This is my disconnect script. You need to run diskutil list in terminal while the target disk is mounted on your desktop in order to find what name the volume has. In my case it's disk2s2. do script "" in window 1 allows the script to happen all in the same window, otherwise it launches a new window per command. For the Connect script, just change disconnect to connect and take out the first 2 commands. tell application "Terminal" reopen activate do script "diskutil unmount /dev/disk2s2" in window 1 delay 4 do script "cd /opt/local/bin" in window 1 delay 2 do script "./gsutil --disconnect 4C2XXXXX-DE1E-4C6A-BABE-XXXXX7F61763" in window 1 end tell tell application "Finder" set visible of process "Terminal" to false end tell Then I just made the 2 scripts into services with the help of Automator. Works like a charm. EDIT: I tried the bash thing but it wouldn't work, so I just use cd -
Scripting the connect/mounting and unmounting/disconnect on Mac OS X Sierra
chezpaul replied to chezpaul's topic in globalSAN iSCSI Initiator and globalSAN Xtarget Storage Server
So I'm trying to get my feet wet and it doesn't seem like gustily is responding. Last login: Thu Dec 28 08:23:07 on console [Naths-MacBook:~] nathalie% cd /opt/local/bin [Naths-MacBook:/opt/local/bin] nathalie% gsutil --list gsutil: Command not found. [Naths-MacBook:/opt/local/bin] nathalie% ls gsutil [Naths-MacBook:/opt/local/bin] nathalie% gsutil gsutil: Command not found. [Naths-MacBook:/opt/local/bin] nathalie% gsutil --list gsutil: Command not found. [Naths-MacBook:/opt/local/bin] nathalie% sudo gsutil -l Password: sudo: gsutil: command not found [Naths-MacBook:/opt/local/bin] nathalie% gsutil -l gsutil: Command not found. [Naths-MacBook:/opt/local/bin] nathalie% sudo gsutil -l sudo: gsutil: command not found [Naths-MacBook:/opt/local/bin] nathalie% When asked for the password, I inserted the mac's password (as I was using sudo) But you'll notice gsutil -l was only understood once for some reason. -
Scripting the connect/mounting and unmounting/disconnect on Mac OS X Sierra
chezpaul replied to chezpaul's topic in globalSAN iSCSI Initiator and globalSAN Xtarget Storage Server
Almost a year later I'm back.. Wow, time flies. I never got to automate this. I went with the free github sourced OSX Initiator, have been using it for a year but I don't like that you have to disable the system lock in order to install and use. So I think I will be buying your globalsan version. This is what I used for the github initiator through an automator script that ran this in the terminal. on run {input, parameters} tell application "Terminal" activate do script with command "iscsictl login iqn.2004-04.com.qnap:ts-251:iscsi.nasphotos.02d665,192.168.1.44:3260" end tell tell application "Finder" set visible of process "Terminal" to false end tell end run What would be the equivalent using globalsan? Or where is this manual you are talking about above? -
Scripting the connect/mounting and unmounting/disconnect on Mac OS X Sierra
chezpaul replied to chezpaul's topic in globalSAN iSCSI Initiator and globalSAN Xtarget Storage Server
Yes, I did find the CLI but gsutil does not work in terminal on OSX. I gives me a "command not found". What do I need to install and from where in order to make this work? Thanks -
Scripting the connect/mounting and unmounting/disconnect on Mac OS X Sierra
chezpaul replied to chezpaul's topic in globalSAN iSCSI Initiator and globalSAN Xtarget Storage Server
I know about persistent and I do not want to use that. I'm using a MacBook pro, so portable and I put it to sleep every time I go to work and vis versa when I get home. It's getting to be really annoying to unmount, open pref pane, disconnect and vis versa when I get back home. So I would like to script it. Click the script. Bam. My Target is on a QNAP Das so i'm not using SANmp.