How to unfreeze drive in Linux?

Solution 1:

If it's a laptop where it's hard to get to the disk drive to unplug it etc, use the suspend method. It worked for me. From the terminal I did this:

sudo systemctl suspend

Wait 1min, then tapped the laptop power button bringing the laptop back up and repeated the:

sudo hdparm -I /dev/sda

And viola, "not frozen".

Solution 2:

Suspend & resume unfroze my drive.1

I just suspended my Laptop and then resumed it and then my drive was unfrozen. (You may need to hot-plug your drive before suspending - I did not need to.)

This is much easier than your approach.

1https://serverfault.com/a/558556/453474