Drive mapping

Discussion in 'Mac Basics and Help' started by berone, Feb 4, 2009.

  1. berone macrumors member

    Joined:
    Nov 10, 2008
    #1
    In Windows I could map a drive: ie, assign it a drive letter or other name. That way if the location of the data changed, all I had to do was change the drive mapping to maintain all links and associations. Is there a way to do this in OSX? Specifically, I keep all photos on a network drive. I want to be able to take them with me on an external when needed and still have iphoto and iweb work.

    Thanks,

    Anthony
     
  2. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #2
    So you're wanting to store them in two places?
     
  3. berone thread starter macrumors member

    Joined:
    Nov 10, 2008
  4. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #4
    Use a sync app to sync between your network share and your local folder.

    ChronoSync
    works pretty well..
     
  5. berone thread starter macrumors member

    Joined:
    Nov 10, 2008
    #5
    No, syncing isn't the issue. The only files that would be changing are on my MacBook. It's the files being referenced - the photo library - that need to travel with me. I'm trying to simplify some of my work methods so I'm experimenting with iweb and iphoto. These are fine for the website I'm working on - it's just personal stuff I want to share with friends and family. But I want to be able to work on it from home or work. All of my photos are stored on an external drive attached to the MacMini that we use as a server. When I travel I want to be able to make a copy of the photos I'm working with on another external drive and continue my work from that. In Windows I would map a drive and call it "photos". That would be pointed to the server drive when I was at home and changed to the portable when I was traveling. The applications connecting to it wouldn't know that the location had changed - they would just connect to "photos". That's what I mean by "drive mapping". The only references I can find to that in OS X just tell me how to find a network drive, not name it. I recognize that there might not be an equivalent function on the Mac - it certainly won't be the first of those I've bumped my head on.

    Thanks,
    Anthony
     
  6. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #6
    I don't know of an automatic way to do this, but it's certainly possible by slightly more pedestrian means. For starters, with the network drive connected, open Terminal and run

    ls /Volumes

    Does it show up there?
     
  7. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #7
    Are you referencing the shadow copy function in Windows, maybe? Where files are available "offline" locally, but "online" on the server? No, there's no such functionality in Mac OS X.
     
  8. berone thread starter macrumors member

    Joined:
    Nov 10, 2008
    #8
    Oh, pedestrian is fine! I never got around to writing a batch file to automate it in Windows - I always did it manually.

    So - ls /volumes in terminal, yes the drive is listed.

    Thanks,
    Anthony
     
  9. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #9
    In that case, it'll be super easy.

    When the network drive is connected and the external drive is not, run:

    ln -s /Volumes/Name\ of\ your\ network\ drive /Volumes/Name\ of\ your\ external\ drive

    When you plan to use your external drive again, before you connect it, run:

    rm /Volumes/Name\ of\ your\ external\ drive

    Basically, this creates (and removes) a shortcut to the network drive which should fool applications into thinking that external is connected when it's not. You can do it the other way as well if you prefer. Note that any spaces in the path name are escaped with a backslash.

    You could also create a shell script for the purpose to speed things up, but I don't know of a way to automate the process.
     
  10. berone thread starter macrumors member

    Joined:
    Nov 10, 2008
    #10
    Oh, sorry - you lost me. I'm not sure what of those commands are variables I have to replace and what are commands. Also not quite sure what to replace the variables with. Sorry to be dense.

    I just reread that and I think I follow the syntax - I missed what you said about the spaces the first time - but I'm not sure I follow what it does. Could you please clarify that.

    Thanks,
    Anthony
     
  11. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #11
    Well, what are the names of your external and network drives?
     
  12. berone thread starter macrumors member

    Joined:
    Nov 10, 2008
  13. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #13
    Lowercase? UNIX is case-sensitive.

    ln -s /Volumes/ringold /Volumes/little\ one
    rm /Volumes/little\ one
     
  14. berone thread starter macrumors member

    Joined:
    Nov 10, 2008
    #14
    Thanks. I still don't understand what the symbolic link does, but I'll experiment with it so I can ask more pointed questions if it still doesn't make sense.

    Thanks again for your help.

    Anthony
     
  15. berone thread starter macrumors member

    Joined:
    Nov 10, 2008
    #15
    Now I understand what that did. It didn't work for what I needed, though. A fake link was created that might have made it look like the drive was still connected, but since it wasn't and iphoto looked for the photos there it didn't do any good.
    I also tried reformatting the external, giving it the same name as the network drive and copying the photos over under the same directory structure, then disconnected from the network and open iphoto. Iphoto was not fooled.
     

Share This Page