How resilient is EXT4 on LibreElec

  • I'm asking because we had a few lights off/lights on sessions today. My Dell Optiplex & 6TB USB HDD were on but just sitting there quietly not playing anything or recording anything and the 6TB NTFS HDD needed repairing.

    I could revert to ExFAT and modify my sysncing software to handle the timestamp differences between Linux and Windows or I could (I think) set up a PC to dual boot to Linux so I can reformat the 6TB HDD and copy all the files from backup (around 10 - 12 hours).

    EXT4 is often recommended here but what I don't know is how resilient is it. Will LE/KODI/EXT4 handle a power outage or is a repair going to be needed or what?

  • I can't give a proper information about the ratio of corrupt files systems after power outage.

    But as soon as an unsecured cache is involved in data transferrs, there could always be a loss or incosistency of data. With unsecured cache I mean non battery/capacitor buffered cache, like the RAM or the cache of your HDD.

    zfs would be a file-system which works like copy-on-write. So the existing and changed data will only be overwritten when the new data is checked.

    If you suffer lots of power outages, you should think about investing in a UPS which also covers damage due to power spikes. My opinion...

    APC and CyberPower are good brands I'd say...

    cheers


    edit:

    I think EXT4 should be fine, as long as the OS and kernel is on another drive/partition. But there are more knowledged people here to give you proper advice on that.

    Edited once, last by Bub4 (October 25, 2023 at 3:51 PM).

  • How are you using LE on the Dell. Is it installed on a USB stick.

    As was mentioned before it’s best to keep Linux (and particularly LE) away from Windows file systems unless you want to spend your time repairing your file system. A UPS as mentioned above would certainly be an advantage if you are in an area prone to regular outages.

    Personally I’d install one of the flavours of Linux alongside your Windows installation or even better install Linux on a second internal disk (SSD preferably) and install Kodi on that. From cold boot to Kodi screen is 3 seconds on a similar PC to your Dell. Better than some of the dedicated set top boxes out there.

    Unless you have a particular need for LE, Kodi installed on one of the Linux flavours is the way to go with your Dell. Ubuntu or Debian would be my flavour of choice as I’m using it for years .

  • EXT4 is often recommended here but what I don't know is how resilient is it. Will LE/KODI/EXT4 handle a power outage or is a repair going to be needed or what?

    EXT4 is pretty robust but when it comes to power outages and the "what will I lose?" question, the reality is a dice roll with too many variables for anyone sensible to profer a guaranteed answer. The real question is "how much loss will you tolerate?" and then you spend appropriately so risk matches risk-appetite. As an example: I've invested thousands of man-hours ripping and recording a large private CD and Vinyl collection into FLAC format a few years ago and have zero plans to ever repeat the hurculean task. So I've spent on a local NAS with multi-disk redundancy and this is background sync'd over the internet to a second NAS parked with a relative with a fast internet connection. So I have both local and off-site redundancy on a multi-terrabyte media hoard. The proverb is "There are two types of IT user: those who take their backups seriously, and those who didn't lose all their data yet" :D

  • the "what will I lose?" question

    So far I've never lost anything - its just the inconvenience of disconnecting the HDD and hooking it up to a Windows PC for a repair. If I had the money (I don't) I'd be happy to have the house rewired and buy new kit & a NAS to run gigabit .

    As an example: I've invested thousands of man-hours ripping and recording a large private CD and Vinyl collection

    The proverb is "There are two types of IT user: those who take their backups seriously, and those who didn't lose all their data yet"

    In my case its probably hundreds of hours - still a lot to repeat. I'd class myself as the first type of user but I operate with a restricted budget so only one backup.

  • So far I've never lost anything - its just the inconvenience of disconnecting the HDD and hooking it up to a Windows PC for a repair. If I had the money (I don't) I'd be happy to have the house rewired and buy new kit & a NAS to run gigabit .

    In my case its probably hundreds of hours - still a lot to repeat. I'd class myself as the first type of user but I operate with a restricted budget so only one backup.

    Maybe you should decide exactly what you’re trying to achieve and take it from there.

    As you didn’t indicate how you are running LE I’m assuming you’re a Windows user and reluctant to cut the chord. If that indeed is the case it’s been pointed out to you the dangers of mixing Windows and Linux file systems on a number of occasions. Who the hell wants to be constantly swapping in and out a HDD to repair it.

    There are acres of discussions on the web about the pros and cons of each of the file systems and no definitive winner. What is obvious though is an HDD with an NTFS file system is not an ideal choice for LE.

    One thing is for sure. LE is a Linux based OS and Linux based file systems are what you should be targeting.

    Maybe get an identical HDD and format it Ext4 and copy the contents of your NTFS HDD to it and that takes all the wondering out of the equation.

    Either way good luck with that setup. You did mention that you’ve lost no data so far but it sounds like that event could be closer than you think on your current trajectory.

  • I'd be happy to have the house rewired and buy new kit & a NAS to run gigabit .

    You can pick up a UPS for about $50, there is an Amazon branded 400VA one. It may be worth the hassle. As for rewiring, you can certainly run/stream over wireless from a NAS, you just have to tweak/tune and deal with the potential problems with wireless. I have been doing it for 10 years, and with 802.11ac and later it very viable.

    Biggest issue is if you're using a Raspberry Pi 4 or less is being aware of that you're not getting the full 802.11ac bandwidth, it's about 80~100Mbps in terms of actual transfer rates. But that is suitable for most content and paired with a relatively decent size buffer cache you can manage 4K content over 802.11ac wireless with no problems. Obviously sustained high bit rate video in excess of your actual transfer rates means you will get stalling, but I have never seen that with movies. The easiest solution is a USB dongle, with those on a Raspberry Pi 4 you can get 270Mbps transfer rates fairly easily over wireless, which is more than sufficient for any content.

    But wireless can be a real pain in the butt, so don't get me wrong on that. I personally learned a lot dealing with it, mostly using commodity hardware like the TP-Link Archer A7 v5 running OpenWrt, and TP-Link AC1300 USB dongles (w/ mainline backported rtw88 drivers tracked to LE12 RPi4 devices).

    Anyways, if I have the motivation to pay someone to rip up my house to wire it with Ethernet then I would probably do it (probably wiring for 2.5Gbe/10Gbe), but I am cheap and what I have is working fine. Not to mention there are more important improvements that actually help resale, like bathrooms & kitchens that are actually becoming a necessity to do. :)