Forcing samba to give users a disk quota

Hi, I bought some new IP cameras, that have built-in motion detection and can record to a remote CIFS/Samba share. Sounds good, but they're buggy -- more than 512Mbyte on the remote CIFS share and they crash out. Known issue for a while, it turns out, and the manufacturer (Hikvision) doesn't seem to care to fix it. So, I need to make the samba shares report a disk quota rather than the full free space on the server. HOWEVER -- I have tried both the classic 'quota' tools, and btrfs' quota tools, and neither results in the desired effect. Classic 'quota' tools report "No filesystems with quota detected". btrfs' qgroup stuff works to limit writes beyond the quota, but samba doesn't see or report the quota. Any ideas? (Last resort would be to mount a fixed-size FS image via the loopback driver, but.. ugh.. there has to be a better way!) -T

On Friday, 16 June 2017 7:18:16 AM AEST Toby Corkindale via luv-main wrote:
So, I need to make the samba shares report a disk quota rather than the full free space on the server.
What do you mean by "report a disk quota"? How does that work? Is it just reporting the entire free space? If I had that issue I would either hack the Samba source or use a LD_PRELOAD hack to make it think that exactly 500M was free at all times. Doing this at a system level seems too hard, particularly as you presumably want those cameras to keep recording and be able to write more than 512M of data to disk while still thinking that there's less than 512M free. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/

Hi, On 16/06/17 17:18, Toby Corkindale via luv-main wrote:
Sounds good, but they're buggy -- more than 512Mbyte on the remote CIFS share and they crash out. Known issue for a while, it turns out, and the manufacturer (Hikvision) doesn't seem to care to fix it.
Perhaps of interest? http://images.news.f-secure.com/Web/FSecure/%7B43df9e0d-20a8-404a-86d0-70dcc... Sorry though, no Samba answer .... ;-) Kind Regards AndrewM

These aren't Foscam cameras, but you surely know me better than to think I'd expose these cameras to the internet! They're on a dedicated wifi network and I'm trying to configure them to write to a Samba share, because I do not trust them at all :) On Sat, 17 Jun 2017 at 03:23 Andrew McGlashan via luv-main < luv-main@luv.asn.au> wrote:
Hi,
On 16/06/17 17:18, Toby Corkindale via luv-main wrote:
Sounds good, but they're buggy -- more than 512Mbyte on the remote CIFS share and they crash out. Known issue for a while, it turns out, and the manufacturer (Hikvision) doesn't seem to care to fix it.
Perhaps of interest?
http://images.news.f-secure.com/Web/FSecure/%7B43df9e0d-20a8-404a-86d0-70dcc...
Sorry though, no Samba answer .... ;-)

On 17/06/17 10:23, Toby Corkindale via luv-main wrote:
These aren't Foscam cameras, but you surely know me better than to think I'd expose these cameras to the internet! They're on a dedicated wifi network and I'm trying to configure them to write to a Samba share, because I do not trust them at all :)
Yes, I get that, but I wouldn't even use WiFi cameras as they are easily taken off line by simply killing WiFi. Cheers A.
participants (3)
-
Andrew McGlashan
-
Russell Coker
-
Toby Corkindale