OSMC RC2 Samba problem with large files

So OSMC is working great. The best software I’ve used so far. But I’ve stumbled upon a rather strange issue. The external HDD I’ve connected to the Pi is formatted as ext4. I use my windows 8.1 machine to download, and then copy the files via Samba to the Pi. However, as soon as my files are larger than 2gb (or 2.5 I’m not quite sure) a message comes up saying: ‘There is not enough space on devices, you need an additional XXX GB to copy these files’.

Copying smaller files works like a charm so it should work. It also isn’t because the drive is full (only 70gb of the 1tb used). And since it is formatted as ext4, there shouldn’t be a limit in filesize. I’ve tried OpenElec just to see if it was an issue with the HDD, but in OpenElec the copying of large files works great (only a lot slower than OSMC).

So is there anyone who has any idea what could be the problem here?

How much free disk space do you have on your ext4 partition on your internal SD card ? I bet it’s about 2GB…

If this is the case then the issue is that the devices share points to the /media folder which is actually on the internal SD card on the ext4 partition, thus samba always reports the amount of free disk space of the internal SD card, not whatever drives you have mounted externally. (Samba, and possibly the SMB protocol itself doesn’t understand the concept that a sub directory might have more free space available to it than the parent due to it being a mount point)

The only way to get around this is to create a separate samba mount for each external drive that points directly at the drive, eg /media/mydrive instead of just /media. Then Samba will report the correct free disk space for that mounted drive. I’m investigating ways to do this automatically when drives are connected but there are quite a number of complications to this approach that make it not feasible to add just at the moment.

1 Like

I guess you are absolutely right there! I knew I was missing something…

So a solution could be changing to a larger sd card? But that is more of a workaround than an actual fix, right?

I’m just happy to know you read the problem. I am not expecting a fix in the next 5 minutes :stuck_out_tongue: Just knowing you know about it is enough. I’ll just switch to a larger sd card, or try to manually create a separate mount point. Could you maybe explain to me what’s the best way to do that?

EDIT: I tried manually creating the mount point in the samba config file. It works now! Here is how I did it:
SSH into your Pi.
sudo nano /etc/samba/smb.conf

Among a lot of things you should see this (at least in my case):
browsable = yes
read only = no
#guest ok = yes
valid users = osmc
path = /media
force user = root

After ‘path = /media’ add: /NAMEOFYOURUSBDEVICE
It should look like this:
/media/HDD or /media/USB or /media/whateverthenameofyourusbis

Save this file. Reboot your Pi, and after this, copying large files is possible again!

Yep, thought it would be that. Be aware that at the moment an upgrade to the smb-app-osmc package will overwrite your changes to smb.conf, so make a backup of the file.

We’re investigating ways to provide a user customisable samba configuration file that won’t be overwritten by updates but don’t have something in place at the moment.

Luckily changing the config file is no more than 1 minute of work :slight_smile: But I’ll keep that in mind. At least I now know what caused the problem and how to (sort of) fix it. Thanks for your help!

This worked great. I was having such a hard time getting my shared folders to work. Thanks a bunch!