HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Why "du -sH" is listing higher filder/file size then actual filisystem size (reported by BDF)???

 
Bishwajit Kumar
Frequent Advisor

Why "du -sH" is listing higher filder/file size then actual filisystem size (reported by BDF)???

Why "du -sH" is listing higher filder/file size then actual filisystem size (reported by BDF)???


# ls
stream1 stream10 stream11 stream12 stream13 stream14 stream15 stream16 stream2 stream3 stream4 stream5 stream6 stream7 stream8 stream9
# ll
total 256
drwxr-xr-x 12 root sys 8192 Sep 30 16:06 stream1
drwxr-xr-x 12 root sys 8192 Oct 4 17:32 stream10
drwxr-xr-x 12 root sys 8192 Oct 4 18:57 stream11
drwxr-xr-x 12 root sys 8192 Oct 4 20:19 stream12
drwxr-xr-x 12 root sys 8192 Oct 4 21:42 stream13
drwxr-xr-x 12 root sys 8192 Oct 4 23:13 stream14
drwxr-xr-x 12 root sys 8192 Oct 5 00:47 stream15
drwxr-xr-x 12 root sys 8192 Oct 5 02:49 stream16
drwxr-xr-x 12 root sys 8192 Sep 30 17:45 stream2
drwxr-xr-x 12 root sys 8192 Sep 30 19:22 stream3
drwxr-xr-x 12 root sys 8192 Sep 30 21:00 stream4
drwxr-xr-x 12 root sys 8192 Sep 30 22:40 stream5
drwxr-xr-x 12 root sys 8192 Oct 1 00:21 stream6
drwxr-xr-x 12 root sys 8192 Oct 1 02:20 stream7
drwxr-xr-x 12 root sys 8192 Oct 1 04:22 stream8
drwxr-xr-x 12 root sys 8192 Oct 4 16:03 stream9
# du -sH *
367214048 stream1
367214048 stream10
367214048 stream11
367214048 stream12
367214064 stream13
367214048 stream14
367214048 stream15
367214048 stream16
367214048 stream2
367214048 stream3
367214048 stream4
367214048 stream5
367214048 stream6
367214048 stream7
365863504 stream8
367214064 stream9
# du -sH /data/data
5874074272 /data/data
# sync
# du -sH /data/data/
5874074272 /data/data/
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 280821760 169193640 110756072 60% /
/dev/vg00/lvol1 1835008 346928 1476528 19% /stand
/dev/vg01/lvol1 3071934464 2937399912 133483552 96% /data
orca45:/data/col1/qaia48
45312615936 11476915200 33835700736 25% /orca45
# date
Tue Oct 5 11:20:42 PDT 2010
#


But HP-DP reports correct size for each directory.


[Normal] From: VBDA@qaia48.chaos.local "/data:D13" Time: 10/5/2010 11:19:39 AM
Filesystem Statistics:

Directories ........ 11
Regular files ...... 1291
Symbolic links ..... 0
SYSV FIFOs ......... 0
BSD sockets ........ 0
Block Devices ...... 0
Character Devices .. 0
Unknown Objects .... 0
------------------------------
Objects Total ...... 1302
Total Size ......... 175.10 GB

Session Queuing Time (hours) 0.00
-------------------------------------------
Completed Disk Agents ........ 8
Failed Disk Agents ........... 0
Aborted Disk Agents .......... 0
-------------------------------------------
Disk Agents Total ........... 8
===========================================
Completed Media Agents ....... 8
Failed Media Agents .......... 0
Aborted Media Agents ......... 0
-------------------------------------------
Media Agents Total .......... 8
===========================================
Mbytes Total ................. 1434400 MB
Used Media Total ............. 0
Disk Agent Errors Total ...... 0


============================================================================
Session completed successfully!
============================================================================


[Normal] From: VBDA@qaia48.chaos.local "/data:D4" Time: 10/5/2010 11:20:01 AM
Filesystem Statistics:

Directories ........ 11
Regular files ...... 1291
Symbolic links ..... 0
SYSV FIFOs ......... 0
BSD sockets ........ 0
Block Devices ...... 0
Character Devices .. 0
Unknown Objects .... 0
------------------------------
Objects Total ...... 1302
Total Size ......... 175.10 GB


