2 Replies Latest reply: Dec 3, 2013 11:01 AM by AnalogKid
spawnocula Level 1 Level 1 (0 points)
Hi,

I'd like to share how I solved my problem with auto-mounting a network disk image/folder share to be used as a custom library/location for Aperture 3.xx. I can now either reference the master photos from the network or have it copy to this disk image volume on the network, although it might be better to have it copy to the disk image volume, so one can move it around as a file later. I researched hard over these forums and internet resources and discovered what I thought was the best way to accomplish this. Initially, I found right away that Aperture doesn't allow you to create a library over your network drive or a home server such as mine, unless it is partitioned/formatted to Mac OS. This wasn't acceptable for me as I also run Windows 7 PCs that need to utilize the network folder shares, as well.
I don't understand why I don't have this problem using iPhoto 2011, and do with Aperture 3.0, which is a far more expensive application. Anyhow, I read a little about NFS, but didn't know how to implement this or if it required the Mac Server and/or a non-built in application, it probably isn't compatible with windows. So, I found that by creating a .DMG disk image file, as a partitioned/formatted Mac OS file in Disk Utility, and saving it to the network folder of my choosing, did the trick.

Steps I used to accomplish this:
-Go to Disk Utility and create "New Image"
-Select format w/ MacOSX Extended(journaled) and choose "single partition/GUID" type (or whatever you want)
-Enter a custom size of your disk image (ex in 1GB or 1TB). Click "Create"
* I created this locally 1st and then I copied it over the network, to the network folder/subfolder on my HP Mediasmart Home Server EX495. I found that creating it over the network took too long and would crash Disk Utility.
-After it's copied to your desired location over the network folder, open Automator.
-choose "Application" workflow, double-click to add "Get Specified servers". Enter location of your server (ex smb://hpserver/)
-Then add "Connect to Servers",
-Then add "Get specified Finder Items". Click Add, and locate your disk image file over the network. (this will automatically add the location path. For ex. smb:/hpserver/photos/aperture_library.dmg)
-Then add "Mount Disk Image".
-Then test workflow by clicking on "Run" button on top right of window. If your
Finder->Preferences->General settings on your Mac is set to show "Connected Servers" on your desktop, your disk image will appear on you desktop.
-Finally, save this Application workflow as an application by clicking File menu->Save As. Save this to your documents folder area.
-To have your Mac auto-mount your disk image automatically when you login:
->go to System Preferences->Accounts->your "Admin account name"->Login Items
->click "+" sign and navigate to the Documents folder, to where the Automator application you saved
->click Add. Once done, it will appear on the Login Items area. You can choose to hide it, if you want by clicking the checkbox.
-Now Restart your Mac, and now your disk image should auto-mount.

Hope this helps, as it helped me solve the issue. Too bad one must have to program this and it is not native on MacOSX.

17" Macbook spring 2010 / iPhone 4, iOS 4
  • J D McIninch Level 5 Level 5 (4,060 points)
    Too many steps. Do this:

    1. Go to Disk Utility and create a disk image with the following properties:
    Format: Mac OS Extended (Journaled)
    Partitions: Hard Disk
    Image Format: Sparse bundle disk image

    2. Copy the image you just created to the share on the network where it should reside.

    3. Open System Preferences, and click on the Accounts icon

    4. Select *your account* and click on the Login Items tab

    5. Drag the icon for the disk image from the network share into the Login Items list

    If a login item is something on a network share, it will reconnect to the share it's located on automatically first.

    If a login item is a disk image, the disk image will be opened and mounted.

    It's important that the image is a journaled one because if it isn't, being disconnected from it while writing would be potentially disastrous.

    It's important that the image is a sparsebundle for two reasons: sparsebundles only take up as much space as they need (e.g., a 1Tb sparsebundle with 100M of data takes up about 100M of space), and they also break the disk down into smaller files. If the underlying filesystem on your network share is FAT32, then no file can go over 4Gb. If you use a sparsebundle, of course, there's no practical limit to how large the disk image can get. Also, it can speed up certain types of backup procedures.

    I suggest using partition type "Hard Disk" instead of "1 partition GUID" because, as a disk image, there's no sense in having a partition table or making it bootable (because you can't boot from the image).
  • AnalogKid Level 1 Level 1 (10 points)

    How would I automount an encrypted disk image at startup rather than user login?

     

    I guess this is kind of a two stage question:  how do I automount at boot, and how do I automount an encrypted image (is there a machine keychain, for example) without a user.

     

    I have a server that I'd like to have automount an encrypted disk image when the machine boots rather than waiting for a user autologin.