Mailing List Archive

Can't get storage priorities correctly.
I have two storage directories of vastly different sizes (1 TB SSD and
10+TB spinning RAID1).  I had them both in default group and balancing
algorithm as "combined" with default setting. I thought that myth is
smart and will figure out and favor SSD over spinning disk when
possible. That did not work. So, I changed the algorithm to "Balanced
free percent" and was hoping it will keep about the same % of free space
in both disks. I noticed today that SSD has about 13% (96G)  use (87%
(660G) free) and spinning disks have about 94% (12T) use (6% (770G)
free).  This means next recording should go to SSD. However, it is now
writing to my spinning disks. What did I do wrong?

Distribution: Debian bookworm (Linux 6.1.10)
Myth: 31+fixes from debian-multimedia
(31.0+fixes20201214.gite9b795a1e4-dmo0~bpo10+1 as per apt)

I only changed the storage priorities yesterday and the new recording is
the first one after that. Do I need to wait or reboot after changing
storage balancing algorithm before it takes effect?

Regards
Ramesh
Re: Can't get storage priorities correctly. [ In reply to ]
On 11/17/23 10:59, Ram Ramesh wrote:
> I have two storage directories of vastly different sizes (1 TB SSD and
> 10+TB spinning RAID1).  I had them both in default group and balancing
> algorithm as "combined" with default setting. I thought that myth is
> smart and will figure out and favor SSD over spinning disk when
> possible. That did not work. So, I changed the algorithm to "Balanced
> free percent" and was hoping it will keep about the same % of free
> space in both disks. I noticed today that SSD has about 13% (96G)  use
> (87% (660G) free) and spinning disks have about 94% (12T) use (6%
> (770G) free).  This means next recording should go to SSD. However, it
> is now writing to my spinning disks. What did I do wrong?
>
> Distribution: Debian bookworm (Linux 6.1.10)
> Myth: 31+fixes from debian-multimedia
> (31.0+fixes20201214.gite9b795a1e4-dmo0~bpo10+1 as per apt)
>
> I only changed the storage priorities yesterday and the new recording
> is the first one after that. Do I need to wait or reboot after
> changing storage balancing algorithm before it takes effect?
>
> Regards
> Ramesh
>
Found the problem. I had not started mythtv-setup with sufficient
privilege to  kill the running backend. So, even though it reported that
it stopped backend, it did not. Thus my update did not make it to
backend at all. Once I restarted backend manually, it seem to work as
expected.

I wish backend-setup caught this error and failed instead of making me
believe that everything is fine. Anyway, I am running an older version,
and may be it is fixed already.

Regards
Ramesh
Re: Can't get storage priorities correctly. [ In reply to ]
On Fri, 17 Nov 2023 17:35:49 -0600, you wrote:

>On 11/17/23 10:59, Ram Ramesh wrote:
>> I have two storage directories of vastly different sizes (1 TB SSD and
>> 10+TB spinning RAID1).? I had them both in default group and balancing
>> algorithm as "combined" with default setting. I thought that myth is
>> smart and will figure out and favor SSD over spinning disk when
>> possible. That did not work. So, I changed the algorithm to "Balanced
>> free percent" and was hoping it will keep about the same % of free
>> space in both disks. I noticed today that SSD has about 13% (96G)? use
>> (87% (660G) free) and spinning disks have about 94% (12T) use (6%
>> (770G) free).? This means next recording should go to SSD. However, it
>> is now writing to my spinning disks. What did I do wrong?
>>
>> Distribution: Debian bookworm (Linux 6.1.10)
>> Myth: 31+fixes from debian-multimedia
>> (31.0+fixes20201214.gite9b795a1e4-dmo0~bpo10+1 as per apt)
>>
>> I only changed the storage priorities yesterday and the new recording
>> is the first one after that. Do I need to wait or reboot after
>> changing storage balancing algorithm before it takes effect?
>>
>> Regards
>> Ramesh
>>
>Found the problem. I had not started mythtv-setup with sufficient
>privilege to? kill the running backend. So, even though it reported that
>it stopped backend, it did not. Thus my update did not make it to
>backend at all. Once I restarted backend manually, it seem to work as
>expected.
>
>I wish backend-setup caught this error and failed instead of making me
>believe that everything is fine. Anyway, I am running an older version,
>and may be it is fixed already.
>
>Regards
>Ramesh

Have you done the calculations for the extra usage that MythTV will be
doing for the SSD? When I looked at using an M.2 SSD for recording,
the calculations showed that it would be worn out pretty rapidly, due
to the recording files being large. The lifetime of an SSD is
normally in TBytes written - writing multiple multi-Gbyte files per
day is a good way to wear one out.

