I'm using Ubuntu 16.10 on my home server. I have a 4TB drive that I use to put my movies on. I had just got done ripping a Blueray. I then SCP'ed it to my server and SSH'ed to my server. I then moved into the directory I have my movies and dropped the movie in that directory. I gave it a second and noticed it showed up on my Plex dashboard. Then... I couldn't access it. I then went back to my server and noticed everything on my drive was missing. Everything. The drive was mounted as /plex and had /plex/shows and /plex/movies as well as some other scripts I had like "setPermissions.sh" that would recursively set the permissions needed for the Plex user to delete things because I wanted to ability to delete movies from the Plex apps.
I then tried to unmount the drive. I got an error saying the drive was busy. I did an lsof and plexmediaserver was the only software using the drive. I then stopped the Plex software and tried to unmount... again, can't because the drive is busy. So I force an unmount and it unmounted. I then remounted, nothing is on the drive. I rebooted the server because I couldn't belive everything on the drive was gone. Yeap, it's all gone.
Not a big deal, I've "rm -rf" before... just try to recover the inodes... nope. doesn't work, doesn't find any inodes deleted... Okay. Well, testdisk... nope. It finds the files on the root of the drive and the folders, but when I go into the folders I get nothing. Testdisk also list large chunks of space that's corrupt and can't be recovered.
I don't know how this happened, I don't even know if it was the Plex software even though the plex software is the only software that uses that drive. I also don't know how the Plex software could have corrupted the disk, it's not running as root; nevertheless, I don't know what could have caused this.