Share max size


lachiu

Recommended Posts

  • 3 weeks later...

1. This would be useful in corporate contexts, but I'm sure people will find other ways to do something useful with it.

2. What should happen when a file is halfway through writing and it's already hitting the quota? Should it not have started in the first place? Should one file "too big" be allowed? Or should it just terminate the write?

3. What should a share report to a client as its total capacity? The actual physical capacity, or the quota?

4. Percentile quotas might be useful. Then, the quota would allow more data to be written when the array is expanded.

Edited by thany
Link to comment
  • 2 months later...

+1

 

On 12/20/2022 at 6:57 PM, thany said:

2. What should happen when a file is halfway through writing and it's already hitting the quota? Should it not have started in the first place? Should one file "too big" be allowed? Or should it just terminate the write?

Do whatever a share currently does when it runs out of space.

 

On 12/20/2022 at 6:57 PM, thany said:

3. What should a share report to a client as its total capacity? The actual physical capacity, or the quota?

Report the quota - I want to know what is available to me. In most cases it would be useless to know about the totally (partially inaccessible) space in the array.

Link to comment
  • 1 month later...
  • 4 months later...

+1

I come from Synology for my Home Lab and TrueNAS at work and it's just a doozy to do something like that and it's soooo useful. I use it to limit backup folders or "home cloud" storage space for family members. I discovered late you couldn't do in unraid. If I had known, I would have switched to TrueNAS for my home lab... that's a bummer. Now I have to keep my Synology around. 

 

Please add this feature for a future release ?

Link to comment
  • 2 weeks later...
  • 2 weeks later...

+1

 

Storage is always an issue with kids. They don't seem to grasp the fact that "a computer" can get full. I want to allow them acces to my server to write stuff onto it so it will be save. School projects and what not. I've setup the family pc with storage restrictions per account and it works like a charm, basic windows stuff. Only problem with the family pc: no redundancy and not really easy if one wants to remotely acces the files per laptop.

 

So space on the server would be THE option. But with the kids filling up there storage space and having to clean up their storage multiple times a year, I'm not giving them acces to multiple TB of storage.

  • Upvote 1
Link to comment
  • 1 month later...
  • 4 weeks later...
  • 4 weeks later...
  • 2 weeks later...

+1,

 

currently my only method would be to create a completely separate cache pool and limit a share to that specific pool, with zero feedback as to how much space is left of the allowance. (Or unassigned but mounted & shared device of the specific desired size.) Granted, that also would allow me to e.g.: forego array protection if the data is not important at all, but it also robs me of any flexibility in reconfiguring it easily.

Link to comment

Hello everyone! You can limit share size through the unraid GUI by changing the shares export to use "Time Machine" in Unraid. It doesn't matter that time machine is for mac, the limit still applies to SMB and Windows.

 

***HUGE DISCLAIMER***

This requires "Enhanced macOS interoperability" to be enabled which, has an annoying downfall of occasionally preventing file changes in windows. (Example: On your windows client, you update and save a word document. After saving, for the next ~5 minutes, you cant rename or delete it). See this unraid post for more info on that issue. Personally, I stopped using this setting specifically due to this issue, but simply waiting, or logging off/on will solve the problem.

 

 

If you don't care about the listed downfall, here are the steps to use Time Machine to limit share sizes:

1) Navigate to 'Settings > SMB'

2) Look for "Enhanced macOS interoperability" verify that the setting is 'Yes'. If the setting is no, you must stop the array, then come back here to change it.

3) Next, Navigate to 'Shares > [share name]'
4) Under "SMB Security Settings", Find the drop down for 'Export' and change it to "Yes/Time Machine"

5) Enter your size in MB (1000000 Megabytes = 1 Terabyte)

6) Apply

 

 

Below are some pics for reference:

 

Enhanced macOS interoperability

1509219938_1limit5.thumb.jpg.7b17809e9cbc0977a45aadb52979a49b.jpg


SMB Share settings and windows results BEFORE the change
254528295_1limit1.thumb.jpg.373cebb01b6c565d359a456883b38e26.jpg


1222830022_1limit2.jpg.82cc21defda7128f2da03f468d9337dc.jpg

 


SMB Share settings and windows results AFTER the change
1555600169_1limit3.thumb.jpg.413f1ca5b59fe424063fc43c24337130.jpg


1959951952_1limit4.jpg.a1582c492dcc00781ebde361bb935a98.jpg

 

 

Side notes

-The number isn't exactly 1000 GB thanks to windows usual formatting shenanigans.

-The above steps work for Unraid v6.12 ... unknown if they will work for other versions.

-Check out some of the alternate suggestions below if you don't want to deal with the "Time Machine" disclaimer.

 

 

Alternate suggestions/solutions

-In the above example, I am using a ZFS pool and am very limited in options. If you are using a multi-disk array for storage, consider using "Included/Excluded" disks instead, and just limit the share to a single disk.

-If you are competent in the terminal, a user script would be an excellent alternative to this. A script which limits the directory size should work (Note, this requires creating mount points, setting permissions, etc. all while unraid is running... you REALLY need to be good in the terminal to do this). A script which removes files older than X days from directory could also work.

-As of Samba version 4.17 ... It includes storage quotas "smbcquotas". Unraid 6.12 currently uses samba version 4.17.12 (you can check your samba version by putting 'smbstatus' into the terminal). If you feel like messing around, here is documentation directly from Samba about configuring this feature: "Samba quotas" . It is likely that this feature will eventually get implemented into unraid if you are patient.

 

 

This is my first post so I greatly apologize to the moderators for any mistakes I made. Thank you for your patience, good luck everyone!

 

Edited by socomsgh
adding smbcquotas
  • Like 1
Link to comment
  • 2 weeks later...
  • 1 month later...
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.