Do you have a particular reason for wanting the recordings done on the
SSD? Or is it just that you need to record more things at the same
time than can be done with one hard drive?

You also need to look at the SSD's characteristics. A lot of SSDs
have cache, and when the writes exceed the cache size, they slow down
a lot, until the cache can be written to the actual flash storage in
the SSD. With the large file sizes for recordings, the cache size can
easily be filled, particularly if you are recording more than one
programme at once to the SSD.

So if you are just needing to make more recordings at the same time, I
would recommend investing in another hard drive, rather than using
your SSD. Or do the lifetime calculations and make sure to get a new
SSD as soon as the old one is getting low on lifetime - that may be
every year or two.

And make sure you install smartmontools and use the smartctl command
to see what the lifetime writes are and what the SSD is reporting as
its remaining lifetime or % used or whichever way it reports that. I
have smartctl set up to monitor all my drives (SSD and spinning rust)
and report any problems via email and popup messages. This has saved
me many times when a drive has started to die.
_______________________________________________
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: Can't get storage priorities correctly. [ In reply to ]
On 11/17/23 21:23, Stephen Worthington wrote:
> On Fri, 17 Nov 2023 17:35:49 -0600, you wrote:
>
>> On 11/17/23 10:59, Ram Ramesh wrote:
>>> I have two storage directories of vastly different sizes (1 TB SSD and
>>> 10+TB spinning RAID1).  I had them both in default group and balancing
>>> algorithm as "combined" with default setting. I thought that myth is
>>> smart and will figure out and favor SSD over spinning disk when
>>> possible. That did not work. So, I changed the algorithm to "Balanced
>>> free percent" and was hoping it will keep about the same % of free
>>> space in both disks. I noticed today that SSD has about 13% (96G)  use
>>> (87% (660G) free) and spinning disks have about 94% (12T) use (6%
>>> (770G) free).  This means next recording should go to SSD. However, it
>>> is now writing to my spinning disks. What did I do wrong?
>>>
>>> Distribution: Debian bookworm (Linux 6.1.10)
>>> Myth: 31+fixes from debian-multimedia
>>> (31.0+fixes20201214.gite9b795a1e4-dmo0~bpo10+1 as per apt)
>>>
>>> I only changed the storage priorities yesterday and the new recording
>>> is the first one after that. Do I need to wait or reboot after
>>> changing storage balancing algorithm before it takes effect?
>>>
>>> Regards
>>> Ramesh
>>>
>> Found the problem. I had not started mythtv-setup with sufficient
>> privilege to  kill the running backend. So, even though it reported that
>> it stopped backend, it did not. Thus my update did not make it to
>> backend at all. Once I restarted backend manually, it seem to work as
>> expected.
>>
>> I wish backend-setup caught this error and failed instead of making me
>> believe that everything is fine. Anyway, I am running an older version,
>> and may be it is fixed already.
>>
>> Regards
>> Ramesh
> Have you done the calculations for the extra usage that MythTV will be
> doing for the SSD? When I looked at using an M.2 SSD for recording,
> the calculations showed that it would be worn out pretty rapidly, due
> to the recording files being large. The lifetime of an SSD is
> normally in TBytes written - writing multiple multi-Gbyte files per
> day is a good way to wear one out.
>
> Do you have a particular reason for wanting the recordings done on the
> SSD? Or is it just that you need to record more things at the same
> time than can be done with one hard drive?
>
> You also need to look at the SSD's characteristics. A lot of SSDs
> have cache, and when the writes exceed the cache size, they slow down
> a lot, until the cache can be written to the actual flash storage in
> the SSD. With the large file sizes for recordings, the cache size can
> easily be filled, particularly if you are recording more than one
> programme at once to the SSD.
>
> So if you are just needing to make more recordings at the same time, I
> would recommend investing in another hard drive, rather than using
> your SSD. Or do the lifetime calculations and make sure to get a new
> SSD as soon as the old one is getting low on lifetime - that may be
> every year or two.
>
> And make sure you install smartmontools and use the smartctl command
> to see what the lifetime writes are and what the SSD is reporting as
> its remaining lifetime or % used or whichever way it reports that. I
> have smartctl set up to monitor all my drives (SSD and spinning rust)
> and report any problems via email and popup messages. This has saved
> me many times when a drive has started to die.
> _______________________________________________
> 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
Thanks for your concern. I thought a  lot before choosing this path.

