RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1251456 - quota without config files and report projects shows nothing
Summary: quota without config files and report projects shows nothing
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: xfsprogs
Version: 7.1
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact: Filesystem QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-07 10:52 UTC by lejeczek
Modified: 2015-09-08 15:19 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-11 04:28:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description lejeczek 2015-08-07 10:52:32 UTC
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 17:11:58 UTC
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 08:06:40 UTC
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 18:55:45 UTC
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 19:23:25 UTC
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 04:28:56 UTC
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 08:00:21 UTC
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 09:26:26 UTC
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 15:19:11 UTC
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.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.