Defining Paths to different Network Attached Storage locations
jtaylor
I have searched the documentation and google, but have not found a solution to this problem yet, I am sorry if it has already been addressed.
I am running Mac OS X Version 10.9.4
I have 7 different network drives mounted on my computer in /Volumes using autofs. Each contains a large amount of data in ibw format.
Four of these drives have the same name "Experiments" on their respective source computers. So the situation is something like this:
ls -l /Volumes
/Volumes/Drive1 # source drive is named "Experiments"
/Volumes/Drive2 # source drive is named "Experiments"
/Volumes/Drive3 # source drive is named "Experiments"
/Volumes/Drive4 # source drive is named "Experiments"
/Volumes/Drive5
/Volumes/Drive6
/Volumes/Drive7
/Volumes/Macintosh HD -> /
Just to reiterate: I can rename the drives locally whatever I want to call them, but four of these have the same name on their respective source machines. Also, please note that it is not an option for me to rename the drives on the source computers. Renaming the source drives is not a solution for me. For legacy reasons they must be called "Experiments".
I have 2 different but possibly related questions/issues relating to how Igor defines the path to a mounted drive, and then how Igor defines the path within the mounted drive:
1.) The following command issues a standard error about 'file or folder could not be found'
NewPath/O pathname "Macintosh HD:Volumes:Drive1:path:to:data:folder:" # a bunch of .ibw files live here
However, if I first issue
NewPath/O pathname "Macintosh HD:Volumes:Drive1:"
Igor returns
path: "Experiments:" # NOTE: I am NOT calling this Experiments on my computer, it is called Drive1!
Then, I can specify
NewPath/O pathname "Experiments:path:to:data:folder:"
with success.
The question: Why is it not possible to directly address the directory structure seen by my computer? Is there a different command that will do this for me? I would love to be able to define a path to any arbitrary location in the directory structure regardless of whether the directory is a mount point or not.
2.) Igor can only see one of the "Experiments" drives. Once I pick one, it is stuck to that "Experiments" mount point. I have data generated on several different apparatuses. I would like to analyze all the data, and switch between the drives effortlessly with a "ChangePath" function. This function is already written and seems to work on Windows computers. I am trying to implement a similar functionality on a Mac.
If the answer is that I need to define the path with a 2 step process, first descending into the mounted drive, and then specifying the path within the drive, that is acceptable. However, I would love to be able to refer to arbitrary directories with as much ease as I can at the terminal. If this is not possible, what can I do to overwrite the "Experiments" mount point with a different "Experiments" mount point?
Thanks,
Jeff
For backward compatibility, Igor uses HFS paths and uses Mac OS API's that take HFS paths.
The HFS names of your drives are "Drive1", "Drive2", etc.
Try:
NewPath Drive2, "Drive2:"
It should also work to add a path after the drive name.
August 6, 2014 at 10:57 am - Permalink
First, starting with 10.8 or earlier and certainly under 10.9, I have learned that you should no longer use the Volumes directory to mount remote drives to local folders. I think this means, you should re-write the equivalent of your mount.conf file to point the remote volume to a different local volume. Lots of folks seem to recommend /mnt as the alternative root. As an example, my /etc/auto_smb file has these lines ...
/NAS/Synology/photos -fstype=smbf,soft ://mylogin:mypassword@192.168.1.10/photos
/NAS/Synology/shared -fstype=smbf,soft ://mylogin:mypassword@192.168.1.10/shared
This opens a second point of discussion. You might be able to map each remote volume to different local volumes and get around the repeat of "Experiments" name. I would imaging this should happen in an equivalent way to this ...
/mnt/Experiments1 -fstype ... ://login:password@IPAddress1/Experiments
/mnt/Experiments2 -fstype ... ://login:password@IPAddress2/Experiments
...
IOW, consider changes that you can/should make to how you currently map and automount the network drives to your local volumes as an all around better option, both within the Mavericks file level system as well as with regard to resolving the Igor Pro path definitions.
EDIT: I see that you are mapping your Experiments to different drives but Igor is still missing access inside to the folder levels. I see also that Howard may have the answer for you on this one. Alternatively, perhaps you need to map one layer deeper.
/Volumes/Experiments/Drive1 ...
I would be curious to hear what happens should you change to a different local mount point rather than /Volumes.
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
August 6, 2014 at 12:51 pm - Permalink
Thank you both so much for your suggestions. I am new to Max OS so I am sure there are subtleties I am missing.
Unfortunately neither of these strategies have succeeded for me yet, although certainly there could be some other variable I don't understand that is causing the failures.
When I attempt to label the paths according to the local directory name as
NewPath Drive2, "Drive2:"
I get an error stating that the drive is not mounted. However, if I do
it will return successfully. This is ambiguous because there are multiple "Experiments:" drives and I was hoping to change between them. I would be curious to know how to specify the path leading to "Experiments:", but at this point maybe I will just use the Finder/gui.
With respect to the /Volumes mount point, yes I have seen some online forums discussing the issue. I re-attempted the above suggestions in the /mnt directory and did not experience different behavior with respect to my Igor questions.
FYI I achieved the desired mount behavior in /Volumes by following this hint: https://coderwall.com/p/fuoa-g
Essentially you modify
/Volumes/Experiments1 -fstype ... ://login:password@IPAddress1/Experiments
to
/../Volumes/Experiments1 -fstype ... ://login:password@IPAddress1/Experiments
Maybe there is some other reason why it is not preferable to use this directory for your mounts, but I have actually observed that the permissions play more nicely in /Volumes.
Thanks again,
Jeff
August 8, 2014 at 02:33 pm - Permalink
I don't know why that did not work. I mounted a USB drive named External and successfully executed the following commands:
path: "External:Users:"
PathInfo Users
Print S_path
External:Users:
You might try creating a soft link. It worked for me. In Terminal I executed:
ln -s /Volumes/External/Users /ExternalUsers
Then in Igor I successfully executed:
path: "OSX10-10:Users:"
PathInfo ExternalUsers
Print S_path
OSX10-10:Users:
where hd is the name of my internal hard drive.
August 8, 2014 at 06:48 pm - Permalink