Setting up quota - problem.

71 views
Skip to first unread message

Ivan Horvat

unread,
Mar 20, 2025, 7:28:20 AM3/20/25
to Minarca Data Backup
Setting user's quota is not supported

 /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

Patrik Dufresne

unread,
Mar 20, 2025, 2:24:59 PM3/20/25
to min...@googlegroups.com
I recently worked on Ext4 quota with someone else. Here the updated documentation. I invite you to review the steps and provide feedback.

Recommended Configuration for EXT4

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.

Enable Project Quotas on Your Storage

These instructions assume your partition /dev/sdbX is mounted at /backups.

  1. Install the required dependencies:

    apt install quota sudo
    
  2. Unmount the partition:

    umount /backups
    
  3. 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.

  4. Add the prjquota option to your /etc/fstab configuration:

    /dev/sdbX   /backups   ext4    defaults,relatime,prjquota     0    1
    
  5. Reload the systemd daemon and remount the partition:

    systemctl daemon-reload
    mount /backups
    
  6. Verify that quotas are working:

    repquota -Ps /backups
    

Configure Minarca to Use Quotas

  1. 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
    
  2. 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}'
    
  3. Apply the Changes Restart the Minarca server to apply the new settings:

    systemctl restart minarca-server
    
  4. Verify in the Web Interface

    • Log in to the Minarca Admin Area.

    • Go to Add UserDisk 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.


--
** Par mesure d'efficacité, je consulte mes courriels une fois par jour.
IKUS Software

Ivan Horvat

unread,
Mar 21, 2025, 7:53:50 AM3/21/25
to Minarca Data Backup
Tnx a lot...
Everything is working fine...

First part on storage I did correctly, but under Minarca section, did not set  /etc/sudoers.d/minarca-quota
and under .conf file, did not use secod nor third line...

Patrik Dufresne

unread,
Mar 21, 2025, 8:01:46 AM3/21/25
to min...@googlegroups.com
I'm glad this is working for you now.

This documentation will be part of the next release documentation.

Reply all
Reply to author
Forward
0 new messages