Bug 1251456
| Summary: | quota without config files and report projects shows nothing | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | lejeczek <peljasz> |
| Component: | xfsprogs | Assignee: | Eric Sandeen <esandeen> |
| Status: | CLOSED NOTABUG | QA Contact: | Filesystem QE <fs-qe> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.1 | CC: | peljasz |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-08-11 04:28:56 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
lejeczek
2015-08-07 10:52:32 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 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 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. 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. 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.
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. 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? 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 |