Harddisk Spindown does not work anymore with Tvheadend
Added by Manfred Roth almost 11 years ago
I've installed Tvheadend on my Ubuntu Server with a TBS6618 DVB-C PCIe card.
I've 3 drives in my server:
- 1x SSD (System drive, personal Data)
- 2x WD Red 2TB Hard Drives (Backup Data, Videos)
The directory where Tvheadend is configured to write data is on HD1, HD2 is mounted on a completely different directory.
I've configured the hard drives to spin down after a certain time in my /etc/hdparm.conf:
/dev/disk/by-uuid/bc7db5c7-730c-4044-a812-aa9f9557caef {
spindown_time = 242
}
/dev/disk/by-uuid/2ef82df2-b429-4af9-bf9a-fbfd9457acfa {
spindown_time = 241
}
That worked well for months.
Now as I've installed and running Tvheadend, both harddrives do not spindown anymore, even if I make a spindown "manually" with
sudo hdparm -y /dev/disk/by-uuid/bc7db5c7-730c-4044-a812-aa9f9557caef sudo hdparm -y /dev/disk/by-uuid/2ef82df2-b429-4af9-bf9a-fbfd9457acfa
on the command line, they are both up and running a certain time later.
Where to I have to tune here in Tvheadend in order to prevent running the hd's permanently?
Thanks.
Replies (3)
RE: Harddisk Spindown does not work anymore with Tvheadend - Added by Adam Sutton almost 11 years ago
Most likely TVH is updating files, regularly, in it's configuration directory and causing the disks not to be able to spindown.
You can try and look at what is being written to and we can see if there are ways to avoid that writing.
However on a more general point, I have a similar setup:
128G SSD, rootfs + /home (and some other stuff)
1 * 1TB PVR drive (non-critical data, recorded from DVB, not yet cut for storage)
3 * 3TB RAID5 array (Videos, Music, etc...)
All my "live" data, including TVH's configuration (by virtue of being in /home) is on the SSD. I don't much care that this is always active it ensures quick access to all relevant stuff anyway. It's backed up (rsync) to the RAID overnight. The PVR drive is simply to avoid the need to spin up the entire RAID array during recording, most of that data is non-critical and loss of it would not upset me too much so I don't care about ZERO redundancy. The RAID disks are there for the main Media storage of course, with some level of redundancy.
So if you've got an SSD I'd stick the TVH configuration on there, to avoid the problems. If that STILL doesn't help, try putting the DVR directory on the SSD (temporarily) to see what happens.
Adam
RE: Harddisk Spindown does not work anymore with Tvheadend - Added by Adam Sutton almost 11 years ago
P.S.
Should have said, all my disks including the PVR one are configured to spin down and I know this works as every time I try to access the files and I period of inactivity there is a clear delay while the disk spins up (I can't physically hear it, its out of the way).
RE: Harddisk Spindown does not work anymore with Tvheadend - Added by Manfred Roth almost 11 years ago
OK, I've found the configuration data in
/home/hts/.hts/tvheadend
therefore it is already on the SSD.
So, I've changed the recording and timeshift directory to
/home/<my_account>/<recording>
and
/home/<my_account>/<timeshift>
therefore also on the SSD now.
I made a manual spindown on my server harddisks, programmed a tv recording timer and gone to work.
When I returned home, the recording has been finished successfully, but the harddisks have been idle/active (means they are still running) - some hours after the recording was finished, even if the spindown time is only 1h after idle.
Tvheadend itself in idle mode does not affect this behavior, but if a recording is started/done the harddisks start running and do not stop anymore, even if no file/directory mounted to the harddisks is obviouly related to Tvheadend.
I do not have any idea, what the reason can be. Something went wrong with the installation maybe?