How do I regain access to my external USB drive with recordings?

Hello folks!

Experiencing a weird issue here.
All of a sudden I can no longer see my external USB harddrive (hooked up to a powered USB hub).
In TVHeadend storage space is listed as 0/0/0

With SSH - running df - no USB hard drive is detected.
Connecting a USB stick - to the same hub - shows up

Connecting the external hard drive to Windows 10 - and browsing the file system with Disknternals Linux Reader - I can see files and the folder structure previously created.
There’s even a preview of the files - so all seems well.

What can I do to make OSMC recognize the USB drive once again?

DiskInternals_Linux_Reader

Here are the logs: https://paste.osmc.tv/aqihanukon

(this is not my own setup - but I setup I made @ my brothers place - so there can be a delay when I need to try your suggestions)

Can you access the contents of the disk on another system?

Jul 11 18:26:36 osmc kernel: EXT4-fs (sda1): error loading journal
Jul 11 18:26:36 osmc udisks-glue[462]: Failed to automount /dev/sda1: Error mounting: mount: wrong fs type, bad option, bad superblock on /dev/sda1,
Jul 11 18:26:36 osmc udisks-glue[462]:        missing codepage or helper program, or other error
Jul 11 18:26:36 osmc udisks-glue[462]:        In some cases useful info is found in syslog - try
Jul 11 18:26:36 osmc udisks-glue[462]:        dmesg | tail or so.

When connected the hdd to your brother’s device, it looks like the file system on the partition is corrupted. So, you’ve to repair the file system with the danger to lose all your data dependent on the kind of corruption and degree.

This is a raw draft of steps you could do

  1. If there is a system which still can mount the hdd, try to make backup of your data…
  2. connect the hdd to your Vero
  3. verify that we’re talking about the correct device file /dev/sda1of the disk’s partiton by have a view to the output of blkidcommand (stop here if you can’t confirm this is the right device file name to use and come back here)
  4. sudo systemctl stop mediacenter(stops kodi)
  5. sudo systemctl stop tvheadend(stops tvheadend in case of using it)
  6. sudo systemctl stop samba(in case of having samba server installed)
  7. sudo umount /dev/sda1 (try to umount the file system in case of being mounted)
  8. sudo fsck -vfp /dev/sda1(this should start a repair and is the most critical step; if anything goes wrong this could end in the loss of all your data)
  9. in case you get back a prompt after long time try to reboot sudo sync && sudo reboot

In a second step it would help to understand how this corruption could take place: Is there any HW defect with the disk or do you remember to have disconnected the hdd without having it dismounted before?

No guarantee … it’s your responsibility if something goes wrong.

1 Like

Yes - with the DiskInternals Linux Reader on a Windows 10.
It is possible to recover files from the USB drive - to a NTFS drive in Windows 10

Absolutely brilliant @JimKnopf
Used DiskIntenals Linux Reader to copy a few important files - and then followed your instructions.

The filesystem is salvaged - and all the files and folders appear nicely in Kodi again.
TVHeadend is able to see available storage - and everything seems to be back in order.

Here a some screenshots from the process:

df-after-succesful-salvage

The Vero and the USB disk has been sitting tight in the livingroom, and has not been moved around for ages.
According to my brother there’s has been a power outage in the neighborhood in the last week or so. Maybe that could be the culprit?

I have instructed him - how to safely remove the USB drive - should it be needed.

1 Like

That could indeed be the cause.

Good to know Sam!

And huge thanks to this great community - it’s a pleasure seeking help here when needed :wink: