Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sparkie7

macrumors 68030
Original poster
Oct 17, 2008
2,542
287
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
 
If there ends up being no solution for this, you can probably write an applescript to unmount the drive on startup.
 
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
 
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
 
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 ?
 
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 ?

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.
 
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

sorry forgot to mention its an internal drive

passwording is an option but another step i'd rather avoid on start-ups
 
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.

how did you hide it?
 
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
 
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

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:
 
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.
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.