Mailing List Archive

Pre-recording Script?
Hi

I have a very slow drive and I allow it to spin down. One of those drives
that are best used only for archiving. Normally its fine for recordings,
but sometimes I get failed recording because, I theorize, that I have a
buffer overflow when the drive needs to spin up AND I have multiple
recordings starting at the same time. My recording are coming from an
HDHomerun in h264.

Is there a pre-recording script that can fire, say, 1-minute before a
recording is scheduled? All I want it to do is touch a dummy file in the
recording directory. I only have 1 recording directory so I don't even
need to think about which dir/drive needs to be touched.

Thanks for the help
Re: Pre-recording Script? [ In reply to ]
On 01/10/2018 01:04 PM, Jon Boehm wrote:
> Hi
>
> I have a very slow drive and I allow it to spin down.  One of those
> drives that are best used only for archiving.  Normally its fine for
> recordings, but sometimes I get failed recording because, I theorize,
> that I have a buffer overflow when the drive needs to spin up AND I
> have multiple recordings starting at the same time.  My recording are
> coming from an HDHomerun in h264.
>
> Is there a pre-recording script that can fire, say, 1-minute before a
> recording is scheduled?  All I want it to do is touch a dummy file in
> the recording directory.  I only have 1 recording directory so I don't
> even need to think about which dir/drive needs to be touched.
>
> Thanks for the help
There is a "Recording pending" event that you can intercept.  IIRC, the
event script is triggered 2-3 times every 30 seconds about 90 seconds
before a recording starts.  I use it to wake-up the STB if it isn't
already recording.  Using that for a 'touch' script should satisfy your
need.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Pre-recording Script? [ In reply to ]
On Wed, 10 Jan 2018 11:04:11 -0800, you wrote:

>Hi
>
>I have a very slow drive and I allow it to spin down. One of those drives
>that are best used only for archiving. Normally its fine for recordings,
>but sometimes I get failed recording because, I theorize, that I have a
>buffer overflow when the drive needs to spin up AND I have multiple
>recordings starting at the same time. My recording are coming from an
>HDHomerun in h264.
>
>Is there a pre-recording script that can fire, say, 1-minute before a
>recording is scheduled? All I want it to do is touch a dummy file in the
>recording directory. I only have 1 recording directory so I don't even
>need to think about which dir/drive needs to be touched.
>
>Thanks for the help

Exactly what sort of drive is it? If it is shingled drive, like the
Seagate ST8000AS0002 8 Tbyte archive drives I use for my archiving,
then spin up is not the only problem. Shingled drives have to stop
writing every so often in order to re-write tracks that get
overwritten. So they stop accepting write commands from the system
for considerable periods of time (many seconds). The time involved is
way longer than the mythbackend and system buffers can cope with, so
such drives can not be used for recording.

How many recordings do you have starting at the same time? When a
recording starts, there is significant disk activity where the heads
have to move back and forth to the system areas of the disk in order
to set up the directory entries and space allocation for the files
being opened. Head movement takes a long time, and too much of it
happening at once will mean that the heads do not get back to the
correct location to write the next block of data for a recording
before the buffers overflow. If the problem is only at startup of
multiple recordings, then you can manually fix that by telling one or
more of the recordings to start early. So if you are starting three
recordings at the same time, you would set up override rules to start
one recording two minutes early,one recording one minute early, and
one recording would be left to start at the normal time.

However, while recording, if you are recording to three files at once,
the heads will be continually moving between the files. There may be
enough time for that most of the time, but when more space needs to be
allocated for one of the files, the heads will then need to move to
the system areas as well and that may cause a buffer overflow and loss
of data in the middle of one or more of the recordings.

As a rule of thumb, with modern hard drives, I would not want to have
more than three recordings happening at once, and I have my system set
up with enough recording drives (7) so that I have no more than two
recordings at once on any one drive.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Pre-recording Script? [ In reply to ]
It's a ST5000DM000. I believe it is a shingled drive. I'm actually
surprised at how often it does just fine. I've got the Recording Pending
touch script enabled now. We will see if that helps. If not I have other
options.

Thanks

