We've mounted consumer hard disk products in private aircraft a number of times, and some commercial aircraft too (which requires destructive testing and certification).
As has been pointed out, hard disks hate the vibration from prop aircraft (rotary wing is problematic too). They pretty much don't work at all without vibration counteracting mounts. Tuning those mounts involves a vibration table and quite a bit of effort.
The simpler, cheaper solution is to replace the hard drive with an SSD. You still need to tie everything down well of course.