VxFS: file size discrepancy; du -sk versus ls -las

book

Article ID: 100026044

calendar_today

Updated On:

Cause

The "du -sk" command will show the actual space used for the file ( x 1024)

The ls -las command shows both the space used  (x 512) and file size

The reason for the large discrepancy is additional space that is "reserved" for this file.

You can see this with the "getext" command:

# /opt/VRTS/bin/getext   /data/cbpdbpre/MITPRE/oradata_01/large_data01.dbf
/data/cbpdbpre/MITPRE/oradata_01/large_data01.dbf: Bsize  1024  Reserve  921608  Extent Size       0

where there is the Reserve 921608 of 900 megabytes.

There reserve appears to have been set by the database.
 

Resolution

You can remove this reservation by using the "setext -r 0   command; for example:


# /opt/VRTS/bin/setext -r 0  /data/cbpdbpre/MITPRE/oradata_01/large_data01.dbf
 

-------We recommend consulting the DBA regarding this "dbf" file and why there is Reserve space for this file.
 

 

Applies To

VERSIONs  

HP-UX 11.23 

VxVM 5.0MP1RP6 

VxFS 5.0MP1RP5 

VCS 5.0MP1 

 

Issue/Introduction

System administrator is seeking explanation for the file size discrepancy for Oracle dbf file........... # du -sk /data/cbpdbpre/MITPRE/oradata_01/large_data01.dbf
921616 /data/cbpdbpre/MITPRE/oradata_01/large_data01.dbf and # ls -las /data/cbpdbpre/MITPRE/oradata_01/large_data01.dbf
1843232 -rw-r----- 1 oracle dba 10493952 Jan 20 where the du -sk command reveals 921616k or 943734784 bytes (900M) and the ls -la command reveals as smaller 10493952 bytes (10M).