/backups is separate partition, with /etc/fstab
UUID=f071310f-xxx /backups ext4 defaults,usrquota,grpquota,prjquota 0 2
project qouta is set – I tested it with
setquota -P 1 5500000 5500000 0 0 /backups
repquota -Ps /backups/
gives:
*** Report for project quotas on device /dev/sda7
Block grace time: 7days; Inode grace time: 7days
Space limits File limits
Project used soft hard grace used soft hard grace
----------------------------------------------------------------------
#1 -- 17572K 5372M 5372M 61 0 0
And
/etc/minarca/minarca-server.conf has
quota-set-cmd=setquota -P $RDIFFWEB_USERID $((RDIFFWEB_QUOTA / 1024)) $((RDIFFWEB_QUOTA / 1024)) 0 0 /backups
Even if i gave admin 0 limit (unlimited), everything is the same.
I wanna give every user just 10, or 20 GB space
Did I miss something?
Ivan
We generally recommend using project quotas with Minarca to simplify permission management and avoid running Minarca with root privileges. The next section explains how to configure project quotas.
This section is not a full guide on configuring EXT4 project quotas but provides enough information to help you set them up.
These instructions assume your partition /dev/sdbX is mounted at /backups.
Install the required dependencies:
apt install quota sudo
Unmount the partition:
umount /backups
Enable the project quota feature:
tune2fs -O project -Q prjquota /dev/sdbX
The filesystem must be unmounted to apply this setting. If your backups are stored on the root filesystem (
/), you may need to boot using a live CD.
Add the prjquota option to your /etc/fstab configuration:
/dev/sdbX /backups ext4 defaults,relatime,prjquota 0 1
Reload the systemd daemon and remount the partition:
systemctl daemon-reload mount /backups
Verify that quotas are working:
repquota -Ps /backups
Allow Minarca to Manage Quotas Using sudo
Create a file named /etc/sudoers.d/minarca-quota and add the following lines:
minarca ALL=(ALL) NOPASSWD: /usr/sbin/setquota minarca ALL=(ALL) NOPASSWD: /usr/bin/quota
Edit the Minarca Configuration File
Add the following lines to the Minarca configuration file (/etc/minarca/minarca-server.conf):
quota-set-cmd=chattr +P -p $RDIFFWEB_USERID "$RDIFFWEB_USERROOT"; sudo setquota -P $RDIFFWEB_USERID "$((RDIFFWEB_QUOTA / 1024))" "$((RDIFFWEB_QUOTA / 1024))" 0 0 $(df --output=source "$RDIFFWEB_USERROOT" | tail -n 1); nohup chattr -R +P -p $RDIFFWEB_USERID "$RDIFFWEB_USERROOT" >/dev/null 2>&1 &
quota-get-cmd=sudo quota --no-wrap --local-only -P $RDIFFWEB_USERID | awk -v dev=$(df --output=source "$RDIFFWEB_USERROOT" | tail -n 1) '$1 == dev {printf "%.0f\n", $3 * 1024; found=1} END {if (!found) print 0}'
quota-used-cmd=sudo quota --no-wrap --local-only -P $RDIFFWEB_USERID | awk -v dev=$(df --output=source "$RDIFFWEB_USERROOT" | tail -n 1) '$1 == dev {printf "%.0f\n", $2 * 1024; found=1} END {if (!found) print 0}'
Apply the Changes Restart the Minarca server to apply the new settings:
systemctl restart minarca-server
Verify in the Web Interface
Log in to the Minarca Admin Area.
Go to Add User → Disk Space.
Enter a valid quota size, such as "500 GiB".
--
You received this message because you are subscribed to the Google Groups "Minarca Data Backup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minarca+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/minarca/54665450-7104-4799-a842-b61193e788b3n%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/minarca/6a7355d0-ba4c-406a-a0f4-491a3f6eb309n%40googlegroups.com.