Answer the question
In order to leave comments, you need to log in
[[+content_image]]
Enabling disk quotas on xfs?
I can't figure out why I can't enable disk quotas on xfs using this description: " Learning Linux, 101: Managing Disk Quotas ".
System:
[[email protected] ~]# uname -a
Linux 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] ~]# cat /etc/fstab
proc /proc proc defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
/dev/md0 none swap sw 0 0
/dev/md1 /boot ext3 defaults 0 0
/dev/md2 / xfs defaults,usrquota,prjquota 0 0
[[email protected] ~]# mount
/dev/md2 on / type xfs (rw,usrquota,prjquota)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)
[[email protected] ~]# ls -l /quotatest/xfs/
total 0
drwxrwxrwx 2 u1 u1 6 Feb 23 14:47 proj-dir1/
drwxrwxrwx 2 u1 u1 6 Feb 23 14:47 proj-dir2/
[[email protected] ~]# cat /etc/projects
50:/quotatest/xfs/proj-dir1
[[email protected] ~]# cat /etc/projid
dev-projects:50
[[email protected] ~]# xfs_quota -x
xfs_quota> path
Filesystem Pathname
000 / /dev/disk/by-uuid/44ec9386-66b3-4779-889d-c341fd67193b
[001] /quotatest/xfs/proj-dir1 /dev/disk/by-uuid/44ec9386-66b3-4779-889d-c341fd67193b (project 50, dev-projects)
xfs_quota> project -s dev-projects
Setting up project dev-projects (path /quotatest/xfs/proj-dir1)...
Processed 1 (/etc/projects and cmdline) paths for project dev-projects with recursion depth infinite (-1).
xfs_quota> limit -p bhard=15m dev-projects
xfs_quota: cannot set limits: Function not implemented
xfs_quota>
Answer the question
In order to leave comments, you need to log in
Understood what was the matter. I'll post it for the future.
As I originally suspected, it was a quota limit for /. Enabling quotas for it via fstab just doesn't work. Therefore, you need to do this through the options to mount the root file system when booting through the rootflags flag. On debian, if the download goes through grub, then add / change /etc/default/grub (to enable project quotas):
GRUB_CMDLINE_LINUX="rootflags=prjquota"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question