5

I have a 256G SSD and a 1T HDD in my 27" iMac.

The 1T HDD is dying due to hardware failure.

Is there a file in OS X similar to /etc/fstab in Linux where I can prevent this 1T HDD from mounting?

I'd like to effectively disable/ignore this disk without needing to take it into an Apple store to be removed.

3

Yes!

First get the UUID of the partition you want to prevent from mounting... You can get this in Disk Utility "Get Info".

Now open your /etc/fstab file for editing:

sudo pico /etc/fstab

In this file add the following line (use your own UUID naturally):

UUID=[your UUID] none hfs rw,noauto 0 0

And save the file.

Restart for the change to take affect.

You can always mount it manually in Disk Utility.

| improve this answer | |
  • Thank you. This works in terms of preventing the disk from mounting, but I can still hear what sounds like the needle scanning on the platters repeatedly. Can anything more be done to kill power to the drive altogether - short of opening up the iMac? – Deefour Sep 18 '14 at 2:09
  • 1
    This does not work if the drive is not formatted.. there IS NO UUID!!! – Just World Jan 30 '19 at 22:50
2

Similar to Linux.

The preferred disk identifier a Volume UUID.

You can use disk utility to find the Volume UUID or use diskutil:

diskutil list

get the disk indentifier, e.g. disk0s4

diskutil information disk0s4

In the row labeled Volume UUID:

Volume UUID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Edit /etc/fstab as root (it may not exist), creating an entry of the form:

UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX none hfs rw,noauto

Also refer to

man -S5 fstab

| improve this answer | |
  • Thank you. This works in terms of preventing the disk from mounting, but I can still hear what sounds like the needle scanning on the platters repeatedly. Can anything more be done to kill power to the drive altogether - short of opening up the iMac? – Deefour Sep 18 '14 at 1:57
  • Have you unmounted it? Are there more volumes on the same disk mounted? Preferences > Energy Saver - Put hard disk to sleep when possible, does it persist through a power down/boot up? – user90735 Sep 18 '14 at 2:32
  • I went through a full power cycle, instead of restarting. The computer was off for about 8 hours. That seemed to fix it (for now). – Deefour Sep 18 '14 at 12:22
  • That puppy sounds seriously sick. – user90735 Sep 18 '14 at 13:33
  • 1
    This does not work if the drive is not formatted.. there IS NO UUID!!! – Just World Jan 30 '19 at 22:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .