[mythtv-users] Storage directory management across SSD/HD
linux at thehobsons.co.uk
Sat Mar 11 17:41:06 UTC 2023
Mike Perkins <mikep at randomtraveller.org.uk> wrote:
>> About deleting in-use files under Linux. This is entirely possible
>> without disturbing the in-use processes. When a directory entry is
>> deleted the actual data is still there and is in the background
>> protected from overwriting until it is no longer in-use.
>> This as opposed to Windows filesystems. This is why Windows needs
>> endlessly reboots during installation.
Interestingly I was taken to task on this not long ago when I pointed this out. Apparently “modern” (i.e. not the ancient [something]FAT ones) do support unlinking of files. But then the entire MS ecosystem is, from observation, such a cobbled together hodge-lodge of new lipstick over old stuff that I suspect the facility is not used simply because it would mean re-writing so much stuff - and it’s easier to just make the user do the work.
>> This goes for ext2/3/4 filesystems. I am not sure if this also goes
>> for the newer filesystems but I guess it does.
It should hold for any Unix[like] system as it’s used by so many things that would break if the filesystem didn’t support it.
> The problem there is that, although the system considers the file deleted, the /space/ is not released until the last user closes the (deleted) file. This is mythtv's problem, that it will actually want to make use of that space.
That does depend on how much space you have set Myth to keep free, and how big your recordings are. With my settings, I’d have probably finished watching a recording (and therefore, the file would have been closed and deleted) long before the disk filled up. But then I don’t tend to rely on Myth for cleaning up - I either have a bit of a manual purge, or add some disks space whenever space starts getting low.
More information about the mythtv-users