Quota - linuxmuster/sophomorix4 GitHub Wiki
-
Each share must be on a seperate ext4 filesystem with enabled quota
-
sophomorix users the samba command
smbcquotas(smb client quotas) to set filesystem quota on SMB shares. -
All values are Hard limits. The soft limit of the SMB share is 80% of the hard limit.
-
The Value of the calculation is saved at each user in the multivalue attribute
sophomorixQuotawith one entry for each SMB-share:<sharename>:<user individual value in MB>:<oldvalue in MB>:<status>:<comment>-
<user individual value in MB>is an override value for each user.---means that the users quota is not individually set, but calculated from othe values. - The
<oldvalue in MB>and<status>are used for internal sophomorix calculation and display (performance issues). - If
<status>is a number, it shows to which value (in bytes) the quota was succesfully set (i.e. it should reflect the current Hardlimit on this share) - The
<comment>can be used to describe the reason for an individual value
-
-
The verbose calculation for a
<user>can be seen with the command:sophomorix-quota -iv -u <user> -
After changing a quota value, you must call
sophomorix-quotato connect to the SMB-share and update the quota there. -
The name of the SMB-share must exist in the network. It does NOT have to be a school share. It can be any other share with working quota, i.e. a NAS device.
Cloud quota are automatically calculated by sophomorix in the attribute sophomorixCloudQuotaCalculated.
The calculation routine can be altered by sophomorixRole in school.conf as a percentage of the calculated Filesystem Quota of the users school.
The syntax of sophomorixCloudQuotaCalculated is according to the requirements of nextcloud (<quota in MB> MB)
Example for school.conf:
[role.teacher]
CLOUDQUOTA_PERCENTAGE=200This results in doubling (200%) every teachers Filesystem quota of default-school(since it's configured in school.conf) to be set in the attibute sophomorixCloudQuotaCalculated.
Each user has 2 Mailquota attributes:
-
sophomorixMailQuota(The individual override quota of a user and its comment, i.e.200:smv membership) -
sophomorixMailQuotaCalculated(The calculation result in MB to be used by Dovecot)
The verbose calculation for a <user> can be seen with the command:
sophomorix-quota -iv -u <user>