xfs
[Top] [All Lists]

xfs directory quota doesn't work

To: xfs@xxxxxxxxxxx
Subject: xfs directory quota doesn't work
From: Simon Xia <simonxiaomg@xxxxxxxxx>
Date: Fri, 21 Aug 2015 17:05:00 +0800
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=WfxrMZFufK92afeDRyNZ2zMYJMe+NlgLCxD6dOowgSI=; b=npyY9hu3bX8PZhaVrgDcUjxU1eP3vc92r5Kh7RPCIS8fWY64Ci8w8tmg9ur8N8UueG LAhXM75afe083Mqtghf+Ly2yinKw+SElTYpIjDD4FJddYwAjfzgLZKeHTKzWrWGAxdFJ qh2sKFqLgwiYtq4tGI79nHRLfnI6sgl4r7UcC56Yf60/YoY/O+DD3syrJCQPNSSkEAbW 55vxkbOzSvoJZKVky3mgQ9JW92rgkfK9aTFNR09aPfxwWo68eI3oXmbHFyC84WLQuvq6 Hq/sGxkbGjucgRdoKhJF1uCcdF0e8skTxurfLgtD0e8pJ2ww9F236WY+lHhDtLWyLbMN lx1A==

hi, everyone, I encounter a problem when using xfs

now I have two tasks and I wanna run them in different directory and limit the directoryâs size. I use xfsâs project quota to achieve this.

I follow the steps from here:https://solidlinux.wordpress.com/2012/12/09/xfs-quota-managament/

here is detail of my two config files

/etc/projects:

11:/home/xiameng.xm/xfs_dir/task1
12:/home/xiameng.xm/xfs_dir/task2

/etc/projid:

task1:11
task2:12

and here is my step:

touch test_xfs
dd if=/dev/zero of=test_xfs bs=1000000 count=1
mkfs.xfs test_xfs

mkdir xfs_dir
mount test_xfs ./xfs_dir -o pquota,loop

xfs_quota -xc 'project âs task1' /home/xiameng.xm/xfs_dir
xfs_quota -xc 'project âs task2' /home/xiameng.xm/xfs_dir

xfs_quota -x -c 'limit -p bhard=2m task1' /home/xiameng.xm/xfs_dir
xfs_quota -x -c 'limit -p bhard=10m task2' /home/xiameng.xm/xfs_dir

here is the output of xfs_quota -x -c 'report /home/xiameng.xm/xfs_dir'

Project quota on /home/xiameng.xm/xfs_dir (/dev/loop1)
                               Blocks
Project ID       Used       Soft       Hard    Warn/Grace
---------- --------------------------------------------------
task1               0          0       2048     00 [--------]
task2               0          0      10240     00 [--------]

the question is no mater how large I create a file in ./xfs_dir/task1 or ./xfs_dir/task2, it success!

the quota limit doesnât work!

Any help will be appreciated :)


ps: I also post my question here:Âhttp://unix.stackexchange.com/questions/224606/xfs-directory-quota-doesnt-work

----

Best Regards
Simon Xia

â
<Prev in Thread] Current Thread [Next in Thread>