kern/172197: Userquota (as well as groupquota) does not work on ZFS
(possible regression)
Derek Kulinski
takeda at takeda.tk
Mon Oct 1 03:00:22 UTC 2012
>Number: 172197
>Category: kern
>Synopsis: Userquota (as well as groupquota) does not work on ZFS (possible regression)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Oct 01 03:00:21 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Derek Kulinski
>Release: FreeBSD 9.0
>Organization:
>Environment:
FreeBSD chinatsu.takeda.tk 9.0-RELEASE-p4 FreeBSD 9.0-RELEASE-p4 #2: Sun Sep 30 17:10:32 PDT 2012 root at chinatsu.takeda.tk:/usr/obj/tank/junk/src/sys/CHINATSU amd64
>Description:
I actually just started uzing ZFS since version 9 and seeing some communication on mailing lists, looks like this behavior is incorrect.
Here's an example:
[chinatsu]:/root# zfs userspace tank
TYPE NAME USED QUOTA
POSIX User root 6K none
[chinatsu]:/root# zfs set userquota at takeda=5M tank
[chinatsu]:/root# zfs userspace tank
TYPE NAME USED QUOTA
POSIX User root 6K none
POSIX User takeda 5M
Please note that the above command updated USED value and not quota. As I show later the USED value is not updated based on storage usage and the quota is not enforced at all. I don't think it is necessary, but I also compiled the kernel with "options QUOTA".
[chinatsu]:/root# zfs set userquota at takeda=100M tank
[chinatsu]:/root# zfs userspace tank
TYPE NAME USED QUOTA
POSIX User root 6K none
POSIX User takeda 100M
[chinatsu]:/root# zfs set userquota at takeda=1000P tank
[chinatsu]:/root# zfs userspace tank
TYPE NAME USED QUOTA
POSIX User root 6K none
POSIX User takeda 1000P
[chinatsu]:/root# zfs set userquota at takeda=1M tank
[chinatsu]:/root# su - takeda
➜ ~ dd if=/dev/urandom bs=512k count=10 of=testfile1
10+0 records in
10+0 records out
5242880 bytes transferred in 0.433006 secs (12108105 bytes/sec)
➜ ~ dd if=/dev/urandom bs=512k count=10 of=testfile2
10+0 records in
10+0 records out
5242880 bytes transferred in 0.072985 secs (71835100 bytes/sec)
➜ ~ ls -lh testfile*
-rw-r--r-- 1 takeda users 5,0M 30 wrz 19:50 testfile1
-rw-r--r-- 1 takeda users 5,0M 30 wrz 19:50 testfile2
➜ ~
[chinatsu]:/root# zfs userspace tank
TYPE NAME USED QUOTA
POSIX User root 6K none
POSIX User takeda 1M
>How-To-Repeat:
Perform the steps described in description.
>Fix:
I know too little to recommend anything.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list