Yes, I did my calculations. My SSDs have 600TBW and at 30GB per day, I
am looking at 54 years of life (600*1000/30/365 ~ 54). I also have
smartd doing its thing. It will report when SSDs start using their spare
blocks.  At about $60/TB (for 54 years of claimed life), I feel it is a
fair game.

So far, in my mythtv usage (10+ years), I have had 10+ spinning disks
die. I have still my very first SSD (256G SATA) and several others  as I
have no use for them with newer/larger  SSDs replacing the old ones. 
So, I am looking to try them out to see if TBW values really happen.

Suppose I am wrong and my SSDs show wear, it is a single mythtv-setup
change that will get back to trashing spinning disks.

When I record and watch at the same time, the amount of seek is very
noticeable (especially with RAIDs) and I prefer the random access
capabilities of SSDs.

Regards
Ramesh
Re: Can't get storage priorities correctly. [ In reply to ]
>
>
> And make sure you install smartmontools and use the smartctl command
> to see what the lifetime writes are and what the SSD is reporting as
> its remaining lifetime or % used or whichever way it reports that. I
> have smartctl set up to monitor all my drives (SSD and spinning rust)
> and report any problems via email and popup messages. This has saved
> me many times when a drive has started to die.
> _______________________________________________
>
>
Hi Stephen,

I know that in the past you've shared some of your useful scripts and
wondered if you had anything to share which would help with automating the
smartctl reporting.

I've been running it manually every few weeks (except when I forget) and
I've caught a couple of failing drives with it - and missed one.

The bit I'm most unsure of is how to automatically interpret the results
and convert them to a warning, particularly as some of my drives report
some strange numbers in some of the checks, which I think can probably be
ignored.

I generally just go by whether the short test completes successfully but I
think I should be checking whether some of the failure counts are going up?

Thanks
Re: Can't get storage priorities correctly. [ In reply to ]
On Fri, 17 Nov 2023 22:06:02 -0600, you wrote:

>Thanks for your concern. I thought a? lot before choosing this path.
>
>Yes, I did my calculations. My SSDs have 600TBW and at 30GB per day, I
>am looking at 54 years of life (600*1000/30/365 ~ 54). I also have
>smartd doing its thing. It will report when SSDs start using their spare
>blocks.? At about $60/TB (for 54 years of claimed life), I feel it is a
>fair game.

That certainly sounds good. But do check the smartctl -a output - my
new 1 Tbyte SSD in my main MythTV box is only 214 days old, and is
currently showing 16.1 TBytes written without me doing any recording
to it (75 Gbytes per day). It says it is 1% used, so it is still
going to last a long time, even at that rate.

>So far, in my mythtv usage (10+ years), I have had 10+ spinning disks
>die. I have still my very first SSD (256G SATA) and several others? as I
>have no use for them with newer/larger? SSDs replacing the old ones.?
>So, I am looking to try them out to see if TBW values really happen.

Over the last 10 years I think I will have had 10+ hard drives die
also, but only 2 of them prematurely. The others had been running for
a long time, over their expected lifetime. I now am buying enterprise
class drives (20+ Tbytes) with 5 year warranties, but they have not
been around for more than 5 years yet. I do have two ancient
enterprise class 3 Tbyte HGST drives that I swapped out because they
were too small after 9-10 years 24/7. I put one of them into my
mother's MythTV box running 24/7 again a couple of months later. It
is currently showing 105553 power on hours (12 years) and is showing
no problems at all. They were not cheap when I bought them, but they
do show that enterprise class drives can last a very long time.

>Suppose I am wrong and my SSDs show wear, it is a single mythtv-setup
>change that will get back to trashing spinning disks.

Yes, very easy to do. I really like how storage groups work.

>When I record and watch at the same time, the amount of seek is very
>noticeable (especially with RAIDs) and I prefer the random access
>capabilities of SSDs.

With my enterprise class drives, I can have them recording 2
programmes at once and playing back at the same time with no problems.
From the specifications, I would think three recordings at once would
be fine too, but I never get to that as I have 7 recording drives. I
can certainly hear them seeking, but it does not sound over the top at
all. But I can also do 2 recordings plus playback from my old (very
quiet) WD Green 4 Tbyte drives, which have much lower specifications.
They are currently showing 81029 and 77591 power on hours (9.2 and 8.9
years). So even cheap drives can last well if you get lucky and they
were over designed.

I am wondering if RAID 1 is the problem somehow. If the data was
being written to the first drive and then read back again to be copied
to the second drive, that might cause what you are getting. But that
would be a really bad way of doing RAID 1 when you can just write to
both drives at once from the same buffers.

>Regards
>Ramesh
_______________________________________________
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: Can't get storage priorities correctly. [ In reply to ]
On Sat, 18 Nov 2023 10:15:34 +0000, you wrote:

