My guess:
Discrepency between du and df on an empty filesystem. I suspect that it is the meta-data files. There are invisible files that hold information about the filesystem. These meta-data files are an important part of the WAFL filesystem. "df" might report space used by these files, while "du" probably won't.
Note, if the filesystem is "brand new" in the sense that a new filesystem was created with a floppy boot, then "df" will probably show less space than it would if the filesystem was simply deleted. This is because we fill in holes in the meta-data files as the filesystem fills up. In a new filesystem, these files are almost entirely holes. In a "removed" filesystem that used to be almost full, or held a lot of inodes or blocks, the space allocated to the meta-data files is probably still allocated.
Hope this helps.
Ken.
Brian Tao wrote:
I have four filers that are nearing production status, and the
hardware and software configurations were frozen this morning. To start everything fresh, I zeroed all the disks and recreated the filesystem on all four filers, untarred the 4.2a distribution, restored the rc, serialnum, hosts and hosts.equiv files, downloaded the boot code to the drives, and rebooted.
Once everyone was back online, I noticed there is a discrepancy
between 'df' and 'du' outputs. 'df' says 40MB are used on two of the filers, and 4.5MB on the other two. 'du' from the admin host consistently reports about 4MB used. Where is that space on adm1-na2 and adm1-na3 going? Old snapshots (which I've all deleted)? The only files ever to have lived on these filesystems are the OS-related ones in /etc. All option settings are the same, maxfiles is set to the default, etc.
|| admin# df -k /na1 /na2 /na3 /na4 || Filesystem kbytes used avail capacity Mounted on || adm1-na1:/ 33007568 4520 33003048 1% /na1 || adm1-na2:/ 33007568 40192 32967376 1% /na2 || adm1-na3:/ 33007568 40184 32967384 1% /na3 || adm1-na4:/ 33007568 4408 33003160 1% /na4 || || admin# du -sk /na1 /na2 /na3 /na4 || 4048 /na1 || 4048 /na2 || 4048 /na3 || 4048 /na4
|| admin# rsh adm1-na1 df || Filesystem kbytes used avail capacity Mounted on || / 33007568 4520 33003048 0% / || /.snapshot 0 0 0 ---% /.snapshot || || admin# rsh adm1-na2 df || Filesystem kbytes used avail capacity Mounted on || / 33007568 40192 32967376 0% / || /.snapshot 0 0 0 ---% /.snapshot || || admin# rsh adm1-na3 df || Filesystem kbytes used avail capacity Mounted on || / 33007568 40180 32967388 0% / || /.snapshot 0 0 0 ---% /.snapshot || || admin# rsh adm1-na4 df || Filesystem kbytes used avail capacity Mounted on || / 33007568 4404 33003164 0% / || /.snapshot 0 0 0 ---% /.snapshot
|| admin# rsh adm1-na1 snap list || working......... %/used %/total date name || .. || ---------- ---------- ------------ -------- || || admin# rsh adm1-na2 snap list || working.......... %/used %/total date name || . || ---------- ---------- ------------ -------- || || admin# rsh adm1-na3 snap list || working.......... %/used %/total date name || . || ---------- ---------- ------------ -------- || || admin# rsh adm1-na4 snap list || working........... %/used %/total date name || || ---------- ---------- ------------ -------- ||
-- Brian Tao (BT300, taob@netcom.ca) "Though this be madness, yet there is method in't"