Do you get the out of space error only if you are copying large files ?
What filesystem is your 4TB drive formatted as - NTFS ? (Edit: sorry, just noticed you said NTFS in the subject)
Check the available space on all disks and partitions with
df -h
And paste the output of this command here so we can see it.
If you’re accessing the drive via the “devices” share, there is a known issue where Samba reports the free disk space of the boot drive (usually the internal SD card ext4 partition) for all of the drives mounted at /media. (eg in the devices share)
So for example say 1.5GB was free on your SD card and you had 100GB free on the external drive, Samba reports that there is only 1.5GB free on the external drive even though it really has 100GB free.
Thus trying to copy a 2GB file would fail with a not enough space error, however you could copy five 1GB files one at a time successfully - because the reported free space would always be 1.5GB before each copy. (Since it is reporting the free space of the wrong drive, it doesn’t change)
If this is your issue we are working on a solution to that which involves automatically creating a separate share for each mounted external drive so that the reported free space for each drive is correct.
A separate issue I have noticed with sharing external exFat or FAT32 drives via Samba is that copying large files (more than a few hundred megabytes) can fail with unusual errors, at least with Windows 7 - this doesn’t happen if the drive is formatted as ext4 or NTFS.
The output of the df -h command would give us a much better idea of what is happening in your case.
df and df -h commands. It looks like it is mounted correctly. Having experimented I think that it is the SAMBA disk size issue. I have copied 9x1Gb files in groups of 4Gb and 5Gb. I then tried to copy an 8Gb file and got a space error. Is there a workaround now or is there likely to be a fix in OSMC the near future
I’ve found a workaround but to make it work I had to change the volume name on the device to remove the space. It was Seagate 4TB and it is now Seagate4TB
sudo pico /etc/samba/smb.conf
Within the [devices] section modify path=/media to path=/media/Seagate4TB
Save the file with ctrl+X
restart samba
sudo service samba restart
When you look at the share you now see the top of the USB disk. Unfortunately you see the $RECYCLE.BIN and System Volume Information folders which are hidden on the disk.
It would be good however to not have to make this change.
You have 5.8GB free on your SD card, so the cut-off point where an error occurs would be about 5.8GB.
I have been developing and testing a proper solution for this where each auto-mounted external drive gets its own separate samba share automatically when connected, if you feel a little bit adventurous and would like to help test this, you can manually download and install two updated packages with the following commands:
Afterwards reboot. You should find that you automatically get shares named after each partition on each externally connected drive (it works with drives with more than one partition as well as one partition) and drives with spaces in the name are OK too.
This solves the incorrect reported free space as every partition will get its own share which reports the correct free space for that partition. Let me know how you get on if you try it.
BTW, I’m not sure why you are seeing the hidden recycle bin with the change you made - in theory you shouldn’t. Let me know if you also see this with my changes. (I don’t see a recycle bin)
Looking a bit further at the hidden files issue - it doesn’t appear that Samba will by default honour hidden files when a client sets a file as hidden. Furthermore an NTFS drive mounted on Linux does not expose the hidden bit of the file in a way that Samba can read it.
Therefore if you plug the NTFS drive into windows and create some hidden files (for example by using the recycle bin, which creates a hidden folder) and then plug that drive into a Linux machine and share it with Samba those hidden files will not be hidden, because the unix file system doesn’t have a standard way to report that the file is hidden. (There is no hidden attribute in unix filesystems - instead a filename starting with a dot is considered to be hidden)
As a workaround you can filter out certain names with an smb.conf option like this:
But this is only doing so by name, not by actually checking the hidden bit, and hiding files through explorer from a client connected to a share still won’t work.
I see the same issue once I created a recycle bin on a windows PC and I see the issue whether I connect via the devices share or a directly mapped share, so it’s nothing to do with your change to the path option.
Doesn’t look like there is a good solution to this I’m afraid - welcome to the world of Linux and Windows interoperability!
I’m giving your proper solution a go now. I now see a new share for the USB drive but I can’t access it as I get access. The error I get is that the drive is not accessible, you might not have permission to use the network resource. The other shares seem to have gone.
Did you authenticate as osmc/osmc for the username and password ?
The automatically added shares are set to read/write access for the osmc user and no access for anyone else. (Including guest)
If you’re accessing the share from Windows you might need to go into Control Panel -> Credential Manager, then remove the saved credentials for OSMC under Windows credentials.
Then next time you try to go to the share it should prompt you for a username/password, choose osmc/osmc and save them.
I have already cleared the saved user credentials. When I go to the server itself, I see the new drive share, I get the authentication error when I try to get into it… I’m a bit surprised that I don’t see the osmc or devices shares any more as osmc is in the smb.conf file and devices is in smb-shares.conf.
Can you try resetting the samba password for the OSMC user like so:
sudo smbpasswd -a osmc
It will prompt you to enter a new password - try entering osmc to set it back to the original password.
Keep in mind that the samba login for the osmc user has a separate password than the osmc login for ssh/ftp - they aren’t kept synchronised even though they both default to the same password on a new install.
No joy on the smb password reset. Interestingly, the first time I access the server using \osmc I get asked for the username and password which is successful. I then see the share but get asked for the credentials again and it is these that fail.
What name should have a Samba Share Credential in the Credential Manager?
I wanted to access to the Shares with a different user, so tried to delete the credential. But haven’t been able to find which one. Neither in Windows Credentials nor in Web Credentials.