Jill Manfield
2008-Jan-24 16:45 UTC
[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
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t1d0s0 13283479 10825523 2325122 83% /
/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 4162160 1368 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
poolZ 2048000 105531 1839988 6% /mountpoint1
mypool 4096512 717015 3379405 18% /mypool
newpool 1007616 120014 887518 12% /newpool
poolA 166912 24 158447 1% /poolA
poola 65024 24 64938 1% /poola
testpool 1007616 26 802611 1% /testpool
testpool/usr 1007616 204881 802611 21% /testpool/usr
zfszone 471040 210344 260377 45% /zfszone
/vol/dev/dsk/c0t6d0/sol_10_305_sparc/s5
30 4 24 15%
/cdrom/sol_10_305_sparc/s5
/vol/dev/dsk/c0t6d0/sol_10_305_sparc/s4
30 4 24 15%
/cdrom/sol_10_305_sparc/s4
/vol/dev/dsk/c0t6d0/sol_10_305_sparc/s3
30 4 24 15%
/cdrom/sol_10_305_sparc/s3
/vol/dev/dsk/c0t6d0/sol_10_305_sparc/s2
30 4 24 15%
/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 other 512 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 root 335 Oct 3 10:33 dumpnewzone
-rw-r--r-- 1 root root 493 Nov 12 14:31 dumpzone1
-rw-r--r-- 1 root root 459 Aug 24 09:43 dumpzone2
-rw-r--r-- 1 root root 358 Aug 23 08:57 dumpzoneinfo
drwxr-xr-x 84 root sys 5120 Dec 21 11:31 etc
drwx------ 7 root root 512 Mar 26 2007 evolution
-rw-r--r-- 1 root root 15 Oct 3 13:24 exclude-file
drwxr-xr-x 8 root sys 512 Aug 20 12:17 export
drwxr-xr-x 2 root root 512 Jul 23 17:06 f
-rwxr-xr-x 1 root root 5051 Apr 5 2007 fix-zone-script
-rwxr-xr-x 1 root root 5050 Apr 5 2007 fix_pkgmap
-rwxrwxrwx 1 root root 25430 May 30 2007 flar-10-sparc.profile
drwxr-xr-x 2 root root 512 Mar 9 2007 free
dr-xr-xr-x 1 root root 1 Dec 18 16:21 home
drwxrwxrwx 8 root root 512 Dec 14 10:20 home1
drwxr-xr-x 2 root root 512 Dec 14 10:20 home2
dr-xr-xr-x 2 root root 512 Jan 17 2007 hpc
dr-xr-xr-x 2 root root 512 Jan 17 2007 import
dr-xr-xr-x 2 root root 512 Jan 17 2007 java
dr-xr-xr-x 2 root root 512 Jan 17 2007 jini
dr-xr-xr-x 2 root root 512 Jan 17 2007 js
drwxr-xr-x 15 root sys 512 Oct 3 10:50 kernel
dr-xr-xr-x 2 root root 512 Jan 17 2007 lab
drwxr-xr-x 7 root bin 5632 Oct 3 11:08 lib
-rw-r--r-- 1 root root 0 Feb 12 2007 logfile
drwx------ 2 root root 8192 Jan 17 2007 lost+found
dr-xr-xr-x 2 root root 512 Jan 17 2007 mail
drwxr-xr-x 3 root root 512 Apr 13 2007 mail3
drwxr-xr-x 2 root sys 512 Jan 17 2007 mnt
drwxr-xr-x 3 root sys 4 Aug 21 16:49 mountpoint1
lrwxrwxrwx 1 root root 5 Jun 21 2007 mylink -> /dir5
drwxr-xr-x 4 root sys 5 Sep 12 14:45 mypool
dr-xr-xr-x 1 root root 1 Dec 18 16:21 net
-rw-r--r-- 1 root root 553 Apr 4 2007 newdump
drwxr-xr-x 5 root sys 10 Aug 21 16:51 newpool
drwxr-xr-x 6 root sys 512 Oct 16 10:35 opt
dr-xr-xr-x 2 root root 512 Jan 17 2007 ora
drwxr-xr-x 3 root root 512 Mar 9 2007 pa-cdac2
d--------- 7 root root 512 May 24 2007 patches
dr-xr-xr-x 2 root root 512 Jan 17 2007 pcnet
dr-xr-xr-x 2 root root 512 Jan 17 2007 pkg
drwxr-xr-x 53 root sys 2048 Feb 12 2007 platform
drwxr-xr-x 2 root sys 2 Jun 25 11:20 poolA
drwxr-xr-x 2 root sys 3 Aug 21 12:45 poola
dr-xr-xr-x 2 root root 512 Jan 17 2007 pos
dr-xr-xr-x 143 root root 128192 Dec 21 14:12 proc
dr-xr-xr-x 2 root root 512 Jan 17 2007 proj
-rw-r--r-- 1 root root 0 Dec 14 10:25 quotas
dr-xr-xr-x 2 root root 512 Jan 17 2007 release
dr-xr-xr-x 2 root root 512 Jan 17 2007 sac
drwxr-xr-x 2 root sys 1024 Oct 3 11:08 sbin
-rw-r--r-- 1 root root 26 Dec 6 13:56 script
dr-xr-xr-x 2 root root 512 Jan 17 2007 set
dr-xr-xr-x 2 root root 512 Jan 17 2007 share
dr-xr-xr-x 2 root root 512 Jan 17 2007 shared
-rw-r--r-- 1 root root 140 Aug 24 15:22 smc_install_admin
-rw-r--r-- 1 root root 5314 Aug 24 15:22
smc_install_admin_s10.sh
-rw-r--r-- 1 root root 140 Aug 24 15:22 smc_nuke_admin
-rw-r--r-- 1 root root 1928 Aug 24 15:22 smc_nuke_admin_s10.sh
drwxr-xr-x 2 root root 512 May 22 2007 space
dr-xr-xr-x 2 root root 512 Jan 17 2007 src
drwxr-xr-x 2 root root 512 Jun 7 2007 swapdir
-rw------T 1 root root 209715200 Jun 19 2007 swapfile200m
drwxr-xr-x 4 root root 512 Jan 17 2007 system
drwxr-xr-x 2 root root 512 Jun 7 2007 temp
drwxr-xr-x 2 root root 512 Jan 24 2007 temp0
drwxr-xr-x 2 root root 512 Jan 24 2007 temp1
drwxr-xr-x 2 root root 512 Oct 9 15:22 tempy
drwxr-xr-x 3 root root 512 May 16 2007 test
drwxr-xr-x 2 root root 512 Oct 3 13:24 test1
-rw-r--r-- 1 root root 466 Feb 6 2007 test123
drwxr-xr-x 3 root sys 4 Oct 1 09:21 testpool
drwxr-xr-x 2 root root 512 Jun 25 11:02 testzfs
drwxrwxrwt 6 root sys 466 Dec 21 14:00 tmp
dr-xr-xr-x 2 root root 512 Jan 17 2007 tools
drwxr-xr-x 3 root root 512 Apr 4 2007 u01
drwxr-xr-x 2 root root 512 May 11 2007 u09
drwxr-xr-x 3 root root 512 Jul 3 12:05 u60
drwxr-xr-x 2 user6 root 512 Aug 3 16:11 user6
drwxr-xr-x 40 root sys 1024 Aug 2 09:49 usr
drwxr-xr-x 44 root sys 1024 Jul 12 16:47 var
dr-xr-xr-x 6 root root 512 Dec 18 16:21 vol
crw-r--r-- 1 root root 298, 0 Nov 7 14:42 vxspec at 0:0,raw
dr-xr-xr-x 2 root root 512 Jan 17 2007 wg
dr-xr-xr-x 2 root root 512 Jan 17 2007 workspace
dr-xr-xr-x 2 root root 512 Jan 17 2007 ws
drwx------ 5 root sys 5 Oct 3 12:37 zfszone
-rw-r--r-- 1 root root 459 Jul 20 17:11 zone2-dump
drwxr-xr-x 3 root root 512 Apr 23 2007 zonefs
drwx------ 5 root root 512 Jun 21 2007 zones
--
Jill Manfield
Technical Support Engineer
Sun Microsystems, Inc.
Operating Systems Technology Service Center
Email: jill.manfield at sun.com
Address: 1617 Southwood Drive Nashua,NH 03063
Mailstop: NSH-01- B287
Phone: 1-800-USA-4SUN (Reference your case number)
My Working Hours : 9am-6pm ET, Monday thru Friday
My Manager''s Email: joel.fontenot at sun.com x74110
==========================================TO REACH THE NEXT AVAILABLE ENGINEER:
1. Call 1-800-USA-4SUN choose opt 2 and enter your case number.
2. Wait for my voice mail message to begin.
3. Press "0" during my message to reach the next available engineer.
4. You will hear hold music until the next engineer answers.
=======================================================================Submit,
check and update tickets at http://www.sun.com/osc
=======================================================================This
email may contain confidential and privileged material for the sole
use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please
contact the sender and delete all copies.
========================================================================
Christine Tran
2008-Jan-24 23:15 UTC
[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