Turning off auto mounting of HDs?

Discussion in 'Mac Pro' started by sparkie7, Apr 2, 2009.

  1. sparkie7 macrumors 68000

    sparkie7

    Joined:
    Oct 17, 2008
    #1
    Ok sorry if this is a basic question, but how do you selectively turn on and off auto-mounting of drives? I have two drives, 1 for boot with docs etc, and the other for CCC clone back up. But both mount up on start-up. I'd be nice to only have the boot drive mount only. So I dont accidently copy stuff to the clone/back up drive. And if I want to clone to it I can use Disk Utility to manually mount.

    Thanks for any help :D
     
  2. whatisthe macrumors member

    Joined:
    Apr 10, 2008
    Location:
    CT
    #2
    If there ends up being no solution for this, you can probably write an applescript to unmount the drive on startup.
     
  3. sparkie7 thread starter macrumors 68000

    sparkie7

    Joined:
    Oct 17, 2008
    #3
    thanks for the response :D

    i would have thought there is an easy solution to this :confused:

    i went into disk util and didnt see any options for turning off auto-mounting. maybe someone who knows may chime in
     
  4. ianjoh macrumors newbie

    Joined:
    Jun 5, 2006
    #4
    You don't mention whether or not your 2nd drive is external;
    I keep my external drive from mounting by turning off the drive's power after I've unmounted it. When i want to use it, I flip on the power and it mounts.

    You can even use a smart or semi-smart powerstrip to do this automatically.
    PowerKey Pro allows you to set up hot keys to power it on/off.

    Of course, all of this assumes the drive is external.
    If not, I'm sorry, I don't know of anyway to do it.

    You can set drives to spin down after a fixed time, via the Energy Saver
    Prefs, but this may not meet your needs.

    Just an idea, why don't you try to password protect the drive;
    if you mistakenly access the wrong drive, you'll enter the wrong password and the operation will not go ahead.

    good luck
     
  5. giltnerj0 macrumors newbie

    Joined:
    Apr 3, 2009
    #5
    Would hiding the drive from the desktop help ? There is a simple command line to hide a drive (don't have it right now, but google has it).

    Or if you don't want to do that, wouldn't all of the drive mounting etc still be taken care of by the fstab ?
     
  6. fatespawn macrumors member

    fatespawn

    Joined:
    Feb 22, 2009
    Location:
    Chicagoish
    #6
    because he mentioned that he wanted to accidentally avoid writing to his clone. That's exactly what I've done for my in-laws. Plug in an external and hide it. It mounts and is the time machine drive, but it's "out of sight out of mind." My father-in-law has a habit of poking around where he shouldn't. Hiding the external is the easy solution.
     
  7. sparkie7 thread starter macrumors 68000

    sparkie7

    Joined:
    Oct 17, 2008
    #7
    sorry forgot to mention its an internal drive

    passwording is an option but another step i'd rather avoid on start-ups
     
  8. sparkie7 thread starter macrumors 68000

    sparkie7

    Joined:
    Oct 17, 2008
    #8
    how did you hide it?
     
  9. hayduke macrumors 65816

    hayduke

    Joined:
    Mar 8, 2005
    Location:
    is a state of mind.
    #9
    I hacked something together a while back, but I was never entirely satisfied with it. I did it with a bash script that I was able to launch during the pre-flight when SuperDuper ran, but there was some SuperDuper problem that prevented this from working right. Anyways, I only offer this to give you an idea of how you might go about it. There is AFAIK no *easy* solution.

    The script below unmounts two back-up drives and writes to a log file so you can see if it worked or not. You can use diskutil to mount drives as well. Then you can automate it all as a cron job if you want, for example, to run back-ups at night.

    #!/bin/bash

    # Backup Volumes
    VOLUME1='/Volumes/COMPUTER_backup'
    VOLUME2='/Volumes/DATA_backup'

    # Devices
    DEVICE1='/dev/disk2s2'
    DEVICE2='/dev/disk3s2'

    # Unmount marker_backup/VOLUME1/DEVICE1 and output data/time to log file
    if [ -e ${VOLUME1} ]
    then
    echo ' Unmounting ' $DEVICE1 ' as ' $VOLUME1 >> /Users/YOURNAME/bin/backup.log
    /usr/sbin/diskutil eject ${DEVICE1}
    else
    echo ' ' $VOLUME1 'already ejected...POSSIBLE ERROR' >> /Users/YOURNAME/bin/backup.log
    fi

    # Unmount data_backup/VOLUME2/DEVICE2 and output data/time to log file
    if [ -e ${VOLUME2} ]
    then
    echo ' Unmounting ' $DEVICE2 ' as ' $VOLUME2 >> /Users/YOURNAME/bin/backup.log
    /usr/sbin/diskutil eject ${DEVICE2}
    else
    echo ' ' $VOLUME2 'already ejected...POSSIBLE ERROR' >> /Users/YOURNAME/bin/backup.log
    fi

    echo ' Finished @ ' `date` >> /Users/YOURNAME/bin/backup.log
     
  10. sparkie7 thread starter macrumors 68000

    sparkie7

    Joined:
    Oct 17, 2008
    #10
    hey thanks for the code :) might try that if i cant find a simpler solution. still surprised its not been catered for in OS X :rolleyes:
     
  11. rpaloalto macrumors 6502a

    rpaloalto

    Joined:
    Sep 19, 2005
    Location:
    Palo Alto CA.
    #11
    I know, when I first set up multiple drives in my mac pro. I found it a little strange. That their was no option to set, Certain drives not to mount. It can be a hassle to try and remember. To eject or unmount drives. That I don't want people having accidental accesses too.
     
  12. Pressure macrumors 68040

    Pressure

    Joined:
    May 30, 2006
    Location:
    Denmark
    #12
    Incredible how much trouble people go through to hide their porn from the missus :p

    Of course this post is dripping in sarcasm for those without humour.
     

Share This Page