how to disable the internal hard drive

I am using OS X 10.6.8 on a macmini. i boot from an external FW800 3.5" HD and only use the internal drive for a daily backup.

For the the sake of quietness and reduced wear and tear i want to keep the internal drive in a powered-off state until needed for the backup.


The closest i was able to get to my goal has been to eject the two internal partitions thru finder, but the drive begins spinning again after one minute. However, the partitions don't re-appear in finder and are found to remain in the unmounted state in disk utility.


What is causing the spinup again, and can any script be written to stop this happening? Thinking ahead to using this idea on an iMac as well.


Hoping someone can help.

Mac mini, Mac OS X (10.6.8)

Posted on Jan 26, 2012 6:34 AM

Reply
20 replies

Dec 13, 2016 3:56 PM in response to leanch

leanch wrote:


I'd also recommend you try to use my util to auto disable your second drive on booting OS with an opportunity to enable it in one command whenever after. Please check it out: https://github.com/igorleanch/2ndrive

Um, why is this needed and how have you tested it?


fstab controls disk mounting and is built in to OS X/ macOS.

fstab can set a disk to never mount on startup with one line in /etc/fstab e.g.

UUID=YOUR-UUID-HERE none hfs rw,noauto

diskutil can mount a volume that has been setup not to mount in fstab.


You are solving a problem that already has an answer built into the OS.


Your script also fails on 10.9 (with a disk called '10.6'). What OS's have you tested?

The command you use…

diskutil info [device-name] | grep '10.6'

…does not include the name of any partitions when I do have a disk of that name attached.

You script also ejects entire disks which may contain other volumes, that is not an accurate method to handle multiple partitions.



Sorry to sound so negative but this is doesn't look very good.

Dec 14, 2016 6:13 AM in response to Drew Reece

1) I put the second hard drive to my MacBook Pro. Commonly I use SSD only and sometimes I need to use my second storage for example to use large media libraries. Why I need to boot this disk, listen his noise and waste my battery? The script solves all these problems. And if I want to connect it again I just have to run one simple command.

2) I believe there is a difference between unmounting and physical disabling a drive. If I just unmount it then physically it still be working.

3) I've test it on macOS Sierra 10.12

4) The instruction asks to find out a media name of your physical drive instead of a volume because the aim of the script is to disable his at all.

5) If you are interested then in the nearest future I intend to upgrade it in some way of simplification until degree of just 1 step to be able just choose a number of listed drive s in order to disable his automatically loading.

Dec 14, 2016 11:59 AM in response to leanch

2) What you believe is not entirely correct. Having a disk spin down does save power but you would have to physically remove it to have it 'detach' from the system. An internal disk remains attached to a system whether you use 'diskutil eject' or if you prevent mounting of all volumes via fstab. Your script makes no difference to using fstab. You can still mount an attached disk via 'diskutil mount disk [device_name]'. You get no extra benefit from your script.


3) The original poster is on 10.6.8, if you are going to recommend this script you need to test on that version. It doesn't work on 10.9 so I doubt earlier versions will work either.


5) You don't need your script. The OS already has a system for this feature - fstab. It seems unwise to reinvent something that is already built in - I'm also guilty of making similar mistakes (as are other posters here) 🙂

Adding more complexity to your script it seems like a wasted effort to me, I wish you luck with it but I hope you can see that there is actually a 'unix way' already built in to the OS to manage disk mounting - a single text file configures it for you. A single command will also mount that disk on request.



Sometimes the correct answer is to read the manual.

https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPag es/man5/fstab.5.html

or 'man fstab' in Terminal…


...

The option ``auto'' can be used in the ``noauto'' form to cause a file system not to be mounted

automatically (with ``mount -a'', or system boot time).

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

how to disable the internal hard drive

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.