I create a zfs volume pool/lhm and give it quota 1M use "zfs set quota=1m pool/lhm" #zfs get all pool/lhm zfs get all pool/lhm [ttyp0][5:22:12pm] NAME PROPERTY VALUE SOURCE pool/lhm type filesystem - pool/lhm creation Tue Oct 7 17:14 2008 - pool/lhm used 1.00M - pool/lhm available 0 - pool/lhm referenced 1.00M - pool/lhm compressratio 7.25x - pool/lhm mounted yes - pool/lhm quota 1M local pool/lhm reservation none default pool/lhm recordsize 128K default But I cp 10 files,per file size is 2.4M to pool/lhm #ll -h /pool/lhm total 1013 -rw------- 1 root wheel 2.4M Oct 7 17:18 d -rw------- 1 root wheel 2.4M Oct 7 17:19 dd -rw------- 1 root wheel 2.4M Oct 7 17:19 ddd -rw------- 1 root wheel 2.4M Oct 7 17:19 dddd -rw------- 1 root wheel 2.4M Oct 7 17:19 ddddd -rw------- 1 root wheel 2.4M Oct 7 17:19 dddddd -rw------- 1 root wheel 2.4M Oct 7 17:19 dddddd2 -rw------- 1 root wheel 2.4M Oct 7 17:19 dddddd24 -rw------- 1 root wheel 2.1M Oct 7 17:19 dddddd247 -rw------- 1 root wheel 2.4M Oct 7 17:18 kldstat.core #du -hs /pool/lhm 1.0M . I am puzzled,the what's zfs quota mean? I understand is file quota,that can't put files which total size larger than 1M. But it seems my understanding is wrong. Anybody give a idea?
My system #uname -a FreeBSD bxzxfreebsd.slof.com 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #4: Mon Oct 6 15:02:42 CST 2008 root@bxzxfreebsd.slof.com:/usr/obj/usr/src/sys/lhmwzy amd64 zfs version: ZFS filesystem version 6 ZFS storage pool version 6
On Tue, Oct 07, 2008 at 05:32:43PM +0800, lhmwzy wrote:> I create a zfs volume pool/lhm and give it quota 1M use "zfs set > quota=1m pool/lhm" > > #zfs get all pool/lhm > zfs get all pool/lhm > [ttyp0][5:22:12pm] > NAME PROPERTY VALUE SOURCE > pool/lhm type filesystem - > pool/lhm creation Tue Oct 7 17:14 2008 - > pool/lhm used 1.00M - > pool/lhm available 0 - > pool/lhm referenced 1.00M - > pool/lhm compressratio 7.25x - > pool/lhm mounted yes - > pool/lhm quota 1M local > pool/lhm reservation none default > pool/lhm recordsize 128K default > > But I cp 10 files,per file size is 2.4M to pool/lhm > #ll -h /pool/lhm > total 1013 > -rw------- 1 root wheel 2.4M Oct 7 17:18 d > -rw------- 1 root wheel 2.4M Oct 7 17:19 dd > -rw------- 1 root wheel 2.4M Oct 7 17:19 ddd > -rw------- 1 root wheel 2.4M Oct 7 17:19 dddd > -rw------- 1 root wheel 2.4M Oct 7 17:19 ddddd > -rw------- 1 root wheel 2.4M Oct 7 17:19 dddddd > -rw------- 1 root wheel 2.4M Oct 7 17:19 dddddd2 > -rw------- 1 root wheel 2.4M Oct 7 17:19 dddddd24 > -rw------- 1 root wheel 2.1M Oct 7 17:19 dddddd247 > -rw------- 1 root wheel 2.4M Oct 7 17:18 kldstat.core > > #du -hs /pool/lhm > 1.0M . > > I am puzzled,the what's zfs quota mean? > I understand is file quota,that can't put files which total size larger than 1M. > But it seems my understanding is wrong. > Anybody give a idea?I can confirm and reproduce what you're seeing. Based on all of the ZFS documentation and examples I've read, it appears to be a bug in FreeBSD ZFS. CC'ing pjd@, who maintains ZFS on FreeBSD. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |
On Tue, Oct 07, 2008 at 05:32:43PM +0800, lhmwzy wrote:> I create a zfs volume pool/lhm and give it quota 1M use "zfs set > quota=1m pool/lhm"according to zfs manpage: Quotas cannot be set on volumes, as the "volsize" property acts as an implicit quota. Aditionally, I see you're using compression, so a 2.4M file might not use up that much space. Compressration 7.25x> #zfs get all pool/lhm > zfs get all pool/lhm > [ttyp0][5:22:12pm] > NAME PROPERTY VALUE SOURCE > pool/lhm type filesystem - > pool/lhm creation Tue Oct 7 17:14 2008 - > pool/lhm used 1.00M - > pool/lhm available 0 - > pool/lhm referenced 1.00M - > pool/lhm compressratio 7.25x - > pool/lhm mounted yes - > pool/lhm quota 1M local > pool/lhm reservation none default > pool/lhm recordsize 128K defaultIf you find this answer helpful, donate money to some children help fund :-) Regards, Holger Kipp
On Tue, Oct 07, 2008 at 02:54:37AM -0700, Jeremy Chadwick wrote:> On Tue, Oct 07, 2008 at 05:32:43PM +0800, lhmwzy wrote: > > I create a zfs volume pool/lhm and give it quota 1M use "zfs set > > quota=1m pool/lhm" > > > > #zfs get all pool/lhm > > zfs get all pool/lhm > > [ttyp0][5:22:12pm] > > NAME PROPERTY VALUE SOURCE > > pool/lhm type filesystem - > > pool/lhm creation Tue Oct 7 17:14 2008 - > > pool/lhm used 1.00M - > > pool/lhm available 0 - > > pool/lhm referenced 1.00M - > > pool/lhm compressratio 7.25x -Turn compression off and retry. -- Pawel Jakub Dawidek http://www.wheel.pl pjd@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-stable/attachments/20081007/d5875efb/attachment.pgp