You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

Read-only file system external drive

Hello,


Problem: Two of my external Western Digital drives have suddenly and simultaneously been designated as "read-only file systems." Consequently, I cannot access them, even with sudo.


Need: I want to mount the drives with read-write access.


This problem renders Time Machine useless and means I have to (occasionally) spend hours manually copying files back and forth using the terminal, as the Finder is never capable of doing so without an error.


At the very least, I would like a workaround to remove whatever marker the OS uses to designate the drives as read-only. Compared to copying hundreds of GB for no reason, I'd be happy to execute a Terminal command or two.


Background


I suspect the problem is caused because WD drives spin down regularly and take longer than macOS would like to spin back up. They are then designated as read-only because the OS has had difficulties accessing them multiple times.


This Mac is running a pristine version of Sierra, installed about two weeks ago after erasing the internal drive. I do not manually change system files or install programs which modify system files (cache-cleaners, etc.).


The drives are not damaged. I have checked them many times on multiple computers. Unfortunately, this is not the first time I've been locked out. Please let us work on the assumption that they are in good working order.


The drives appear in the finder on restart only.


Once unmounted (ejected), I cannot remount them using:

  • the GUI Disk Utility
  • diskutil
  • mount (the -uw option doesn't work on hfs as demonstrated with -dv), or
  • mount_hfs


I can read from the drives.


I tried Nicholas Vahalik's idea of turning off journaling with hfs.util and running fsck_hfs. hfs.util worked, but the disk wasn't journaled. fsck_hfs was unable to write to the drive.


I am unable to change permissions using the Finder or the shell, but they appear to be set correctly for my user to have read/write access anyway.


Both drives contain some hidden files in their root directories. I suspect one (or more) may have locked the file system. In other words, when the OS goes to use the drive, if it sees one of these files present, it designates it as read-only. The suspect files are:

  • .apdisk (apparently a new apple fs?)
  • .fseventsd (a directory, but may contain something pertinent)
  • two others I'll need to reboot to see again. Something like .diskID and .diskIDx2


However, I cannot access the above files to move or delete them for testing purposes.


There is something "higher-level" going on that prevents write access on the drives. Any help determining what that is, would be appreciated!

Mac mini, macOS Sierra (10.12.1)

Posted on Oct 26, 2016 9:24 AM

Reply
8 replies

Mar 31, 2017 6:04 PM in response to Breaky

In some circumstance (it doesn't happen often enough for me to know exactly what these are) OS X will mark failing drives as read-only giving you a chance to make a copy of your data before it fails completely. On the rare occasions I've seen this ISTR an alert dialog explaining what was going on.


C.

Oct 27, 2016 9:09 AM in response to Breaky

The command:

$ diskutil info disk3s2

has revealed that the drives are "Read-Only Volumes," but I haven't been able to discover why this is the case or how they were designated as such.


I have found that the following commands save me from having to restart the Mac to remount the drive each time:

$ sudo mkdir /Volumes/BackupDrive

$ sudo /System/Library/Filesystems/hfs.fs/Contents/Resources/hfs.util -m disk3s2 /Volumes/BackupDrive fixed readonly nosuid nodev

The fixed flag came from the diskutil info command above. The readonly flag appears to be required, as writeable (or "writable" in the error message, also see man entry) will not work.

The fact that the writeable flag will not work makes me think that the file system has been set to read-only in some other way. It is not simply a matter of deliberately mounting it rw. I have tried chmod, xattr, and attempted to change the UUID (hfs.util -s) of the partition in the hope that this would separate the drive info from whatever is designating it read-only. This was unsuccessful.

I suspect this is less complicated than it seems, but no solution yet.

This does seem to be a common problem, and has been for many versions of macOS.

Read-only file system external drive

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