Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



Cannot Unmount Disk...
 
Share:
Notifications
Clear all

[Solved] Cannot Unmount Disk That has O Byte App and Folder Undeletable in Trash

10 Posts
2 Users
0 Likes
207 Views
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

Hello,

I have an an external Toshiba 4tb hard drive where I had deleted a folder and an app that are now 0 byte undetleable files in the Trash with the message, "The operation can’t be completed because some items had to be skipped. For each item, choose File > Get Info, make sure “Locked” is deselected, and then check the Sharing & Permissions section. When you are sure the items are unlocked and not designated as Read Only or No Access, try again." As I am the "owner" of the files & they are not locked, I started to suspect the drive. I ran Disk Utility and the drive will not unmount. I tried unmounting it with the Terminal and received a PID dissenter & killed that, and now have a messages that says, "failed to unmount: dissented by PID 58946 (/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Support/mds_stores) Dissenter parent PPID 1 (/sbin/launchd)" To be honest, this is now well beyond my skills and I found you! This started out as a mission to finally, somehow delete two 0 byte files from my Trash that I believe are being held by this drive I cannot fix and I am stuck. I would appreciate your help.


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2678
 

Oh wow, I've never seen this happen - I'll try to help, but keep in mind that I'm not an expert either 😁 

First when it some to files being locked. Files can be locked, even when you're the owner. My best guess (since i never lock my files) is that locked files can have a secondary protection against deleting by accident maybe? Anyhoo - I assume you already checked if these files were locked. 

There is a way (even though it may not be the fastest way) to find locked files on your disk.
Execute this in the root of your disk (eg. /Volumes/MyDisk):

~ $ ls -lRO | grep uchg
-rw-r--r--@   1 hans  staff  uchg   1204 Feb 21 10:29 some_locked_file.txt

This should recursively (R) list all files in long format (l - lowercase L), including file flags (0 - zero), and pipe them through grep to catch all lines with "uchg" in it (locked files).

Could be that something else is keeping a file open, a different kind of locked I suppose. You can see all open files with "lsof", which I suppose you can also throw through grep. Eg:

lsof | grep "/Volumes/MyDisk"

If it remains blank, then no files on your disk are locked.

I suppose the ultimate "unmount" is by shutting down your Mac - or are you getting a message that something is preventing it from shutting down?


   
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

Running lsof showed nothing. Likewise, it has never interfered with a shutdown or restart. What I didn't mention is the persistence of this problem, which has even continued through the upgrade from Monterey to Sonoma. So, this morning, I used sudo diskutil unmountDisk force which surprisingly worked. When I opened Trash, it was obviously empty. I tried running repairvolume, which failed, so I've remounted the drive and begun to backup the files I need to save and will repartition the drive. Interestingly, without thinking, I deleted a few files and directories as I went through the files I intend to back up, and a handful have likewise become 0 byte, undeleteable files in the Trash. After unmountDisk force, they disappear as well, so the problem is replicable. It would be interesting to know if the issue sources with the drive or macOS since it persisted from at least Monterey through Sonoma with the same drive. In any case, I appreciate your help!


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2678
 

I would guess that macOS isn't the culprit. I'm running Sonoma on an M1 and an Intel Mac and have never seen this issue before.
The latter, a Mac Pro from 2013, not even supporting Sonoma, so I used OpenCore to get that unsupported Mac to run Sonoma.

I'd guess one of two issues:

1) The disk is in a bad shape. Most likely.

You could check the S.M.A.R.T. info in Disk Utility, but USB devices and modern SSD's provided by Apple may not supported reading S.M.A.R.T. info of a disk. You could try a tool like DriveDX - there is a free trial, and to be honest the paid version is overpriced, so it may be worth looking for another tool.

2) One or the other application is interfering or accessing files. Least likely.

Technically one should consider virusses as well, even though you're on a Mac, but I have to say that it's not very likely.
Maybe you have one of the other tool or service running that access files. Eg. one that cleans up Apple files (like BlueHarvest - which I use myself), Antivirus software, a tool that indexes files, or creates thumbnail, or something like that. I'm just randomly guessing - as I have never seen this issue.

Not sure if you have another disk available, just to see if this happens with other disks as well?


   
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

