MacBook – RAID drive over-full, bringing laptop to a crawl & crashing it, need to triage and delete files

external-diskmacbook properformanceraidterminal

I'm helping a friend try to restore functionality to his MacBook and LaCie 5big Thunderbolt 2 RAID array. He's been editing a film and over time the RAID device has filled completely up. I'm not sure exactly how much total storage it offers, but it's around 10TB and there is only about 280GB of free space left. That's about 97-98% full. I remember from college that having a spinning disk too full is BAD for performance but this is ridiculous. His MacBook seems fine until you plug in the RAID, at which point the entire OS crawls to a halt. The Lacie shows up for perhaps a moment in the finder (and Disk Utility) but then the entire thing grinds to a halt. His MacBook crashes constantly. I think we need to free up some space on that drive or he stands to lose a lot of work and possibly some footage as well. If we can just get access to the drive and stop all the unnecessary disk traffic to it, we might have a chance.

It seems clear that the GUI elements (About this Mac, Disk Utility, Finder) really bog things down. My guess is that these make numerous informational and file listing requests on a polling basis as soon as you open the window, which causes the already-distressed drive even more stress. I suspect (but this is just speculation) that there might be some kind of routine defragmenting going on or something.

I was imagining that using Terminal commands to inspect the drive's information and contents might help stop a lot of the disk traffic. I was considering starting the machine in single user mode or something.

Can anyone suggest a course of action where I can connect to the drive via terminal and NO OTHER PROCESSES interact with the drive? Can we stop all indexing on this drive or any byte shuffling that might be doing defragmenting and that sort of thing?

EDIT: it seems clear that we need to stop Spotlight from indexing this RAID array. Unfortunately, we've tried opening the System Preferences->Spotlight->Privacy and then clicking '+' and dragging the drive into the privacy list, but the system is so busy that it refuses to make the change. We need to be able to prevent indexing of the drive before it gets plugged in somehow.

EDIT 2: per jksoegaard's suggestion, here is the dmesg output. It was tricky to obtain this information — the machine is quite unstable from the moment you plug the drive in. This was the dmesg output just after the Storage icon disappeared from the finder and just before the machine crashed.

EDIT 3: Also per jksoegaard's suggestion, we have booted the machine in recovery mode with the drive connected.

The drive is much better behaved in recovery mode than it is when the Mac is booted normally. It is noteworthy that all of the drives appear in the disk utility and each has S.M.A.R.T.=verified and each drive appears to be in good health. We can also use the terminal to list the drive's contents and even remove files.

It does look like some piece of software must be slamming this drive when the mac boots normally. Any hints on how to identify this process would be much appreciated.

Also, I'm not at all certain, but it looks like whoever set it up didn't follow the Lacie installation instructions, instead choosing to set it up as Apple Raid? I don't know this for certain, but expect it might be disastrous to install the Lacie drivers & software if they were not used originally. Plz see attached images:

Looks like apple raid!
enter image description here

Each drive is listed individually.
enter image description here

EDIT 4:
We have been trying to work with the drive attached to the mac booted in recovery mode, and the drive is still being SUPER flaky, but you can actually work with it a bit. For example, we were able to copy a folder to another USB drive reasonably well. We then tried to delete that folder on the RAID drive using rm -r /Volumes/Storage/music/dir then we got some weird prompts like

rm /Volumes/Storage/music/dir/file.mp4a: No such file or directory
override rw-r--r-- _unknown/_unknown for /Volumes/Storage/music/dir/file.mp4a?

Answering yes to all those seems to satisfy the drive, but then when the rm completes, the flakiness comes raging back and when we try to ls -l /Volumes/Storage we get:

ls: /Volumes/Storage: No such file or directory

Continued attempts to copy or delete files from the drive eventually crash the laptop, even though its' running in recovery mode.

Best Answer

It is not so that having an external disk near filled up causes slowness of the system. That it not a rule. Having 280 GB free space on a 10 TB external RAID-array is perfectly fine, and does not in anyway in itself cause any slowness.

Of course if you're regularly adding data to the drive, you would want to consider adding extra disk space, as you would eventually run out of free disk space to store new files.

It is also not the case that Disk Utility and Finder make numerous information and file listing requests on a polling basis. Opening Disk Utility will query the RAID for it's size and partitions once - that is a very basic request that should take a fraction of a second. Similarly opening Finder will list the files and folders in that particular folder once - not continually polling for a file list.

If you have other programs running that are actively saving, adding or removing files on the external drive, then that would cause Finder to update its information about those files.

Furthermore it is not the case that "routine defragmentation" takes place when using Finder or Disk Utility.

As for you question on how to connect to the drive via Terminal without other processes bothering you - I would suggest booting the Mac in Recovery mode by holding down Cmd-R while booting the computer. From there you can open an undisturbed Terminal window.

However, I would highlight the possibility of a controller or drive failure might be the cause of all your problems. I would immediately check the Console for signs of disk I/O errors. You can also run the command sudo dmesg from a Terminal to get more insight into current kernel error messages and warnings.

Another thing to look out for are programs that by design try to access all files on external disks. For example check whether you're running backup software (such as Backblaze or similar) or antivirus software that is set to backup/scan all files on external drives. You could temporarily pause/disable them to check whether or not they are causing problems.