Solved: Files not visible via OSMC Samba, visible locally

Hi,
I run OSMC (latest) on RPi (latest hardware). Pi is connected to home network router, not set up for Internet access (no port forwarding etc). Have set up Samba successfully, and generally can access files on network drives.

I encountered one very strange issue though:
I have a USB stick (format exFAT) connected to my Pi, and available via Samba. One folder on this USB stick contains files, which I can see and access when connecting the USB stick to my computer. However when connecting the USB stick to my Pi and accessing the folder via Samba, it is shown as empty. Same happens when trying to access via Kodi file manager. I also cannot copy files to this folder via Samba. Previously all these things worked via Samba.

Another connected drive (USB hard drive, exFAT) is working fine.

Could the USB stick be the issue? How come these files are not visible in just that one folder?

Thanks for any hints.

Cheers.

A couple of queries:

  • does the stick get auto-mounted when inserted?
  • can you SSH in and see whether you can ‘see’ the folder and contained files in those circumstances?
    Derek

@newbieuser just to give some more details on this. Run ls -lah /path to your folder and check the output

Details regarding how to access the command line interface can be found here on our Wiki: https://osmc.tv/wiki/general/accessing-the-command-line/

Thanks guys.

@dandnsmith:

  • I think it auto mounts since I don’t do anything manually. I haven’t changed any settings in OSMC, so I guess it automounts by default. Just to be sure, where do I check this?
  • when I SSH in and list the directory contents using ls -lah, it says:
    “ls: reading directory . : input/output error
    total 0”

If you use the mount command, that should show if it is mounted, and where:

sudo mount

You cannot use the ‘ls -lah’ unless you know where it is mounted (if, in fact, it is) - we presume it is, to allow you access to other folders on that device.
Derek

Thanks Derek. This is the relevant line that I get from sudo mount (USB1 is the drive in question):

/dev/sda2 on /media/USB1 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096,uhelper=udisks)

When I navigate to /media/USB1 and then list the folder in question using “ls”, I get the above-mentioned input/output error.

Anything wrong potentially with the way the drive is mounted?

Cheers.

This means the USB or the file system has an error.
Suggest you unmount the usb stick and try to connect it to the Windows PC and run chkdsk. Then cleanly eject it from Windows and try again

I checked the USB drive on my Mac with various tools - no errors whatsoever.
Then I checked on a Windows PC using chkdsk - the file system wasn’t even recognised, formating not possible.

So thanks fzinken, you were spot on. What surprises and shocks me is that a Mac shows the drive as fine while the PC says it’s junk.

Thanks to all of you for your help! I am using a different USB drive now, so that should fix the issue!

Well it could be that the Stick is really gone, but it might also just be that the partition table was “special”
Did the Mac also showed the files on the USB Stick? Which filesystem did you use on the USB stick?
But switching to a new USB Stick is most likely the best to do.

The Mac showed the files on the stick. All of them. Format was exFAT.
Funnily, Windows showed the drive size as 200MB (actually 14+ GB), so could be sth with the partition. Windows could not format either, Mac could.