My server is running Ubuntu Server and I have PMS in a KVM/QEMU virtual machine also running Ubuntu Server. On the host, all my media is in /storage, which is a mergerfs mount that combines several drives. /storage is then shared with the VM via 9p/virtio, and also mounted at /storage in the guest. Plex can see all my media, but can not create optimized versions. It throws the error "Converted files cannot be written to the disk". In my logs I can see:
Jul 07, 2016 12:06:59.321 [0x7fb0f8bff700] DEBUG - TranscodeJobManager: [Running] processJob (transcode) 7a27f02e-0140-4796-8c2c-317d78d8f37b
Jul 07, 2016 12:06:59.321 [0x7fb0f07ff700] DEBUG - TranscodeJobManager: processing job 7a27f02e-0140-4796-8c2c-317d78d8f37b
Jul 07, 2016 12:06:59.323 [0x7fb0f8bff700] ERROR - Error creating directory /storage/TV/Plex Versions/Optimized for Mobile/Game of Thrones/.inProgress: boost::filesystem::create_directory: Permission denied: "/storage/TV/Plex Versions/Optimized for Mobile/Game of Thrones/.inProgress"
Jul 07, 2016 12:06:59.325 [0x7fb0f07ff700] ERROR - Error creating directory /storage/TV/Plex Versions/Optimized for Mobile/Game of Thrones/.inProgress: boost::filesystem::create_directory: Permission denied: "/storage/TV/Plex Versions/Optimized for Mobile/Game of Thrones/.inProgress"
Jul 07, 2016 12:06:59.325 [0x7fb0f07ff700] ERROR - TranscodeJobManager: unable to create output directory
Jul 07, 2016 12:06:59.346 [0x7fb0f8bff700] ERROR - Error creating directory /storage/TV/Plex Versions/Optimized for Mobile/Game of Thrones/inProgress: boost::filesystem::create_directory: Permission denied: "/storage/TV/Plex Versions/Optimized for Mobile/Game of Thrones/inProgress"
Jul 07, 2016 12:06:59.346 [0x7fb0f8bff700] ERROR - Versions: unable to create temp directory '/storage/TV/Plex Versions/Optimized for Mobile/Game of Thrones/.inProgress' for transcode. It will likely fail
So the weird thing is that everything in /storage is chmodded 777, I have tried chowning the TV directory and all subdirectories as plex:plex, I have tried adding plex to various other groups that my main ID has (hey it's just a VM and I'm not too worried about security). Plex can create the "Plex Versions" directories, but it can't seem to create any files in them. I have tried switching to the plex user with sudo su plex, and as the plex user I can create and delete directories and files in /storage and its subfolders just fine. I'm at a loss why Plex can't create optimized version files.
I also have another VM running CrashPlan for backups, with the exact same 9p/virtio passthrough folder (in fact one VM is a clone of the other), and CrashPlan seems to have no issues creating backup files in /storage or its subdirectories.
The only clue I seem to have is that if I try creating a file by using "touch test" (as any user, including the plex user and my admin account), it creates the file but gives the error "touch: setting times of 'test': Permission denied". And the only reason I can figure why this might be is because the storage pool (and its constituent drives) is mounted with the "noatime" option.
Any help you kind folks can give would be greatly appreciated.