xfs_quota: cannot find mount point for path <path_name> : No such file or directory

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • XFS Filesystem

Issue

  • Getting 'xfs_quota: cannot find mount point for path' while setting project quota in xfs file system.
# xfs_quota -x -c 'project -s testproject'
xfs_quota: cannot find mount point for path `/xfs/temp': No such file or directory

Resolution

Project quota's primary purpose is to track and monitor disk usage for directories.

This error was printed since the actual path was not present, or did not exist.

[Example]

In this scenario, we are trying to set the limits for the /xfs/temp directory and the project name is testproject

  • Mount the xfs file system with prjquota
# mount| grep "/dev/mapper/myvg-mylv"
/dev/mapper/myvg-mylv on /xfs type xfs (rw,relatime,attr2,inode64,prjquota)
  • Add the directories project-controlled to /etc/projects.
# cat /etc/projects
15:/xfs/temp
  • Project names can be added to /etc/projid for mapping project IDs to project names.
# cat /etc/projid
testproject:15
  • Initialize its project directory using the following command:
#  xfs_quota -x -c 'project -s testproject'
xfs_quota: cannot find mount point for path `/xfs/temp': No such file or directory
Processed 0 (/etc/projects and cmdline) paths for project testproject with recursion depth infinite (-1).
Processed 0 (/etc/projects and cmdline) paths for project testproject with recursion depth infinite (-1).
Processed 0 (/etc/projects and cmdline) paths for project testproject with recursion depth infinite (-1).

Root Cause

The directory, for which quota was being set, was not present to begin with.

#  ls -ltr /xfs/temp
ls: cannot access /xfs/temp: No such file or directory

Diagnostic Steps

  • Verify the directory:
# ls -ltd /xfs/temp
drwxr-xr-x 2 root root 6 Jun  9 11:11 /xfs/temp
  • Then try to initialize the quota:
# xfs_quota -x -c 'project -s testproject'
Setting up project testproject (path /xfs/temp)...
Processed 1 (/etc/projects and cmdline) paths for project testproject with recursion depth infinite (-1).
Setting up project testproject (path /xfs/temp)...
Processed 1 (/etc/projects and cmdline) paths for project testproject with recursion depth infinite (-1).
Setting up project testproject (path /xfs/temp)...
Processed 1 (/etc/projects and cmdline) paths for project testproject with recursion depth infinite (-1).

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments