ZFS (and quota)

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu Sep 20 23:57:18 PDT 2007

On Thu, Sep 20, 2007 at 12:31:56AM +0200, Johan Ström wrote:
> Hello
> I just installed FreeBSD-current on a box (actually upgraded 6.2 to - 
> current) to experiment a bit.
> I was playing around with ZFS a bit and tried out the quota features.  
> While doing this I noticed that it doesnt seem like you get a "disk  
> full" notice the same way as you do on a "normal" (UFS) filesystem.  
> Instead of aborting the operation with "No space left on device" it  
> just continued:
> [root at devbox /tank]# zfs create tank/set2
> [root at devbox /tank/set2]# zfs set quota=10M tank/set2
> [root at devbox /tank/set2]# zfs get quota tank/set2
> tank/set2  quota     10M        local
> [root at devbox /tank/set2]# dd if=/dev/urandom of=test
> ^C
> 18563+0 records in
> 18562+0 records out
> 9503744 bytes transferred in 199.564353 secs (47622 bytes/sec)
> [root at devbox /tank/set2]# zfs list tank/set2
> tank/set2  9.15M   870K  9.15M  /tank/set2
> No hard stop there, it just tries to write more and more and more..  
> Well the quota is enforced fine but shouldnt there be some more hard  
> error? I'm not sure how regular UFS quotas work though since I never  
> used them, but this seems like strange behaviour.

Hmm, seems to work just fine here:

	beast:root:~# zfs create tank/foo
	beast:root:~# zfs set quota=10m tank/foo

	beast:root:~# dd if=/dev/random of=/tank/foo/test bs=1m
	dd: /tank/foo/test: Disc quota exceeded
	11+0 records in
	10+0 records out
	10485760 bytes transferred in 6.109407 secs (1716330 bytes/sec)

	beast:root:~# df -h /tank/foo
	Filesystem    Size    Used   Avail Capacity  Mounted on
	tank/foo       10M     10M      0B   100%    /tank/foo

I think you just waited not long enough:) You didn't give block size
argument to dd(1), so it used 512 bytes. Please be more patient, retry
and report back, thanks!

Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20070921/ac707d77/attachment.pgp

More information about the freebsd-fs mailing list