MacBook Pro External Hard Drive as Network Attached Storage

Discussion in 'macOS' started by nfg05, Nov 16, 2012.

  1. nfg05 macrumors newbie

    Joined:
    Jul 27, 2008
    #1
    I would appreciate advice on how to best set up my 3TB external USB Hard Drive (currently attached to my MacBook Pro) so that my MacBook Air can use it as well.

    My goal is to have only program/system files on the MBP 128GB SSD and MBA 64GB SSD while all downloads and media go on the 3TB HD. I would also like my iPhone and iPad to be able to access what's on the 3TB HD.

    I've already moved the MBP 'Home' folder to the external drive which seems to get the job done and would like to do the same for the MBA. Ideally, I would like one 'Home' folder for both but not sure that's possible.

    I've looked into System Preferences > File Sharing but want access restricted to only my MBA but without having to enter passwords all the time (MAC address filtering)?
     
  2. manual123 macrumors member

    Joined:
    Dec 4, 2006
    Location:
    Omaha NE
    #2
    What would happen for file access when both macs are trying to change the same file in the home directory? Im really not familuar with what will happen but that does seem like a invitatiion to a big problem. I would also expect that in order for this to work both must have the exact same software installed or some key libraries might be missing or overriden.

    I like the idea of having a sort of roaming profile on my machines, which is why I like the sharing first seen in mobileme but I think there should be some precautions taken here to make sure data isnt damanged and lost in the process.

    What exactly are your desires for this outcome? Why do you not want to use the local storage avail on MBA/MBP when speeds will be at their advantage? Is it just that you want the same "feel" on both machines and desire to pickup where you left off on a different machine? Which folders are you sharing, the entire home dir or just docs,music,pic....dont forget about hidden goodies.

    Just so that I or anyone else with the same questions could help you out better, and so that I understand your needs a bit better. I hope I can help.
     
  3. switon macrumors 6502a

    Joined:
    Sep 10, 2012
    #3
    RE: OD and file locking...

    Hi,

    First of all, as a brief explanation, many applications lock a file when it is opened for write access. Or if it doesn't lock the file, then some sort of "versioning" is typically implemented. Thus two different processes (or 2 different accounts), cannot write the same file simultaneously. Of course, this does not mean that all applications are written with regards to locking files/versioning, but many are. Sometimes the applications themselves have a rudimentary form of "locking", in that any one user account is only allowed to run a single instantiation of the application at any one time. Applications that manipulate large databases often only lock the specific data element/structure that it is writing to, allowing other processes to write to different elements/structures of the database simultaneously. And applications that run parallel threads often do a similar thing (atomic locking) so that multiple threads can write to different locations of the same file simultaneously. The atomic locking keeps two threads running in parallel from writing to the same location simultaneously. (It used to be that programming on parallel computers, the old 64k processor SIMD Thinking Machines comes to mind, entailed a lot of worry over the time involved for atomic locking and unlocking.)

    Secondly, I would really recommend that you look into using Open Directory/LDAP as the solution to what you are attempting to accomplish by moving your home directory to an external USB drive.

    Network accounts will "do the right thing" when the network drive is unavailable, while simply moving your home directory to an external USB drive will potentially "not do the right thing" when the external USB drive is unavailable.

    ...just a thought...

    Regards,
    Switon
     
  4. nfg05 thread starter macrumors newbie

    Joined:
    Jul 27, 2008
    #4
    OK, it sounds like the one Home folder for the MBP and MBA is a bad idea. That's ok, just a nice to have.

    In that case, I want the MBA Home folder (really just Downloads/Music/Pictures/Video but moving the whole thing on my MBP was easier) on the external USB as well.

    My reason for doing this is:

    1. I don't think there will be a big performance decrease in accessing videos/music from the external drive over wireless vs. having the media stored locally. My thought is that the major SSD performance boost is from having application/system files on the SSD. Have I already negated some of this by moving the whole MBP Home folder to the external?

    2. I just want all my downloaded music/videos/whatever to be in one place, on the external. That way, I can just automatically backup the external to another external rather than moving whatever happens to be on the MBA to the external before doing a backup routine.

    The Open Directory sounds like it could help with what I'm trying to do, would appreciate a link/explanation on how to execute it.
     
  5. switon macrumors 6502a

    Joined:
    Sep 10, 2012
    #5
    Re: Od...

    Hi nfg05,

    First of all, you will need Mac OS X Server ($20 Mac App Store). Setup OD using the Server.app; it is basically a "one button" affair for most services. You will probably need to setup the DNS service first before the OD. If you Kerberize the OD, then you won't be asked to type in your password all the time, as Kerberos will take care of the authorizations.

    Reading about LDAP/Active Directory/Open Directory on any of the various networking documentation websites will be useful for your understanding of how this works. But you probably don't need a detailed understanding in order to configure it and run the service: that is the whole idea behind Mac OS X Server, it allows small businesses/individuals to run servers/services with a minimum amount of work and virtually no experience with server software.

    Good luck,
    Switon

    P.S. LDAP and network accounts are the way most businesses solve the problem you are attempting to solve. OD is the Apple implementation, AD is the Microsoft implementation.
     
  6. switon macrumors 6502a

    Joined:
    Sep 10, 2012
    #6
    RE if you only want your multimedia in one place, then...

    Hi,

    If it is just your multimedia files (iTunes, iPhoto, videos, etc.) that you wish to have in one place, then why not load them onto the external USB drive and make that drive a Shared drive? You then can run iTunes from the Mac with the external USB drive attached and choose the iTunes Library located on the external drive. At the same time, using Home Sharing, your second Mac can connect to the iTunes Library on the external USB drive and play videos/music from the same iTunes Library. And, at the same time, being a Shared disk means that the second Mac can mount the Shared external USB drive and thus use it for other tasks, such as moving files to and from the external USB drive.

    This then eliminates the need for OD/LDAP and Mac OS X Server. But if you really want/need to have networked accounts, then OD is the way to go, in my opinion.

    Switon
     
  7. switon macrumors 6502a

    Joined:
    Sep 10, 2012
    #7
    RE: Server and backups...

    Hi nfg05,

    While I don't think you need to run the server software to achieve what you want --- all your multimedia on one external drive for backup purposes, there are other advantages to running the server software, such as Time Machine backups of all your machines, controlled from the server. This way the all of your machines are backed up using the server, you won't have to manually do a separate backup of the external USB drive. But even this does not actually require the server software, but it does require that you setup and manage Time Machine on each machine separately.

    Switon
     
  8. manual123 macrumors member

    Joined:
    Dec 4, 2006
    Location:
    Omaha NE
    #8
    If you try to have your itunes database on a shared drive, you run the risk of having changes made while one other computer is still using that database. Like what was said before about versioning. This could lead to a problem. For regular folders full of mp3s and vid files, just sharing them makes sense, however with anything like itunes or aperture databases, thats a real problem.

    any why not have the data you want stored locally on one machines internal hdd and just share it if sharing a folder will be the endd result anyways, no need in sourcing to external unless you plan to move it from one computer to another which then gets rid of the reasoning for them being shared in the first place.
     
  9. switon macrumors 6502a

    Joined:
    Sep 10, 2012
    #9
    RE: iTunes...pausing...

    Hi manual123,

    This is precisely why iTunes does not normally allow more than one instantiation to be running at a time: so two iTunes can't clobber each other's writes. But with one iTunes running and connecting to some iTunes Library, including an iTunes Library on an external or shared disk (it doesn't matter), then Home Sharing allows a second iTunes.app running on a different machine to have access to the Library connected to the first iTunes.app.

    But since iTunes seldom actually modifies a file, rather it just adds new files and serves song/video files (except for meta-data files), then having the second iTunes "slightly" out-of-date is generally not a problem. If it is a problem, then just reread the iTunes Library.

    It turns out that iPhoto locks the iPhoto Library it is connected to, so in the case of iPhoto/Aperture Libraries it does not matter if they are on a Shared drive since once one iPhoto attaches to a library it locks it so a second iPhoto cannot attach to the same library. But the second iPhoto could attach to a different iPhoto Library on the shared drive. Or, when the first iPhoto disconnects from its iPhoto Library, then a second iPhoto, perhaps on a different machine, can connect to the original iPhoto Library as long as it is on a Shared drive.

    Sharing the disk that contains multimedia libraries and files has many advantages, albeit there are a few downsides, as you point out.

    Switon
     
  10. manual123 macrumors member

    Joined:
    Dec 4, 2006
    Location:
    Omaha NE
    #10
    I agree , and some how didnt see that you've already explained that eariler in the post. Homesharing solves the itunes connected media IMO, but what about his needs for file access from his iOS devices? Getting his iTunes stuff is cake, but getting his docs,pics, may not be, or is it? BTW i use iTunes match since beta and love that all my media (iTunes anyways) is completely accessible even while driving down the road using iPhone docked in car. For access fot all the other stuff, I have no idea and actually never thought about it before but would really like to know myself. for connecting my macs to my ps3, i use eyeconnect but for seeing data in home directory from iOS, never done. Except fo rmy use of Virtual Computing.
     
  11. switon macrumors 6502a

    Joined:
    Sep 10, 2012
    #11
    RE: iPhone, iPad, etc....

    Yeah, I'm no help here on how to connect iPhone to a shared disk, as I don't have an iPhone or an iPad so I know very little about them. Connecting Macs, Linux machines, and to some extent Windows machines to shared disks --- this I do routinely.

    I haven't really even converted over to the iCloud yet, although I do use it occasionally. When I do use it, for transferring a data set for instance, I transfer the file to the iCloud, then download it from the iCloud on a different machine. I seldom have to do this, since I typically use much faster means for transferring files, but when in a pinch this has worked for me.

    Regards,
    Switon
     

Share This Page