ZFS (and quota)

Dag-Erling Smørgrav des at des.no
Thu Sep 20 14:15:33 PDT 2007


Johan Ström <johan at stromnet.se> writes:
> 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
> NAME       PROPERTY  VALUE      SOURCE
> 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
> NAME        USED  AVAIL  REFER  MOUNTPOINT
> tank/set2  9.15M   870K  9.15M  /tank/set2

See what it says under AVAIL?  You killed it before it filled the disk.

des at ds4 ~% sudo zfs create raid/q
des at ds4 ~% sudo zfs set quota=1m raid/q
des at ds4 ~% sudo dd if=/dev/zero of=/raid/q/test bs=65536
dd: /raid/q/test: Disc quota exceeded
16+0 records in
15+0 records out
983040 bytes transferred in 2.533990 secs (387942 bytes/sec)
des at ds4 ~% zfs list raid/q
NAME     USED  AVAIL  REFER  MOUNTPOINT
raid/q  1.03M      0  1.03M  /raid/q

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-fs mailing list