Backup Statistics:

Session Queuing Time (hours) 0.00
-------------------------------------------
Completed Disk Agents ........ 8
Failed Disk Agents ........... 0
Aborted Disk Agents .......... 0
-------------------------------------------
Disk Agents Total ........... 8
===========================================
Completed Media Agents ....... 8
Failed Media Agents .......... 0
Aborted Media Agents ......... 0
-------------------------------------------
Media Agents Total .......... 8
===========================================
Mbytes Total ................. 1433741 MB
Used Media Total ............. 0
Disk Agent Errors Total ...... 0


============================================================================
Session completed successfully!
============================================================================
3 REPLIES
Bishwajit Kumar
Frequent Advisor

Re: Why "du -sH" is listing higher filder/file size then actual filisystem size (reported by BDF)???

BTY i am talking about HP-UX 11i v3 IA


# uname -a
HP-UX qaia48 B.11.31 U ia64 1810519790 unlimited-user license
#
Jim Walls
Trusted Contributor

Re: Why "du -sH" is listing higher filder/file size then actual filisystem size (reported by BDF)???

I don't know what -H gives on a 11.31 system... however, in earlier HP-UX versions, du returns the number of 512-byte blocks by default and the number of 1024-byte blocks if -k is specified.

5874074272 / 2 = 2,937,037,136

... which is very close to what bdf reports as kb Used.

You can expect to see the bdf usage reported as higher than actual the data occupancy because it takes account of file system overheads for inodes.
Bishwajit Kumar
Frequent Advisor

Re: Why "du -sH" is listing higher filder/file size then actual filisystem size (reported by BDF)???

I see!!!


# du -sk /data/data/stream*
183607024 /data/data/stream1
183607024 /data/data/stream10
183607024 /data/data/stream11
183607024 /data/data/stream12
183607032 /data/data/stream13
183607024 /data/data/stream14
183607024 /data/data/stream15
183607024 /data/data/stream16
183607024 /data/data/stream2
183607024 /data/data/stream3
183607024 /data/data/stream4
183607024 /data/data/stream5
183607024 /data/data/stream6
183607024 /data/data/stream7
182931752 /data/data/stream8
183607032 /data/data/stream9
# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 280821760 169192880 110756808 60% /
/dev/vg00/lvol1 1835008 346928 1476528 19% /stand
/dev/vg01/lvol1 3071934464 2937399912 133483552 96% /data
orca45:/data/col1/qaia48
45312615936 14124685824 31187930112 31% /orca45
#

------------------>
#man du

NAME
du - summarize disk usage

SYNOPSIS
du [-a|-s] [-bkrx] [-H|-L] [-t type] [name]...


Options
The du command recognizes the following options:

-a Print entries for each file encountered in the
directory hierarchies in addition to the normal
output.

-b For each name operand that is a directory for
which file system swap has been enabled, print the
number of blocks the swap system is currently
using.

-H If a symbolic link is specified on the command
line, du will count the size of the file or file
hierarchy referenced by the link. Unlike the -L
option, it will not follow symbolic links
encountered during the traversal of the directory
hierarchy.

-k Gives the block count in 1024-byte blocks.

-L If a symbolic link is specified on the command
line or encountered during the traversal of a file
hierarchy, du will count the size of the file or
file hierarchy referenced by the link.

-r Print messages about directories that cannot be
read, files that cannot be accessed, and so on.
du is normally silent about such conditions.

Hewlett-Packard Company - 1 - HP-UX 11i Version 3 Feb 2007

du(1) du(1)

-s Print only the grand total of disk usage for each
of the specified name operands.

-t type Restrict reporting to file systems of the
specified type. (Example values for type are hfs,
cdfs, nfs, and so on.) Multiple -t type options
can be specified. Disk usage is normally reported
for the entire directory hierarchy below each of
the given name operands.


-x Restrict reporting to only those files that have
the same device as the file specified by the name
operand. Disk usage is normally reported for the
entire directory hierarchy below each of the given
name operands.



<------------------

i though "du -sH" in is equivalent to "du -sh" in Linux.

hmmm.

Thanks for the answer.