Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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
Question marked as Best reply

Posted on Jun 28, 2014 12:45 PM

As always BACKUP FIRST…


If you want a disk to not mount on boot use /etc/fstab.


This hints example is a bit old, so find a newer example if you can't do parts of it (I'm short on time & the moment to explain fully).

http://hints.macworld.com/comment.php?mode=view&cid=62120&query=stab+prevent+mou nt(NOTE: See this comment, not the original hint)


Here is my short version…


In Terminal …

diskutil list

Find the disk 'IDENTIFIER' for the volume you want to prevent mounting.

Insert that 'IDENTIFIER' into the next command (here it is disk1s2)

diskutil info disk1s2

Find the Volume UUID, make a note in a text file…


Edit the text file to look like a correct fstab entry…

UUID=MAD3-UP-5H1T-I5-H3R3-S0-U-RTFM none hfs rw,no-auto

#NOTE: The file system type may need changing & there are many other 'options', the mount command explains the options so read 'man mount'


In Terminal in your admin account, edit the '/etc/fstab' use 'vifs' as root… (a fstab file will be created if it doesn't exist)

sudo vifs


Copy the line from the test file & paste it in to the Terminal that is editing fstab - I'm uncertain if your editor will be 'vi' or 'nano', you will have to search for help on using these, if it says 'GNU nano' at the top hit crtl +x, Y, hit return to save.

If it is 'vi' go and use 'vitiator' or search for vi help! - vi is a pain in the neck!


Don't forget to read the manual for fstab…

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man5/fstab.5.html


If you need the disk to mount at any point just use Disk Utility or the command.

diskutil mount disk1s2



P.S. If you mess up your /etc/fstab you may not be able to boot, just boot to single user mode and comment out the entries with a '#' (octothorpe = alt+3 )

20 replies
Question marked as Best reply

Jun 28, 2014 12:45 PM in response to had2B

As always BACKUP FIRST…


If you want a disk to not mount on boot use /etc/fstab.


This hints example is a bit old, so find a newer example if you can't do parts of it (I'm short on time & the moment to explain fully).

http://hints.macworld.com/comment.php?mode=view&cid=62120&query=stab+prevent+mou nt(NOTE: See this comment, not the original hint)


Here is my short version…


In Terminal …

diskutil list

Find the disk 'IDENTIFIER' for the volume you want to prevent mounting.

Insert that 'IDENTIFIER' into the next command (here it is disk1s2)

diskutil info disk1s2

Find the Volume UUID, make a note in a text file…


Edit the text file to look like a correct fstab entry…

UUID=MAD3-UP-5H1T-I5-H3R3-S0-U-RTFM none hfs rw,no-auto

#NOTE: The file system type may need changing & there are many other 'options', the mount command explains the options so read 'man mount'