On Wed, Jan 10, 2018 at 4:30 PM, Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> On Wed, 10 Jan 2018 11:04:11 -0800, you wrote:
>
> >Hi
> >
> >I have a very slow drive and I allow it to spin down. One of those drives
> >that are best used only for archiving. Normally its fine for recordings,
> >but sometimes I get failed recording because, I theorize, that I have a
> >buffer overflow when the drive needs to spin up AND I have multiple
> >recordings starting at the same time. My recording are coming from an
> >HDHomerun in h264.
> >
> >Is there a pre-recording script that can fire, say, 1-minute before a
> >recording is scheduled? All I want it to do is touch a dummy file in the
> >recording directory. I only have 1 recording directory so I don't even
> >need to think about which dir/drive needs to be touched.
> >
> >Thanks for the help
>
> Exactly what sort of drive is it? If it is shingled drive, like the
> Seagate ST8000AS0002 8 Tbyte archive drives I use for my archiving,
> then spin up is not the only problem. Shingled drives have to stop
> writing every so often in order to re-write tracks that get
> overwritten. So they stop accepting write commands from the system
> for considerable periods of time (many seconds). The time involved is
> way longer than the mythbackend and system buffers can cope with, so
> such drives can not be used for recording.
>
> How many recordings do you have starting at the same time? When a
> recording starts, there is significant disk activity where the heads
> have to move back and forth to the system areas of the disk in order
> to set up the directory entries and space allocation for the files
> being opened. Head movement takes a long time, and too much of it
> happening at once will mean that the heads do not get back to the
> correct location to write the next block of data for a recording
> before the buffers overflow. If the problem is only at startup of
> multiple recordings, then you can manually fix that by telling one or
> more of the recordings to start early. So if you are starting three
> recordings at the same time, you would set up override rules to start
> one recording two minutes early,one recording one minute early, and
> one recording would be left to start at the normal time.
>
> However, while recording, if you are recording to three files at once,
> the heads will be continually moving between the files. There may be
> enough time for that most of the time, but when more space needs to be
> allocated for one of the files, the heads will then need to move to
> the system areas as well and that may cause a buffer overflow and loss
> of data in the middle of one or more of the recordings.
>
> As a rule of thumb, with modern hard drives, I would not want to have
> more than three recordings happening at once, and I have my system set
> up with enough recording drives (7) so that I have no more than two
> recordings at once on any one drive.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
Re: Pre-recording Script? [ In reply to ]
On Wed, 10 Jan 2018 22:57:31 -0800, you wrote:

>It's a ST5000DM000. I believe it is a shingled drive. I'm actually
>surprised at how often it does just fine. I've got the Recording Pending
>touch script enabled now. We will see if that helps. If not I have other
>options.
>
>Thanks

No, that is not a shingled drive, so it should be fine for recordings.

Even without using a Recording Pending script, mythbackend normally
accesses drives some time before the start of the recording, so it
should be woken up by the time it is needed. Even if it does take too
long to spin up, all that should happen is that the recording starts a
few seconds late - it should not cause failed recordings.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Pre-recording Script? [ In reply to ]
How did you identify it as not shingled? It is according to this review.

http://www.legitreviews.com/seagate-barracuda-st5000dm000-5tb-desktop-hard-drive-review_161241


On Thu, Jan 11, 2018 at 4:54 AM, Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> On Wed, 10 Jan 2018 22:57:31 -0800, you wrote:
>
> >It's a ST5000DM000. I believe it is a shingled drive. I'm actually
> >surprised at how often it does just fine. I've got the Recording Pending
> >touch script enabled now. We will see if that helps. If not I have other
> >options.
> >
> >Thanks
>
> No, that is not a shingled drive, so it should be fine for recordings.
>
> Even without using a Recording Pending script, mythbackend normally
> accesses drives some time before the start of the recording, so it
> should be woken up by the time it is needed. Even if it does take too
> long to spin up, all that should happen is that the recording starts a
> few seconds late - it should not cause failed recordings.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
Re: Pre-recording Script? [ In reply to ]
On Thu, 11 Jan 2018 10:20:41 -0800, you wrote:

>How did you identify it as not shingled? It is according to this review.
>
>http://www.legitreviews.com/seagate-barracuda-st5000dm000-5tb-desktop-hard-drive-review_161241

The datasheet PDF file I downloaded from Seagate does not contain the
words "shingled" or "SMR":

https://www.seagate.com/www-content/product-content/desktop-hdd-fam/en-us/docs/100743772a.pdf
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Pre-recording Script? [ In reply to ]
Jon Boehm <jon.s.boehm@gmail.com> wrote:

> How did you identify it as not shingled? It is according to this review.
>
> http://www.legitreviews.com/seagate-barracuda-st5000dm000-5tb-desktop-hard-drive-review_161241

Since the reviewer doesn't even know what an OEM drive is (in this context), take everything else with a pinch of salt.

FYI, in case you didn't know, Seagate (and others) sell drives in different forms.

Retail. Packed for selling to an end user, with a warranty from the manufacturer.
Built in. Eg built into a case as an external drive or NAS.
OEM. These are sold in bulk to OEMs (eg HP, Dell, ...) to build into their equipment (ie PCs) and part of the deal is that the PC manufacturer provides the end user warranty.

To suggest that because these are "OEM packed" means they have been taken out of something shows a distinct level of ignorance !


And from memory, the first shingled drive Seagate did was 8TB - I don't think anyone had done a shingled drive smaller than that.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org