bediron wrote:
Surprisingly when I got home (and until this morning) it was still ok. It hasn't crashed yet. I do remember that when I logged in the last time I did not get the "Could not read the drive attached. Eject. Ignore. Initialize...". So I used Disk Utility to see if I can locate the identifier the dead hard drive. Guess what, the drives changed from the last picture I posted. I can now "see" the dead hard drive of 2 tb, which for a fact I was never able to since a year ago. I'll attach a picture for that.
Yeah, that probably doesn't bode well for my proposed fix.
As you can see from the above, it is different from the last time. I've yet to figure out how to find the identifier of that drive to do the trick you showed.
In your latest screenshot of Disk Utility which shows a grayed out "disk1s2", you can see the device identifier for the highlighted HDD in the lower right "Device: disk1". Keep in mind every time you boot the computer this device identifier can change so make sure to check before issuing any commands for partitioning & formatting the drive.
But currently it hasn't crashed anymore and I'm afraid to restart it because the problem could happen again.
The problem could possibly occur when waking from sleep.
So... did the Safe Mode fix it?
No. Safe Mode may just have been a coincidence or maybe some software is trying to look for connected devices and that software just isn't running while in Safe Mode.
Should I try creating a small partition on it? I'm pretty that drive is dead.
You really have nothing to lose by trying. If the command doesn't work, then I can modify the command to try placing the partition near the end of the drive which may never have been accessed before instead of at the front where most of the wear occurs. However, from the behavior of this iMac & HD you have described, I think the drive failure may be severe enough that it will always cause a problem while it is connected.
Actually if my original command fails to complete, then you can try using the following command to keep most of the HD empty except for a tiny 50MB partition near the end of the drive...maybe it will have a better chance of succeeding.
diskutil partitionDisk disk4 3 GPT free Free2 1.8T jhfs+ BadHD 50M free FREE R
For anyone who is interested, this command is creating three partitions ..... it is creating 1.8TB of empty space, followed by a 50MB partition with an HFS+ journaled volume called "BadHD", and more empty space (the "Free2" and "FREE" designations are not used by macOS but are required to fill out the command):