[zfs-discuss] zfs showing more filesystem using ls than df actually has
Platform T2000 SunOS ccluatdwunix1 5.10 Generic_125100-10 sun4v sparc SUNW,Sun-Fire-T200 I have a user that stated zfs is allocating more file system space than actually available via ls command versus what df -k shows. He stated he used the mkfile to verify if ZFS quota was working. He executes ls -s to report usage which reports more allocated than available from df -k. This is an Oracle data file. Searching sunsolve and other resources I found: Bug ID: 4945020 Title:zfs quota's can be exceeded and Bug ID: 6339482 Title: 'df -F zfs dataset return the wrong result That I believe to be related to this issue. Has anyone seen this before and do you have a workaround and information and advice to share. # df -k Filesystemkbytesused avail capacity Mounted on /dev/dsk/c0t1d0s013283479 10825523 232512283%/ /devices 0 0 0 0%/devices ctfs 0 0 0 0%/system/contract proc 0 0 0 0%/proc mnttab 0 0 0 0%/etc/mnttab swap 41621601368 4160792 1%/etc/svc/volatile objfs 0 0 0 0%/system/object fd 0 0 0 0%/dev/fd swap 4160904 112 4160792 1%/tmp swap 4160880 88 4160792 1%/var/run poolZ2048000 105531 1839988 6%/mountpoint1 mypool 4096512 717015 337940518%/mypool newpool 1007616 120014 88751812%/newpool poolA 166912 24 158447 1%/poolA poola 65024 24 64938 1%/poola testpool 1007616 26 802611 1%/testpool testpool/usr 1007616 204881 80261121%/testpool/usr zfszone 471040 210344 26037745%/zfszone /vol/dev/dsk/c0t6d0/sol_10_305_sparc/s5 30 4 2415% /cdrom/sol_10_305_sparc/s5 /vol/dev/dsk/c0t6d0/sol_10_305_sparc/s4 30 4 2415% /cdrom/sol_10_305_sparc/s4 /vol/dev/dsk/c0t6d0/sol_10_305_sparc/s3 30 4 2415% /cdrom/sol_10_305_sparc/s3 /vol/dev/dsk/c0t6d0/sol_10_305_sparc/s2 30 4 2415% /cdrom/sol_10_305_sparc/s2 /vol/dev/dsk/c0t6d0/sol_10_305_sparc/s1 123246 111938 0 100% /cdrom/sol_10_305_sparc/s1 /vol/dev/dsk/c0t6d0/sol_10_305_sparc/s0 2852064 2852064 0 100% /cdrom/sol_10_305_sparc/s0 newsystem# ls -l total 419746 drwxr-xr-x 2 root root 512 Feb 26 2007 10g drwx-- 2 root root 512 Feb 19 2007 DeadLetters drwxr-xr-x 2 root root 512 Feb 26 2007 FULL drwx-- 2 root root 512 Feb 19 2007 Mail drwxrwxrwx 3 root root 512 Apr 13 2007 SAVE drwxr-xr-x 3 root root 512 Apr 13 2007 SUN_Solaris_10_0606 drwxr-xr-x 3 root root 512 May 16 2007 TEST drwxr-xr-x 2 root root 512 May 24 2007 TESTDIR drwxr-xr-x 2 root other512 Feb 19 2007 TT_DB drwxrwxrwx 2 root root 512 Jul 23 13:06 a drwxr-xr-x 2 root root 512 Jul 23 17:04 apple dr-xr-xr-x 2 root root 512 Jan 17 2007 apps dr-xr-xr-x 2 root root 512 Jan 17 2007 appsc drwxr-xr-x 2 root root 512 Jul 23 16:11 b drwxr-xr-x 2 root root 512 Jun 5 2007 backup drwxr-xr-x 2 root root 512 Apr 11 2007 barry drwxr-xr-x 2 root root 512 Feb 7 2007 bigdir lrwxrwxrwx 1 root root 9 Jan 17 2007 bin - ./usr/bin drwxr-xr-x 2 root root 512 Jul 23 16:39 c dr-xr-xr-x 2 root root 512 Jan 17 2007 cadds drwxr-xr-x 3 root root 512 Dec 18 16:21 cdrom drwxr-xr-x 2 root root 512 Apr 10 2007 cdtest -rw--- 1 root root 4997302 Jul 12 16:45 core dr-xr-xr-x 2 root root 512 Jan 17 2007 cws dr-xr-xr-x 2 root root 512 Jan 17 2007 dat dr-xr-xr-x 2 root root 512 Jan 17 2007 db drwxr-xr-x 21 root sys 4608 Dec 18 16:21 dev drwxr-xr-x 2 root sys 512 Dec 18 16:20 devices dr-xr-xr-x 2 root root 512 Jan 17 2007 devl dr-xr-xr-x 2 root root 512 Jan 17 2007 dhpg drwxrwxrwx 3 root root 512 Jun 21 2007 dir3 drwxr-xr-x 2 root root 512 Jun 21 2007 dir5 drwxrwxrwx 4 root root 512 Oct 3 13:14 dnadir dr-xr-xr-x 2 root root 512 Jan 17 2007 doe dr-xr-xr-x 2 root root 512 Jan 17 2007 dteast -rw-r--r-- 1 root root 838656 Mar 26 2007 dumpevolution -rw-r--r-- 1 root root 553 Apr 4 2007 dumpmyzone -rw-r--r-- 1 root
Re: [zfs-discuss] zfs showing more filesystem using ls than df actually has
Jill Manfield wrote: Platform T2000 SunOS ccluatdwunix1 5.10 Generic_125100-10 sun4v sparc SUNW,Sun-Fire-T200 I have a user that stated zfs is allocating more file system space than actually available via ls command versus what df -k shows. Here's the same file on UFS and on ZFS with different record size. du shows different space consumption. Here's the file on UFS: -rw--- 1 root root 139733 Jan 24 17:38 /foo.txt 152K /foo.txt Here is the file on ZFS with records size of 128K, 512 bytes, and 8K (I think this is the UFS default block size). -rw--- 1 root root 139733 Jan 24 17:42 /tank/big/foo.txt 258K /tank/big/foo.txt -rw--- 1 root root 139733 Jan 24 17:42 /tank/small/foo.txt 168K /tank/small/foo.txt -rw--- 1 root root 139733 Jan 24 17:44 /tank/ufssize/foo.txt 147K /tank/ufssize/foo.txt I think that's what your customer is seeing. CT ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss