I hope this is an ok place to ask this out of all the stack overflow communities there are.
Anyway I have a raspberry pi 2 in my house that I keep around to backup some files and host media files between myself and my roommates. It worked without issue for a long time other than maybe a system lockup or two in which ssh didn't respond or connect for whatever reason. A simple restart fixed that.
I had an external hard drive mounted to the pi and used ajenti and samba to make it visible to windows machines in the house. Worked great for roughly 9 to 10 months.
About 4 weeks ago it started doing an odd thing in which it unmounted the external drive.
It didn't just unmount it thought it mounted a different file location in its place.
The drive/device is at
/dev/sda1 and it has a mount point of
/media. However sometimes a different random location with a single folder that contains an album that I guess accidentally got transferred to the location when the /media drive unmounted itself.
sudo mount -t ntfs /dev/sda1 /media immediately fixes the issues and mounts the correct drive. This won't occur for another day or two before it mounts to this other location again.
I've checked that the drive doesn't have any weird partitions that got created some how, NTFS is correctly installed, ajenti under file systems list the correct device and mount point for the drive so it isn't like it is making some weird mount override that I can see. Also there are now cron jobs that could be doing something weird as far as I can tell either.
I pulled the drive and plugged it into my PC to check its health. Everything came back good so it wouldn't appear to be a drive error.
Can anyone potentially shed some light as to why this issue is happening and how to fix it?