ZFS (and quota)

Johan Ström johan at stromnet.se
Thu Sep 20 15:44:50 PDT 2007


On Sep 20, 2007, at 11:26 , Dag-Erling Smørgrav wrote:

> 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.
>
[root at devbox /home/johan]# zfs list tank/set2
NAME        USED  AVAIL  REFER  MOUNTPOINT
tank/set2  9.15M   870K  9.15M  /tank/set2

Yes i did, but after 200 seconds one would think that 10Mbs should be  
filled (took 2.2s on the ufs) right? :)

> 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

With the  bs=65536 parameter it works as expected, I get Disk quota  
exceeded. Without it it just keeps on running until I interrupt it

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



More information about the freebsd-fs mailing list