Folder disappeared

  • Configuration:

    LibreElec 20/08/2022 nightly, Amber skin loaded but not used, Shadertoy visualisation loaded, TVheadend server & client installed and running

    RPi4B 4GB, 128GB SSD (for boot etc), 6TB Seagate Backup Hub NTFS formatted (films etc) with Haupage tuner & wifi keyboard dongle plugged in, ethernet,

    I have posted about HDD corruption before but now I've lost a complete folder. I have three top level folders on the 6TB HDD - Films, MVids, Records. In Films I have folders A to Z with sub folders if there's a series (eg 'Allo 'Allo). This morning checking something I found I've lost the entire contents of Films/A. The folder is still there but there's nothing in it. Fortunately I do have backup but its more than a little disturbing.

    The RPi4 has been running since 20/8 but has been rebooted via the menu on occasions. I have pulled the HDD from the Pi and checked it out on Windows since I have better diagnostic tools there and can find nothing wrong apart from the fact that stuff has gone missing.

    Does anyone have a suggestion (or an explanation) that does not involve reformatting to Ext4 since that is not a viable option.

  • A little more information - I took the HDD back to the Pi and its refusing to recognise it. Tried a different cable - still not recognised, tried one of the USB2 ports - still no joy.

  • dmesg command in libreelec CLI will show, if sd device is recognized when you plug it in. It probably won't help, if your file system is setup on device and not on partition.

    Example of dmesg in spoiler

    Display Spoiler

    [348403.046290] usb 2-3: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd

    [348403.065542] usb-storage 2-3:1.0: USB Mass Storage device detected

    [348403.066802] scsi host2: usb-storage 2-3:1.0

    [348404.073315] scsi 2:0:0:0: Direct-Access <<snip-hardware-name>> 1072 PQ: 0 ANSI: 6

    [348404.073705] scsi 2:0:0:1: Enclosure <<snip-hardware-name>> 1072 PQ: 0 ANSI: 6

    [348404.075072] sd 2:0:0:0: Attached scsi generic sg2 type 0

    [348404.075226] scsi 2:0:0:1: Attached scsi generic sg3 type 13

    [348404.079796] sd 2:0:0:0: [sdc] Spinning up disk...

    [348405.086129] ......ready

    [348410.154097] sd 2:0:0:0: [sdc] 1953458176 512-byte logical blocks: (1.00 TB/931 GiB)

    [348410.154530] sd 2:0:0:0: [sdc] Write Protect is off

    [348410.154533] sd 2:0:0:0: [sdc] Mode Sense: 53 00 10 08

    [348410.154785] sd 2:0:0:0: [sdc] No Caching mode page found

    [348410.154787] sd 2:0:0:0: [sdc] Assuming drive cache: write through

    [348410.338335] sdc: sdc1

    [348410.340926] sd 2:0:0:0: [sdc] Attached SCSI disk


    chkdsk in Windows CLI. Linux will not mount dirty NTFS.

    Did you turn off hybernation in that Seagate?

  • System is setup on 128GB SSD.

    Chkdsk and other disk testing utilities run on Windows PC and no problems identified.

    The Seagate is set to spin down after 15 minutes same as the other Seagate 6TB HDD I had on the RPi3 setup which has run since 2018 with no problems.

  • I tried to connect it to the RPi4 again - not recognised. This time when I connected to my Windows PC it asked to scan and fix - FUBAR. I have for now given up on the RPi4. I do not know where the problem is but I suspect LibreElec. It may be the Pi but lack ability to test it. I'm going to swop the new 6TB HDD onto the old RPi3 system and see if it gives problems. If it does I'll apologise to LibreElec.

    Any suggestions on how to test the Pi welcome.

  • The story so far for the 6TB HDD:

    1. copy 4TB of files of backup

    2. run Windows app (homebrew written in Delphi) to modify 6TB HDD file names and .nfo to reflect name changes

    3. set up the RPi3s (LE 9.2.8, Kodi 18.9), removed sources and cleaned database

    4. plugged 6TB HDD in

    5. set up new sources and loaded database

    6. no last played information

    7. Exported database just in case nfo format was different

    8. was told I'd forgotten about advanced settings.xml

    9. use Windows via SAMBA to a) delete nfo files (c 7200 of them)

    10. use Windwos via SAMBA to copy nfos from backup to 6TB HDD

    11. removed sources, cleared databases, reset sources loaded database

    12. everything fine

    That pretty much confirms to me that the HDD is OK. I'm wondering if the incomplete implementation of SAMBA on the RPi4 could be responsible for the disk corruption. I can see no reason why Kodi should be writing to the sources unless I export the database and any file manipulation I do is via SAMBA so it will be writing to the disk.

    Any thoughts?

  • Just curious if you tried the full RPI OS install or possibly one of the Linux Distros and connected the 6Tb drive directly to the RPI4. If so what does the system report. Possibly try installing Ubuntu and Kodi as an experiment and see what results it reports.

  • petediscrete

    Thanks for the suggestion. I'm skilled with Windows not with Linux (4 Windows PCs to 1 Linux one) so I would have no idea what I'd be looking for apart from the disk becoming corrupt again and spending another 12 hours copying all the files back. The 6TB HDD was connected to a USB3 port on the RPi4 (and is currently plugged into a RPi3 USB2 port), only for population was if connected to the Windows PC.

    If you can expand on your suggestion I'm willing to give it a go.