[mythtvnz] Re-using Seagate SMR drives in MythTV

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Jul 26 06:43:34 BST 2023


On Wed, 26 Jul 2023 13:45:08 +1200, you wrote:

>I know Stephen has been using some Seagate ST8000AS0002-1NA17Z drives as
>Archive drives in MythTV.
>
>Has anyone else got feedback on using SMR / Shingled drives. I've a couple
>of old 8TB Seagate ST8000AS0002-1NA17Z drives I used to use for backups
>and my existing 4TB drives in the PVR are now exceeding 60,000 hours and
>overdue a replacement.
>
>One option I've considered is to use an SMR Drive as the archive and have
>a smaller drive for daily recordings.
>
>The power on hours for the old SMR drives is really low and I'm trying to
>find a sane way to re-use them.
>
>Steve

I have seven recording drives now, with six archive drives.  The first
four archive drives are ST8000AS0002 shingled drives, and when I got
them, I wrote some software automate the process of filling them up
from the recording drives ("mythsgu fill").  The filling process works
by moving the oldest recordings on the recording drives to the free
space on the archive drives until they are full.

Later, when I had been watching and deleting recordings in a way that
left free space scattered around on them, I decided I did not want to
fill that free space with other recordings, but instead to keep the
drives ordered by oldest recording time.  So I wrote a new "mythsgu
pack" command to move the oldest recordings from the second oldest
drive to the oldest drive, then from the third oldest drive to the
second oldest, and so on, until the free space on all the archive
drives except the last one was full.  Then I could use mythsgu fill to
move the next oldest recordings from the recording drives to the
newest archive drive, keeping them all in date order.

Mythsgu is written to be able to understand what mythbackend is doing
and pause or stop its operations when mythbackend is busy or about to
become busy.  So it can be run at any time and will automatically do
filling or packing operations between recordings and will detect if
anyone starts to play a recording and pause for that also.

When I ran out of space again, I added a new 16 Tbyte enterprise drive
to the archive drives, as it was noisier than my old WD Green 4 TByte
recording drives so I wanted to keep using them for making recordings.
And then when I replaced one of my older recording drives with an 18
TByte one, I added the old 4 TByte one to the archive drives to make a
total of six, with 52 TBytes of storage.

The archive drives are on two USB 3.0 mounts - one 4 drive Orico one,
and one 2 drive NexStar one.  They are only turned on when I want to
use the archived recordings, and get turned off again after use.  I
have a script that unmounts and sleeps all the archive drives
(uarc.sh).  It has a 20 second timeout between the unmounting and the
sleep commands to allow any shingle updating done after the unmount
command to complete before the shingled drives are put into sleep
mode.  When I turn on the archive drive mounts, the archive drives are
automatically mounted by some nice automount scripts written by
another MythTV user.

I would like to be able to further automate the archive drives by
being able to just issue a command to turn them on, using remote
controlled mains switches via Home Assistant to control them.
Unfortunately, the Orico mount has a "press to turn on" button and so
can not be left turned on and have its power controlled externally.
The older NexStar mount has a normal power switch, so I could
externally switch it.  I am still trying to find a >= 4 drive USB
mount that has a physical power switch that I could swap the Orico
mount for.  The ones I can find all seem to have the "press to turn
on" type controls now.

So where I am now, to use recordings on the archive drives, I need to
turn their mounts on at the plug strip, and press the power button on
the Orico mount, and then wait until all the drives have spun up and
been automounted.  That takes less than a minute.  Then their
recordings can be used normally.  Shutting them down involves running
my uarc.sh script and waiting for it to have unmounted all the archive
drives and put them to sleep.  Then I turn the mounts off at the plug
strip.  That takes about 40 seconds.  So I find it is very usable,
with only minimal annoyance factor from the turn on and turn off
times.

If you would like to do something similar, I am happy to help and
provide copies of the software I am using.



More information about the mythtvnz mailing list