>Hi Stephen,
>
>I know that in the past you've shared some of your useful scripts and
>wondered if you had anything to share which would help with automating the
>smartctl reporting.
>
>I've been running it manually every few weeks (except when I forget) and
>I've caught a couple of failing drives with it - and missed one.
>
>The bit I'm most unsure of is how to automatically interpret the results
>and convert them to a warning, particularly as some of my drives report
>some strange numbers in some of the checks, which I think can probably be
>ignored.
>
>I generally just go by whether the short test completes successfully but I
>think I should be checking whether some of the failure counts are going up?
>
>Thanks

SmartMonTools already includes code to check for problems with the
drive - so all you need to do is install and configure it correctly.
Then smartd will run in the background all the time and notify you of
anything you need to know about. Look at the /etc/smartd.conf file
and adjust it so that it emails you on any error. I had to also
customise it to tell it the type of some drives (such as the fact that
my archive drives are "removable" (they are normally turned off and
are only on when I want to watch a recording on one of them). So I
commented out the default DEVICESCAN line, and replace it with this:

#DEVICESCAN -d removable -n standby -m root -M exec
/usr/share/smartmontools/smartd-runner
DEFAULT -a -n standby -m root -M exec
/usr/share/smartmontools/smartd-runner
/dev/nvme0n1 -d nvme
/dev/disk/by-label/arc1 -d sat,16 -d removable
/dev/disk/by-label/arc2 -d sat,16 -d removable
/dev/disk/by-label/arc3 -d sat,16 -d removable
/dev/disk/by-label/arc4 -d sat,16 -d removable
/dev/disk/by-label/arc5 -d sat,16 -d removable
/dev/disk/by-label/arc6 -d sat,16 -d removable
DEVICESCAN -a -d auto -d removable -n standby
#DEVICESCAN -a -m stephen@jsw.gen.nz -M test
DEVICESCAN -a -m stephen@jsw.gen.nz -M daily

(My email client wrapped the first #DEVICESCAN line and the DEFAULT
line under it - they are each one line only)

It was a long time ago that I did this, so I can not remember the full
details of each option, but the /dev lines just describe drives that
smartd was not looking at automatically, or was using the wrong
options for. You do not need them unless there are problems with the
default settings. The DEFAULT and DEVICESCAN lines tell smartd what
to do. The "-a" on a DEVICESCAN line tells it to scan all the drives
it can find. See "man smartd.conf" for full details. I have it set
up to run the smartd-runner program, which then pops up an XFCE4
on-screen message and also emails me on the root account on that
machine and also on my main email and my gmail accounts. The idea is
that I should see one of those messages as soon as possible so I can
do something about a potential failing drive. To make all that work,
I think you need to install the smart-notifier package, and also a
mail program to send emails with, from either the bsd-mailx package or
mailutils package. The mail program needs to be configured to be able
to send emails via your normal SMTP server. I do not know how to
configure it to send via gmail, as I run my own SMTP server which can
send to gmail for me and I just send any emails to it to handle. You
could just try configuring smartd to send to your @gmail.com address
and mail might be smart enough to do it automatically. I have MX
records defined in my DNS for my jsw.gen.nz domain, and it finds them
and sends to my main stephen@jsw.gen.nz account without any further
configuration. I have mailutils installed - I think that is all that
is needed to make the local email accounts work on a Linux system, so
that emails to addresses like root@localhost will work and can be
accessed by running "mail" from the root account, or from any other
account for the messages for that account.

To get smartd to run, you need to edit /etc/default/smartmontools and
set "start_smartd=yes", then run:

sudo systemctl enable --now smartmontools

The commented out -M test line is used for testing if email addresses
work. Comment out your -M daily line and uncomment your -M test line
and then run smartd (or restart it with "sudo systemctl restart
smartmontools") and it will send a test email. Once you get that
working, put the right options into the -M daily line, uncomment that
and comment the -M test line and restart smartmontools.

If you do install mailutils, you will probably get another daily email
from the automatic database checking that gets done from
/etc/cron.daily/optimize_mythdb. Without local email accounts
working, those emails from anacron never get sent anywhere.

These days, now that I have the Home Assistant app running on my
phone, I could get Home Assistant to send a notification to my phone.
And with the Tasker app I can get an audible alarm on any HA
notification. I have that all set up for my mother's emergency alarm
button, but have not done it for SMART errors yet.
_______________________________________________
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: Can't get storage priorities correctly. [ In reply to ]
> On Nov 18, 2023, at 18:17, Stephen Worthington <stephen_agent@jsw.gen.nz> wrote:
>
> On Fri, 17 Nov 2023 22:06:02 -0600, you wrote:
>
>> Thanks for your concern. I thought a lot before choosing this path.
>>
>> Yes, I did my calculations. My SSDs have 600TBW and at 30GB per day, I
>> am looking at 54 years of life (600*1000/30/365 ~ 54). I also have
>> smartd doing its thing. It will report when SSDs start using their spare
>> blocks. At about $60/TB (for 54 years of claimed life), I feel it is a
>> fair game.
>
> That certainly sounds good. But do check the smartctl -a output - my
> new 1 Tbyte SSD in my main MythTV box is only 214 days old, and is
> currently showing 16.1 TBytes written without me doing any recording
> to it (75 Gbytes per day). It says it is 1% used, so it is still
> going to last a long time, even at that rate.
>
>> So far, in my mythtv usage (10+ years), I have had 10+ spinning disks
>> die. I have still my very first SSD (256G SATA) and several others as I
>> have no use for them with newer/larger SSDs replacing the old ones.
>> So, I am looking to try them out to see if TBW values really happen.
>
> Over the last 10 years I think I will have had 10+ hard drives die
> also, but only 2 of them prematurely. The others had been running for
> a long time, over their expected lifetime. I now am buying enterprise
> class drives (20+ Tbytes) with 5 year warranties, but they have not
> been around for more than 5 years yet. I do have two ancient
> enterprise class 3 Tbyte HGST drives that I swapped out because they
> were too small after 9-10 years 24/7. I put one of them into my
> mother's MythTV box running 24/7 again a couple of months later. It
> is currently showing 105553 power on hours (12 years) and is showing
> no problems at all. They were not cheap when I bought them, but they
> do show that enterprise class drives can last a very long time.
>
>> Suppose I am wrong and my SSDs show wear, it is a single mythtv-setup
>> change that will get back to trashing spinning disks.
>
> Yes, very easy to do. I really like how storage groups work.
>
>> When I record and watch at the same time, the amount of seek is very
>> noticeable (especially with RAIDs) and I prefer the random access
>> capabilities of SSDs.
>
> With my enterprise class drives, I can have them recording 2
> programmes at once and playing back at the same time with no problems.
> From the specifications, I would think three recordings at once would
> be fine too, but I never get to that as I have 7 recording drives. I
> can certainly hear them seeking, but it does not sound over the top at
> all. But I can also do 2 recordings plus playback from my old (very
> quiet) WD Green 4 Tbyte drives, which have much lower specifications.
> They are currently showing 81029 and 77591 power on hours (9.2 and 8.9
> years). So even cheap drives can last well if you get lucky and they
> were over designed.
>
> I am wondering if RAID 1 is the problem somehow. If the data was
> being written to the first drive and then read back again to be copied
> to the second drive, that might cause what you are getting. But that
> would be a really bad way of doing RAID 1 when you can just write to
> both drives at once from the same buffers.

Just adding $0.02
I bought 4 WD Passport 4T spinning rust, 2 have failed in 3 years my ONLY SSD failure was an early 64G with very low TBW and smartmon showed it getting old.
James
_______________________________________________
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: Can't get storage priorities correctly. [ In reply to ]
On 11/18/23 04:17, Stephen Worthington wrote:
> On Fri, 17 Nov 2023 22:06:02 -0600, you wrote:
>
>> Thanks for your concern. I thought a  lot before choosing this path.
>>
>> Yes, I did my calculations. My SSDs have 600TBW and at 30GB per day, I
>> am looking at 54 years of life (600*1000/30/365 ~ 54). I also have
>> smartd doing its thing. It will report when SSDs start using their spare
>> blocks.  At about $60/TB (for 54 years of claimed life), I feel it is a
>> fair game.
> That certainly sounds good. But do check the smartctl -a output - my
> new 1 Tbyte SSD in my main MythTV box is only 214 days old, and is
> currently showing 16.1 TBytes written without me doing any recording
> to it (75 Gbytes per day). It says it is 1% used, so it is still
> going to last a long time, even at that rate.
>
>> So far, in my mythtv usage (10+ years), I have had 10+ spinning disks
>> die. I have still my very first SSD (256G SATA) and several others  as I
>> have no use for them with newer/larger  SSDs replacing the old ones.
>> So, I am looking to try them out to see if TBW values really happen.
> Over the last 10 years I think I will have had 10+ hard drives die
> also, but only 2 of them prematurely. The others had been running for
> a long time, over their expected lifetime. I now am buying enterprise
> class drives (20+ Tbytes) with 5 year warranties, but they have not
> been around for more than 5 years yet. I do have two ancient
> enterprise class 3 Tbyte HGST drives that I swapped out because they
> were too small after 9-10 years 24/7. I put one of them into my
> mother's MythTV box running 24/7 again a couple of months later. It
> is currently showing 105553 power on hours (12 years) and is showing
> no problems at all. They were not cheap when I bought them, but they
> do show that enterprise class drives can last a very long time.
>
>> Suppose I am wrong and my SSDs show wear, it is a single mythtv-setup
>> change that will get back to trashing spinning disks.
> Yes, very easy to do. I really like how storage groups work.
>
>> When I record and watch at the same time, the amount of seek is very
>> noticeable (especially with RAIDs) and I prefer the random access
>> capabilities of SSDs.
> With my enterprise class drives, I can have them recording 2
> programmes at once and playing back at the same time with no problems.
> From the specifications, I would think three recordings at once would
> be fine too, but I never get to that as I have 7 recording drives. I
> can certainly hear them seeking, but it does not sound over the top at
> all. But I can also do 2 recordings plus playback from my old (very
> quiet) WD Green 4 Tbyte drives, which have much lower specifications.
> They are currently showing 81029 and 77591 power on hours (9.2 and 8.9
> years). So even cheap drives can last well if you get lucky and they
> were over designed.
>
> I am wondering if RAID 1 is the problem somehow. If the data was
> being written to the first drive and then read back again to be copied
> to the second drive, that might cause what you are getting. But that
> would be a really bad way of doing RAID 1 when you can just write to
> both drives at once from the same buffers.
>
>> Regards
>> Ramesh
> _______________________________________________
> 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
What I meant by noticeable is that I can hear the disks and see the
activity lights and disks hunting. No issues with actual myth
performance. I simply think that the seek should be avoided, if
possible. It just annoys me and makes me wonder if the wear-and-tear is
eventually going to get my disks.

Yes, my 2TB HGST (enterprise) is running past its 10th year. BTW, I
bought this refurbished from an unknown vendor on ebay. Clearly they
used to make good enterprise disks. Now everything is really spinning
rust.  I only buy enterprise spinners and that too across brands and
batches so that I really get average life from them. However, I am not
confident on spinners anymore and they are also very big these days
making any operation risky of in process failures. I will learn in the
next 10 years if SSDs are just a different kind of rust or they actually
live long like other electronic circuits. Early experiments on SSDs do
indicate that they could be the latter.

Regards
Ramesh
Re: Can't get storage priorities correctly. [ In reply to ]
On 11/18/23 14:14, Ram Ramesh wrote:
> On 11/18/23 04:17, Stephen Worthington wrote:
>> On Fri, 17 Nov 2023 22:06:02 -0600, you wrote:
>>
>>> Thanks for your concern. I thought a  lot before choosing this path.
>>>
>>> Yes, I did my calculations. My SSDs have 600TBW and at 30GB per day, I
>>> am looking at 54 years of life (600*1000/30/365 ~ 54). I also have
>>> smartd doing its thing. It will report when SSDs start using their spare
>>> blocks.  At about $60/TB (for 54 years of claimed life), I feel it is a
>>> fair game.
>> That certainly sounds good. But do check the smartctl -a output - my
>> new 1 Tbyte SSD in my main MythTV box is only 214 days old, and is
>> currently showing 16.1 TBytes written without me doing any recording
>> to it (75 Gbytes per day). It says it is 1% used, so it is still
>> going to last a long time, even at that rate.
>>
>>> So far, in my mythtv usage (10+ years), I have had 10+ spinning disks
>>> die. I have still my very first SSD (256G SATA) and several others  as I
>>> have no use for them with newer/larger  SSDs replacing the old ones.
>>> So, I am looking to try them out to see if TBW values really happen.
>> Over the last 10 years I think I will have had 10+ hard drives die
>> also, but only 2 of them prematurely. The others had been running for
>> a long time, over their expected lifetime. I now am buying enterprise
>> class drives (20+ Tbytes) with 5 year warranties, but they have not
>> been around for more than 5 years yet. I do have two ancient
>> enterprise class 3 Tbyte HGST drives that I swapped out because they
>> were too small after 9-10 years 24/7. I put one of them into my
>> mother's MythTV box running 24/7 again a couple of months later. It
>> is currently showing 105553 power on hours (12 years) and is showing
>> no problems at all. They were not cheap when I bought them, but they
>> do show that enterprise class drives can last a very long time.
>>
>>> Suppose I am wrong and my SSDs show wear, it is a single mythtv-setup
>>> change that will get back to trashing spinning disks.
>> Yes, very easy to do. I really like how storage groups work.
>>
>>> When I record and watch at the same time, the amount of seek is very
>>> noticeable (especially with RAIDs) and I prefer the random access
>>> capabilities of SSDs.
>> With my enterprise class drives, I can have them recording 2
>> programmes at once and playing back at the same time with no problems.
>> >From the specifications, I would think three recordings at once would
>> be fine too, but I never get to that as I have 7 recording drives. I
>> can certainly hear them seeking, but it does not sound over the top at
>> all. But I can also do 2 recordings plus playback from my old (very
>> quiet) WD Green 4 Tbyte drives, which have much lower specifications.
>> They are currently showing 81029 and 77591 power on hours (9.2 and 8.9
>> years). So even cheap drives can last well if you get lucky and they
>> were over designed.
>>
>> I am wondering if RAID 1 is the problem somehow. If the data was
>> being written to the first drive and then read back again to be copied
>> to the second drive, that might cause what you are getting. But that
>> would be a really bad way of doing RAID 1 when you can just write to
>> both drives at once from the same buffers.
>>
>>> Regards
>>> Ramesh
>> _______________________________________________
>> 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
> What I meant by noticeable is that I can hear the disks and see the
> activity lights and disks hunting. No issues with actual myth
> performance. I simply think that the seek should be avoided, if
> possible. It just annoys me and makes me wonder if the wear-and-tear
> is eventually going to get my disks.
>
> Yes, my 2TB HGST (enterprise) is running past its 10th year. BTW, I
> bought this refurbished from an unknown vendor on ebay. Clearly they
> used to make good enterprise disks. Now everything is really spinning
> rust.  I only buy enterprise spinners and that too across brands and
> batches so that I really get average life from them. However, I am not
> confident on spinners anymore and they are also very big these days
> making any operation risky of in process failures. I will learn in the
> next 10 years if SSDs are just a different kind of rust or they
> actually live long like other electronic circuits. Early experiments
> on SSDs do indicate that they could be the latter.
>
> Regards
> Ramesh

I've got several hard drives with about 9 years on them.  Two (out of 6)
failed, but did so in a way that I was able to move most recordings off
of the failing drive.

Definitely worth the extra money to get an enterprise/nas drive. Mine
have failed gracefully in the last 5 years or so.  The newer larger
(12TB+) drives make me a little nervous, but not enough to implement RAID.

I was a little worried about thrashing hard drives, so I put lots of RAM
(32GB) on the backend/file server.  That way it can run commercial skip
on an active recording without reading from the actual disk as the file
data still exists in the operating system's file buffers.

I also have write caching enabled since the server is on a UPS (highly
recommended).  At one time I would have up 3 simultaneous recordings
using one hard disk with pretty smooth disk usage.

I have the mythtv database on an SSD, and it does not seem to wear much,
according to smartctl only about 6.5TB written and it is almost 2 years old.

It will be interesting to see how SSD technology wears down.  I have
only had a few and none have failed yet.
_______________________________________________
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: Can't get storage priorities correctly. [ In reply to ]
On Sat, 18 Nov 2023 at 12:27, Stephen Worthington <stephen_agent@jsw.gen.nz>
wrote:

> On Sat, 18 Nov 2023 10:15:34 +0000, you wrote:
>
> >Hi Stephen,
> >
> >I know that in the past you've shared some of your useful scripts and
> >wondered if you had anything to share which would help with automating the
> >smartctl reporting.
> >
> >I've been running it manually every few weeks (except when I forget) and
> >I've caught a couple of failing drives with it - and missed one.
> >
> >The bit I'm most unsure of is how to automatically interpret the results
> >and convert them to a warning, particularly as some of my drives report
> >some strange numbers in some of the checks, which I think can probably be
> >ignored.
> >
> >I generally just go by whether the short test completes successfully but I
> >think I should be checking whether some of the failure counts are going
> up?
> >
> >Thanks
>
> SmartMonTools already includes code to check for problems with the
> drive - so all you need to do is install and configure it correctly.
> Then smartd will run in the background all the time and notify you of
> anything you need to know about. Look at the /etc/smartd.conf file
> and adjust it so that it emails you on any error. I had to also
> customise it to tell it the type of some drives (such as the fact that
> my archive drives are "removable" (they are normally turned off and
> are only on when I want to watch a recording on one of them). So I
> commented out the default DEVICESCAN line, and replace it with this:
>
> #DEVICESCAN -d removable -n standby -m root -M exec
> /usr/share/smartmontools/smartd-runner
> DEFAULT -a -n standby -m root -M exec
> /usr/share/smartmontools/smartd-runner
> /dev/nvme0n1 -d nvme
> /dev/disk/by-label/arc1 -d sat,16 -d removable
> /dev/disk/by-label/arc2 -d sat,16 -d removable
> /dev/disk/by-label/arc3 -d sat,16 -d removable
> /dev/disk/by-label/arc4 -d sat,16 -d removable
> /dev/disk/by-label/arc5 -d sat,16 -d removable
> /dev/disk/by-label/arc6 -d sat,16 -d removable
> DEVICESCAN -a -d auto -d removable -n standby
> #DEVICESCAN -a -m stephen@jsw.gen.nz -M test
> DEVICESCAN -a -m stephen@jsw.gen.nz -M daily
>
> (My email client wrapped the first #DEVICESCAN line and the DEFAULT
> line under it - they are each one line only)
>
> It was a long time ago that I did this, so I can not remember the full
> details of each option, but the /dev lines just describe drives that
> smartd was not looking at automatically, or was using the wrong
> options for. You do not need them unless there are problems with the
> default settings. The DEFAULT and DEVICESCAN lines tell smartd what
> to do. The "-a" on a DEVICESCAN line tells it to scan all the drives
> it can find. See "man smartd.conf" for full details. I have it set
> up to run the smartd-runner program, which then pops up an XFCE4
> on-screen message and also emails me on the root account on that
> machine and also on my main email and my gmail accounts. The idea is
> that I should see one of those messages as soon as possible so I can
> do something about a potential failing drive. To make all that work,
> I think you need to install the smart-notifier package, and also a
> mail program to send emails with, from either the bsd-mailx package or
> mailutils package. The mail program needs to be configured to be able
> to send emails via your normal SMTP server. I do not know how to
> configure it to send via gmail, as I run my own SMTP server which can
> send to gmail for me and I just send any emails to it to handle. You
> could just try configuring smartd to send to your @gmail.com address
> and mail might be smart enough to do it automatically. I have MX
> records defined in my DNS for my jsw.gen.nz domain, and it finds them
> and sends to my main stephen@jsw.gen.nz account without any further
> configuration. I have mailutils installed - I think that is all that
> is needed to make the local email accounts work on a Linux system, so
> that emails to addresses like root@localhost will work and can be
> accessed by running "mail" from the root account, or from any other
> account for the messages for that account.
>
> To get smartd to run, you need to edit /etc/default/smartmontools and
> set "start_smartd=yes", then run:
>
> sudo systemctl enable --now smartmontools
>
> The commented out -M test line is used for testing if email addresses
> work. Comment out your -M daily line and uncomment your -M test line
> and then run smartd (or restart it with "sudo systemctl restart
> smartmontools") and it will send a test email. Once you get that
> working, put the right options into the -M daily line, uncomment that
> and comment the -M test line and restart smartmontools.
>
> If you do install mailutils, you will probably get another daily email
> from the automatic database checking that gets done from
> /etc/cron.daily/optimize_mythdb. Without local email accounts
> working, those emails from anacron never get sent anywhere.
>
> These days, now that I have the Home Assistant app running on my
> phone, I could get Home Assistant to send a notification to my phone.
> And with the Tasker app I can get an audible alarm on any HA
> notification. I have that all set up for my mother's emergency alarm
> button, but have not done it for SMART errors yet.
>

Thank you very much Stephen,

As usual a very thorough reply and much appreciated.

I now have smartd running and am working on getting the remote email part
up.

I also run my own SMTP server but I've only ever connected to it from
Windows boxes and it turns out that on Linux there's a bit more to

The mail program needs to be configured to be able to send emails via your
> normal SMTP server.


...than I was expecting (at least when doing it from the command line).
I'm sure I'll work that out easily enough once I get a bit of time.

Kind Regards,

D
Re: Can't get storage priorities correctly. [ In reply to ]
On Mon, 20 Nov 2023 08:45:03 +0000, you wrote:

>Thank you very much Stephen,
>
>As usual a very thorough reply and much appreciated.
>
>I now have smartd running and am working on getting the remote email part
>up.
>
>I also run my own SMTP server but I've only ever connected to it from
>Windows boxes and it turns out that on Linux there's a bit more to
>
>The mail program needs to be configured to be able to send emails via your
>> normal SMTP server.
>
>
>...than I was expecting (at least when doing it from the command line).
>I'm sure I'll work that out easily enough once I get a bit of time.
>
>Kind Regards,
>
>D

Do you run your own internal DNS server? If so, then you should just
be able to define an MX record that points to your SMTP server.
_______________________________________________
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