Bug 1251456 - quota without config files and report projects shows nothing
quota without config files and report projects shows nothing
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: xfsprogs (Show other bugs)
7.1
x86_64 Linux
unspecified Severity unspecified
: rc
: ---
Assigned To: Eric Sandeen
Filesystem QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-07 06:52 EDT by lejeczek
Modified: 2015-09-08 11:19 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-11 00:28:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description lejeczek 2015-08-07 06:52:32 EDT
Description of problem:

set up project quotas without configuration files, as per manual.
Then try to report it

xfs_quota -x -c 'report -ph' $_mountPoint

and you see nothing, no reports, yet quotas are there and working.
Why is that?

Version-Release number of selected component (if applicable):

xfsprogs-3.2.1-6.el7.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 2 Eric Sandeen 2015-08-07 13:11:58 EDT
Please provide the actual steps you've taken, up to the

# xfs_quota -x -c 'report -ph' $_mountPoint

part, i.e. bash history or similar.  It's not at all clear what you've done here, so I can't very well answer your question.

Thanks,
-Eric
Comment 3 lejeczek 2015-08-10 04:06:40 EDT
I did:

xfs_quota -x -c "project -s -p $_path 10 " $_mountPoint
xfs_quota -x -c "limit -p bsoft=$_soft bhard=$_hard 10" $_mountPoint

xfs_quota -x -c 'report -ph' $_mountPoint # nothing reported

regards
Comment 4 Eric Sandeen 2015-08-10 14:55:45 EDT
And how did you mount the filesystem?  And is this the root fs or some other fs?  And what is $_path and $_hard and...

And what is in /etc/projects and /etc/projid ?

Please help me help you by giving me enough info to reproduce the problem from scratch.
Comment 5 Eric Sandeen 2015-08-10 15:23:25 EDT
Sorry, you said w/o config files, so ignore the /etc/* questions...

So essentially this, right:

[root@bp-05 ~]# mount -o prjquota /dev/sdb /mnt/test
[root@bp-05 ~]# mkdir /mnt/test/topdir
[root@bp-05 ~]# xfs_quota -x -c 'project -s -p /mnt/test/topdir 42' /mnt/test
Setting up project 42 (path /mnt/test/topdir)...
Processed 1 (/etc/projects and cmdline) paths for project 42 with recursion depth infinite (-1).
[root@bp-05 ~]# xfs_quota -x -c 'limit -p bhard=1g 42' /mnt/test

[root@bp-05 ~]# xfs_io -f -c "pwrite 0 512m" /mnt/test/topdir/file
wrote 536870912/536870912 bytes at offset 0
512 MiB, 131072 ops; 0.0000 sec (990.365 MiB/sec and 253533.4954 ops/sec)

[root@bp-05 ~]# xfs_quota -x -c 'report -ph' /mnt/test
[root@bp-05 ~]#

Ok, let me look into that.
Comment 6 Eric Sandeen 2015-08-11 00:28:56 EDT
Without the /etc/proj* files, xfs_quota doesn't know what to query - that's the list of quotas that exist, and the mapping to directories.

Without that, though, you can still get quota usage by id, by specifying a range of project IDs to query, i.e.:

# xfs_quota -x -c 'report -L 42 -U 42 -p' /mnt/test
Project quota on /mnt/test (/dev/sdb)
                               Blocks                     
Project ID       Used       Soft       Hard    Warn/Grace     
---------- -------------------------------------------------- 
#42            524288          0    1048576     00 [--------]

to specify only project ID 42, or

# xfs_quota -x -c 'report -U 100 -p' /mnt/test
Project quota on /mnt/test (/dev/sdb)
                               Blocks                     
Project ID       Used       Soft       Hard    Warn/Grace     
---------- -------------------------------------------------- 
#0                  0          0          0     00 [--------]
#42            524288          0    1048576     00 [--------]

to query the first 100.

If you want the mapping, you need to use the config files.
Comment 7 lejeczek 2015-08-11 04:00:21 EDT
would be great to have it in man pages what you've just said, explicitly, that without config files you cannot or that you must...
many thanks.
Comment 8 lejeczek 2015-09-08 05:26:26 EDT
also it seems other commands do nothing without config files: print, path.
Man pages say:
"Lists all paths with devices/project identifiers..."
but nothing.

I was hoping xfs could do alot without config files but that's not the case, right?
Eg. how to get details of project quota, its paths?
Comment 9 Eric Sandeen 2015-09-08 11:19:11 EDT
Because Bugzilla is a bug reporting tool, it's really not the right place for general administration questions or support.

I'd suggest posting your questions to the public xfs mailing list at xfs@oss.sgi.com, and include your motivation for using the quota tools without the normal config files.

Thanks,
-Eric

Note You need to log in before you can comment on or make changes to this bug.