I have several external disks and everything is fine. The problem is isolated to this drive only. After forcing an unmount and running First Aid, there doesn't appear to be any aspect of this disk - that was partitioned as Apple an APFS volume - without error. First Aid concludes "the disk was found to be corrupt and needs to be repaired," and terminates with the message, "Try running fsck against the entire APFS container instead." Honestly, I didn't expect much else. I suppose I will give it one last shot with fsck, but my hopes aren't high and I predict repartitioning the drive, which, as I recall, is only a year or so old.


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2678
 

Sounds like one of two options:

1) Disk got somehow corrupted, for example due to power failure or incorrect USB disconnect.

In case "fsck" doesn't work, you can still repartition and reformat the disk. I'd check the S.M.A.R.T. info if you can - just to make sure your disk isn't dying.
Considering it's about a year old: check the manufacturers website, since it's highly likely still under warranty. I had this a couple of years ago and Western Digital (in my case) swapped the disk for free for a new one.

2) The disk is somehow dying - the S.M.A.R.T. info can confirm this.

As mentioned before: reading S.M.A.R.T. from a USB drive can be a challenge since it seems macOS doesn't support this.
I did read somewhere that the DriveDx comes with a driver that can read S.M.A.R.T. info - depending on the USB to SATA chip.

As an alternative, you could plug the drive into a Windows computer and use "wmic diskdrive" to see the disk status.
Based on this I did some snooping and added some info here.
I did find GSmartControl, available for Windows/Linux/macOS, but haven't tested it under macOS since I suspect the macOS USB drivers will not pass the needed info to begin with.


   
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

As predicted, fsck did not work, so I backed up the files I needed and repartitioned the drive. So far, it seems to be error free & the Trash is finally emptying normally. A friend pointed me to a relatively inexpensive disk utility for macxOS DriveDX ( https://binaryfruit.com/store) that might interest you. It provides a lot of information about SMART drives:

 I am still reading the documentation to understand what all this means, but it appears there are "lifespan" issues despite the literal age of the drive. I have trying to replace my traditional drives with SSDs whenever possible, and this drive appears to be the next candidate. Again, I have learned a lot from this experience & I thank you again.


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2678
 

You mean DriveDX that I recommended twice already haha (all good)? 😉 😂

Anyhoo - glad you found the tool, and it looks like there may be a warning worth looking at indeed (as you mentioned).
And you're right: it has been running for about 41 hours and it should not show any issues.
Worth checking with Seagate, or the person that sold you this disk. 

Anyhoo - having said that: doesn't mean your disk is broken/dead/dying. There is still the option that the filesystem accidentally got corrupted.

If I recall correctly, Seagate (as do other manufacturers) offers some tools to analyze your disk. Found this link to Seatools (you may need a Windows or Linux PC).


   
ReplyQuote
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

Aye! Not that it matters much, but the drive was actually a Toshiba - which disappoints me more than a Seagate - and as I sat at the computer I kept hearing an odd buzz through the external speakers. I had kept this drive sitting out on my desk just in case, and I saw the activity light was continuously flashing, then the messages started that the drive (and my other external drives) had been ejected, which kept repeating in tune to the buzz in the speakers until I literally pulled the plug on the Toshiba. I have never seen such a thing. I went to the Toshiba site and found that it was outside of the 1-year warranty. I downloaded a Toshiba Diagnostic Utility and ran it on my wife's Win machine & it couldn't fix it, listing error after error. I have a Win low-level formatting app and I may try that this weekend, as you say, it doesn't seem to be dying or broken. Perhaps a low-level Win format will revive it. I'll let you know.


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2678
 

That actually is disappointing. In my experience, Seagate is probably the worst, where as Toshiba should be top notch.

As for warranty: Toshiba may list 1 year, however in certain countries 3 years is mandatory by law (it's 3 years in The Netherlands if I recall correctly).
Maybe worth looking into for the country where you're at. Once you know the law: approach the seller (if you can).

Good test on your wife's computer. And maybe a low level format will fix it. Also remove all partitions, and maybe intentionally change the partition and bootblock type. Eg. MBR and exFAT formatting. Apple uses GUID by default and APFS.

The more I hear of your situation, the more I suspect this disk is dying ... or at least: I wouldn't trust it anymore with important data.


   
ReplyQuote
Share: