Automatic unmount of the drive storing recordings
Added by Christian . over 5 years ago
I'm running Tvheadend 4.2.8-23 (installed from the PPA ppa:mamarley/tvheadend-git-stable
) on an Ubuntu server 18.04 LTS. The recording system path points to a directory on a separate drive that is automounted by systemd using the options x-systemd.automount,x-systemd.idle-timeout=300
The directory is properly mounted when Tvheadend starts, but it is never unmounted. When I unmount it manually, I find one of the following messages a few seconds later in the system journal:
Got automount request for /mnt/tv, triggered by 14781 (tvheadend)or
Got automount request for /mnt/tv, triggered by 14781 (tvh:tasklet)
I'd like to unmount the drive when it is not in use so that it can spin down and save energy. Can please someone tell me if this possible?
Replies (6)
RE: Automatic unmount of the drive storing recordings - Added by saen acro over 5 years ago
force power management to save power.
https://lists.debian.org/debian-user/2015/08/msg00125.html
RE: Automatic unmount of the drive storing recordings - Added by Christian . over 5 years ago
Thanks for your answer. I didn't consider sending the drive to standby even when it's mounted. The drive was configured to stay awake all the time. I configured it via hdparm properly, and it now seems to spin down as desired. Thanks!
RE: Automatic unmount of the drive storing recordings - Added by stefan 327 almost 5 years ago
Hello,
I have the same problem as Christian, but the environment is different.
I have Tvheadend 4.3-1854 on a raspberry Pi3b+ that runs with raspbian buster, and the storage harddisk is in a NAS (at the moment whs2011).
I had a working solution with autofs for my mpd service, the harddisk spinned down when the mpd playlist was empty.
since i installed tvheadend (and made the nas storage work, what was a bit difficult), it doesn't spin down anymore.
output of "mount": ... type cifs rw,relatime,vers=default,sec=ntlmv2,cache=strict,username=hts,uid=136,forceuid,gid=136,forcegid,addr= ... ,file_mode=0777,dir_mode=0777,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)
Is it a problem of automount, or does tvheadend keep writing/reading to/from the storage so that it can't be unmounted?
Stefan
RE: Automatic unmount of the drive storing recordings - Added by Joe User almost 5 years ago
Tvheadend checks disk space every 15sec, which may be causing the problem.
RE: Automatic unmount of the drive storing recordings - Added by stefan 327 almost 5 years ago
Tvheadend checks disk space every 15sec, which may be causing the problem.
Is there a possibility to alter that behaviour?
or any other trick that makes the nas sleep again?
Thank you,
Stefan
RE: Automatic unmount of the drive storing recordings - Added by stefan 327 almost 5 years ago
Or is that not possible by design?