In Terminal in your admin account, edit the '/etc/fstab' use 'vifs' as root… (a fstab file will be created if it doesn't exist)

sudo vifs


Copy the line from the test file & paste it in to the Terminal that is editing fstab - I'm uncertain if your editor will be 'vi' or 'nano', you will have to search for help on using these, if it says 'GNU nano' at the top hit crtl +x, Y, hit return to save.

If it is 'vi' go and use 'vitiator' or search for vi help! - vi is a pain in the neck!


Don't forget to read the manual for fstab…

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man5/fstab.5.html


If you need the disk to mount at any point just use Disk Utility or the command.

diskutil mount disk1s2



P.S. If you mess up your /etc/fstab you may not be able to boot, just boot to single user mode and comment out the entries with a '#' (octothorpe = alt+3 )

Jan 26, 2012 12:22 PM in response to X423424X

In a macmini the internal HD is typically a 5400rpm 2.5" drive which may have a data read/write rate of about 60MB/s max. A 3.5" 7200rpm external drive will typically have a data read/write rate in excess of 100MB/s, limited only by the type of connection used. Firewire 800 should be able to deliver close to 100MB/s, whereas USB 2.0 typically will allow only about 35-40MB/s in practice. Thunderbolt will the allow all hard drives to deliver their maximum possible transfer rate, which is usually determined (and limited) by their disk diameter, rotation speed, and data recording density.


Using my current setup as described in my OP i can open my apps in about half the time it took when booting from the internal drive.


Anyway, this is a bit of a diversion from my question, which requires some high level of technical insight i suspect.

Feb 13, 2017 9:01 AM in response to leanch

leanch wrote:


Hi, dear Drew.


I've tried to use fstab and turn off my disk automatically on startup by UUID but disk still works physically while it remains unmounted and it produces redundant noise and excessive battery usage of a MacBook.
So I updated my script [https://github.com/igorleanch/2ndrive] and now it works automatically, you just should choose disk number and thats it. Every time you run your Mac or back from sleeping the disk will be silent. But if you want to get it back to life then just run one '2non' command from Terminal.
For sure there is no such convenient solution of this problem by default.

You need to tell Apple if there is no easy solution - fstab is intended to handle this according to the manual.

https://ssl.apple.com/feedback/


Good luck with your script. As I stated earlier in this thread device names can change on startup as disks can sometimes respond at different rates & be attached in different orders. You might be OK on a laptop with 2 reliable disks but Mac Pros with multiple disks can see different device names, it's more likely with external disks (that is what UUID is meant to help with).

Feb 13, 2017 12:24 AM in response to Drew Reece

Hi, dear Drew.


I've tried to use fstab and turn off my disk automatically on startup by UUID but disk still works physically while it remains unmounted and it produces redundant noise and excessive battery usage of a MacBook.
So I updated my script [https://github.com/igorleanch/2ndrive] and now it works automatically, you just should choose disk number and thats it. Every time you run your Mac or back from sleeping the disk will be silent. But if you want to get it back to life then just run one '2non' command from Terminal.
For sure there is no such convenient solution of this problem by default.

Jul 3, 2012 5:04 PM in response to had2B

You've probably found an answer already, but since I stumbled across this while trying to solve my own problem...


Most likely your drive spinning up will be due to Spotlight indexing. Choosing to disable indexing may work (letting you still search, albeit slowly), or you can add it to Spotlights privacy list to stop it entirely.


Anoter possibility is some hardware monitoring program, such as iStats Menus...?

Jun 28, 2014 11:28 AM in response to had2B

Hey Allan, HOW ABOUT ANSWERING THE QUESTION? I hate when people respond with "why would you want to do that". Use a little imagination. I have an iMac with a bad internal hard drive that I keep getting warnings about. I use an external drive to boot from because it is an utter nightmare getting into and out of this imac, and carries a great risk of breaking things when you do do it. So again, Is there a way to prevent the mac from even attempting to mount the internal drive?

Jan 30, 2015 12:57 AM in response to Steven Swart

I hear you about people NOT answering the question but telling you everything else you don't need to know. I really hate dorks who tell you that you are wrong but don't even bother to answer the question.


anyway, i also wish there was a way to disable the disks when you don't need them, just to save power and wear and tear, without having to take them out.


anyway, fstab does not work on yosemite. however there is a tool that does, and it works well as I have used it on yosemite:) it is called diskejectd from GITHUB. I was able to hide my internal ssd esxi datastore from my usb based os x install on a macmini. very nice solution.


Neal



https://github.com/andre-richter/diskejectd

Jan 30, 2015 12:24 PM in response to nvadekar

nvadekar wrote:


anyway, fstab does not work on yosemite.


Can you please explain why you say this? Have you tried it? What steps did you try?


There is a 'meme' that has been occurring for every OS X version I can remember, it is based on a common misunderstanding…


Many people read the contents of /etc/fstab.hd

IGNORE THIS FILE.

This file does nothing, contains no useful data, and might go away in

future releases. Do not depend on this file or its contents.


They assume fstab is going away. That is not the case that file is not used for fstab (note the .hd suffix).

Just because /etc/fstab doesn't exist by default doesn't mean it doesn't work.


Try these in Terminal…

man vifs
man fstab


Why would Apple install manuals for tools that are 'not working' on that OS?

You can create a /etc/fstab file & enter your own disks into it to prevent them mounting.

I just did this on 10.10 & the disk does not mount on boot or disk insertion.


nvadekar wrote:

however there is a tool that does, and it works well as I have used it on yosemite:) it is called diskejectd from GITHUB. I was able to hide my internal ssd esxi datastore from my usb based os x install on a macmini. very nice solution.


https://github.com/andre-richter/diskejectd


That tool looks like it works with 'device names' those can change if another disk is attached before it. It is a terrible idea to replace built in parts of the OS with tools that do not take into account how the OS works on a basic level.


It should really use UUID's so that the device attachment order is not an issue.

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