When setting up a hard drive for Apple Time Machine backups in OS X or macOS, if you enable the encryption option the drive may perform this incredibly slowly, sometimes taking days to encrypt even a small percentage of the drive.
Provided you are running a version of the operating system from 10.9 or newer (Mavericks through to Big Sur) then you can stop the encryption process running by entering the following in Terminal and save your hard drive from failing due to continuous access.
diskutil cs revert /Volumes/drive_name -passphrase
To find the drive_name then type diskutil list and use the Volume name.
When you enter the command you will be prompted to enter the passphrase you set when enabling the encryption.