Date: Thu, 20 Sep 2007 14:28:45 +0200 From: =?ISO-8859-1?Q?Johan_Str=F6m?= <johan@stromnet.se> To: Pawel Jakub Dawidek <pjd@FreeBSD.org> Cc: freebsd-fs@freebsd.org Subject: Re: ZFS (and quota) Message-ID: <8B5FB4B1-2398-491C-95F4-E79361606916@stromnet.se> In-Reply-To: <20070920115621.GF4517@garage.freebsd.pl> References: <BE54DA53-0353-4EB3-B232-6A7193522582@stromnet.se> <20070920115621.GF4517@garage.freebsd.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sep 20, 2007, at 13:56 , Pawel Jakub Dawidek wrote: > On Thu, Sep 20, 2007 at 12:31:56AM +0200, Johan Str=F6m 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@devbox /tank]# zfs create tank/set2 >> [root@devbox /tank/set2]# zfs set quota=3D10M tank/set2 >> [root@devbox /tank/set2]# zfs get quota tank/set2 >> NAME PROPERTY VALUE SOURCE >> tank/set2 quota 10M local >> [root@devbox /tank/set2]# dd if=3D/dev/urandom of=3Dtest >> ^C >> 18563+0 records in >> 18562+0 records out >> 9503744 bytes transferred in 199.564353 secs (47622 bytes/sec) >> [root@devbox /tank/set2]# zfs list tank/set2 >> NAME USED AVAIL REFER MOUNTPOINT >> 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=3D10m tank/foo > > beast:root:~# dd if=3D/dev/random of=3D/tank/foo/test bs=3D1m > 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! You where correct :) [root@devbox /tank/set2]# dd if=3D/dev/urandom of=3Dtest2 dd: test2: Disc quota exceeded 1538+0 records in 1537+0 records out 786944 bytes transferred in 202.628064 secs (3884 bytes/sec) But the last day i ran it for at least 300 seconds wihtout having a =20 stop.. When i did it on UFS it took 2 seconds to fill up altogether, =20 with zfs it keept on going much longer? Retested: [root@devbox /tank/set3vol]# ls -al total 6 drwxr-xr-x 3 root wheel 512 Sep 20 14:16 . drwxr-xr-x 5 root wheel 5 Sep 20 00:22 .. drwxrwxr-x 2 root operator 512 Sep 20 00:21 .snap [root@devbox /tank/set3vol]# dd if=3D/dev/urandom of=3Dtest /tank/set3vol: write failed, filesystem is full dd: test: No space left on device 19169+0 records in 19168+0 records out 9814016 bytes transferred in 2.176188 secs (4509728 bytes/sec) [root@devbox /tank/set3vol]# cd ../set2/ [root@devbox /tank/set2]# ls -al total 3 drwxr-xr-x 2 root wheel 2 Sep 20 14:16 . drwxr-xr-x 5 root wheel 5 Sep 20 00:22 .. [root@devbox /tank/set2]# dd if=3D/dev/urandom of=3Dtest dd: test: Disc quota exceeded 20226+0 records in 20225+0 records out 10355200 bytes transferred in 456.448610 secs (22686 bytes/sec) [root@devbox /tank/set2]# df -h Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1a 496M 174M 282M 38% / devfs 1.0K 1.0K 0B 100% /dev /dev/ad0s1e 496M 28K 456M 0% /tmp /dev/ad0s1f 5.0G 2.8G 1.8G 61% /usr /dev/ad0s1d 1.2G 105M 1.0G 9% /var tank 37G 0B 37G 0% /tank tank/set1 37G 0B 37G 0% /tank/set1 /dev/zvol/tank/set3vol 9.4M 9.4M -728K 108% /tank/set3vol tank/set2 10M 10M 0B 100% /tank/set2 [root@devbox /tank/set2]# On UFS 2.1 sec (altough disk full, not quota full), on ZFS 450sec. > > --=20 > Pawel Jakub Dawidek http://www.wheel.pl > pjd@FreeBSD.org http://www.FreeBSD.org > FreeBSD committer Am I Evil? Yes, I Am!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8B5FB4B1-2398-491C-95F4-E79361606916>