Posts by LybsterKodi

    It could be hardware, it could be how your shutting down

    Its definitely how I'm shutting down - just flip the power switch. Having said that I do the same with the Pi3s and no problem. I pull USB drives out of the port on Windows (you know the OS everyone loves to slag <G>) without safely ejecting and no problem . In addition I live in the Scottish Highlands where power cuts or voltage drops are not unknown.

    As far as not having the problem when taking a usb drive on holiday - how often have you written to the usb drive whilst its connected to the Pi4? If I leave it connected and do not change anything it works perfectly.

    However, I do have some good news

    Did you tried another format type or only NTFS and Ext4?

    ExFAT looks like the answer, at least with my experiments with a 600GB USB drive.

    I didn't try it because all my USB drives have been formatted to NTFS and all of the research I did said ExFAT is less stable. Stage 2 testing will commence after formatting the 6TB HDD.

    another way: keep /storage on the SD, mount the hdd normal (e.g. as /var/media/storage2), delete the data directories (tvshows, videos, etc.) and make softlinks to the directories on your hdd under /storage

    I'm not sure what this is meant to achieve.

    Content of /storage/.kodi/userdata/advancedsettings.xml should be:

    It was - I just quoted the cache bit.

    <buffermode>3</buffermode>

    is no buffering so removing it should have no effect but I'll try next week.

    I'm using an ExFAT partition for data what I want to be accessible in the both OS. I you have some spare small disks, maybe is worth to try it.

    I've only tried NTFS and Ext4 so far. ExFAT is supposed to be less robust than NTFS but I'll have a go. The thing that's really baffling me is why I get this on the RPi4 setup but not the RPi3.

    Whilst investigating my HDD corruption I have noticed that, occasionally, that a number of messages are displayed on the monitor. These wizz by a bit to quickly for me to read :shy:

    Is there a setting I can use to capture them? I hope there's something in the Event Log that will permit me to record these but does not involve massive amounts for me to wade through and I'm hoping someone can point me to the right settings rather than just have to try all of them.

    What's the result of <memorysize>0</memorysize> on advancedsettings.xml? That will write all the cache onto disk.

    It was worth a try so I tried it

    <cache>

    <memorysize>0</memorysize>

    <buffermode>3</buffermode>

    </cache>

    but it has no effect, and reading the info about it I wouldn't expect it to because this is for streams not file operations.

    I've now tried with a couple of different disks, even formatted the smaller (600GB) one to Ext4 but still the same problem. Also tried plugging into the USB 2 port rather than the USB 3 - no difference.

    Looks like I'll be sticking with the RPi3 setup.

    I read more about the cache and followed the links and as far as I can see this refers to video playback cache only not things like changing file names or adding new videos on.

    I can do a reboot every time I make a change but I'm baffled why no one else seems to be experiencing this problem. Maybe nobody has their drive connected to the Pi directly and access over LAN or something.

    <memorysize>0</memorysize> Just click the link and read...

    Sorry about misremembering your post.

    However, I don't want to keep the whole SAMBA cache in ram I want it on disk where (I think) it belongs.

    The link does give some interesting options which I can try. I'm not 100% certain exactly what some of them will do so it will be a bit more experimentation.

    Thanks for the link.

    I'm not sure whether this is something for LibreElec or Kodi. If Kodi please let me know and I'll post over there.

    I've now tried SAMBA and FileZilla for transferring files to the RPi4 and SAMBA to rename files on the RPi4. I've tried turning my PC off after the transfer to make sure the share is disconnected. I've tried logging in to the RPi4 via SSH and running sync. I've tried waiting a while, about 10-15 minutes and overnight, just to see if the disk would get updated and the answer in all cases is no - it doesn't.

    Rebooting, or powering off through the menu does flush things down to disk but its a bit of a pain to have to do this (and remember to have to do this) after any alteration, or addition to the disk.

    I can appreciate, as Da Flex, posted that not writing down was to help prolong the life of MicroSD cards but could a switch be added to allow it to happen?

    The reason I'm wondering if this is a Kodi issue is that if I change skin this is also not stored (or from my simple test) unless the Pi is rebooted.

    The results so far are that sync doesn't work. I tried altering a couple of file names, ssh into the RPi and ran sync, ran the watch to show status - no dirty bits, turned off, turned on - Kodi will not access the disk.

    The good news is that reboot or power off do seem to flush things to disk.

    Didn't you try the sync command before unplugging the USB storage?

    See for instance this webpage: https://www.kaper.com/notes/linux-sy…or-copy-to-usb/

    Not yet. I've just been experimenting to see what was causing the corruption. If running sync works it will be good but a bit inconvenient since I'll have to ssh into the Raspberry Pi to run it. I need to run a few other experiments and have a look through the addons yet.

    You could add a timeout to your poweroff / reboot. Maybe that's needed to complete buffer writings.

    After some experimentation I think this is (sort of) the problem. I renamed a file, left it about 10 minutes then pulled the plug - corruption occurred. I think its the proper reboot/power off that's needed.

    Can anyone on the team let me know how frequently buffers would be flushed to disk or if its only on reboot / power off.

    Went into a charity shop this afternoon and bought a 2nd hand TV so I can now set up the Pi4 and mess around. Just updating my backup 6TB HDD so I can add that on. About the only thing different will be the fact I don't have a spare Haupage tuner. I do have a single tuner so I'll add that in to copy the setup I have problems with.

    As is usual with computers just sit back and watch everything work perfectly!

    Yup - still NTFS.

    I have thought of swapping to an SD card since that is one of the significant differences between the two setups, and one I'm willing to alter - no way am I replacing the nice stable s/w on the Pi3s. I'm recording the Rugby World Cup happening in NZ for a friend so I have time to buy an SD card from good old Amazon.

    I'll report back after the rugby.

    Thanks for trying to help. I realise I should have posted the configuration as I did in the earlier posts about this. Its a 4GB RPI4 with a 120GB SSD or LibreElec & Kodi with a self powered 6TB HDD for films, both plugged into USB 3 ports, dongle for USB mini keyboard plugged into a USB 3 port on the 6TB HDD& Haupage dual tuner plugged into USB 2 port with TVHeadend. Connected via powerline ethernet to a mixed Windows (3 laptops, 1 desktop all on powerline) & Linux (1 laptop using wifi) LAN. I transfer stuff to the 6TB HDD via SAMBA.

    The RPi3 setup had two RPi3s both running off microSD cards, one with the Haupage tuner and the other HDMI to the TV, both plugged into powerline.

    With the RPi3 setup, started back in 2018, I have not experienced corruption, with the RPi4 setup I don't think it even managed a week without corruption.

    Basically I'm still trying to understand why so I can stop it happening and start using the RPi4.