Trick Samba Share Size Display
Introduction
A colleague of mine found himself in a rather delicate situation. Let me explain the scenario:
- 2 mount points in /mnt, with one nested inside the other
- 1 share on the primary mount point
When the primary mount point is full, you can't copy anything anymore, even if the second nested mount point still has free space. For those who still don't understand:
- /mnt/: 30 MB remaining
- /mnt/disk1: 10 GB remaining
- share: /mnt/
The share tells me that it can't copy more than 30 MB, even into /share/disk1.
Solution
Here is a solution that allows you to bypass the fact that Windows will analyze the remaining size of the shared folder before copying what you want. In the Samba configuration file, adjust your share like this:
dfree is the argument needed for the Samba daemon to determine the size to display for a given share at startup:
Then apply the proper permissions:
References
https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html