TVHeadend intermittently fails to record: error "file missing"
Added by Martin Underwood about 6 years ago
I'm using TVH 4.2.6 on a Raspberry Pi 3B+ running Raspbian Stretch. Rather than write to the SD card, I write to a pen drive (I'm planning to write to a USB hard drive when I get a powered USB hub).
I found that auto-mounting /dev/sda1 as /mnt/rec was unreliable because sometimes the pen drive would show up as /dev/sdb1, c1 or whatever. So instead I mount by UUID (determined by the blkid command) and have added a line "UUID=1CAB-16D4 /mnt/rec exfat defaults,errors=remount-ro 0 1" to /etc/fstab.
I then set TVH's Configuration | Recording | Recording system path: to /mnt/rec
This works perfectly, surviving any number of reboots, until one day a recording fails with "file missing". From the terminal app, /mnt/rec is still visible and still has the contents that I would expect (existing recordings). I've also Samba-shared /mnt/rec by adding the relevant lines to /etc/samba/smb.conf and restarting Samba. When the recording fails, I can still access the folder remotely by Samba (eg from a Windows PC). That makes me wonder whether the fact that the folder /mnt/rec is an external auto-mounted device may be a red herring.
For the time being I've modified Recording system path: to /home/pi/Videos and Samba-shared that instead, so I'll see if it works any better writing to an ext4 / partition on the SD card.
Anyone got any suggestions as to how I can troubleshoot the problem with using an auto-mounted pen drive as the recording location? Is it likely that there are intermittent problems with the pen drive because it is connected to the Pi rather than a powered hub? I've confirmed that the voltage on the Pi's supply pins is about 5.1 V even with pen drive and two DVB-T decoders plugged in, so it's probably not an under-voltage problem.
Replies (1)
RE: TVHeadend intermittently fails to record: error "file missing" - Added by Joe User about 6 years ago
The "file missing" error may be a result of multiple things, some of them completely unrelated to the filesystem.
see: [[https://tvheadend.org/boards/5/topics/31138]]
Unfortunately that may make it even harder to diagnose. You need to log to a file and if the normal log doesn't give you any hints, you may have to use debug or even trace. Of course for an intermittent problem, log files may become quite large (especially trace)