Operating System - HP-UX
1748255 Members
4023 Online
108760 Solutions
New Discussion юеВ

FS/mount point sizes difference

 
SOLVED
Go to solution
irshad ali
Frequent Advisor

FS/mount point sizes difference

Hi Experts!

my backup team restored a FS's data from production server to application server after cleaning applicatoin server's FS.although the total allocated (shown in bdf) space on target (application) is more than source (production) yet this FS on application got 100% full. how? while the size of files on both the servers are showing same.

on production server-
host1:/>cd /prod/dwhdb/oradata8
host1:/prod/dwhdb/oradata8>bdf .
Filesystem kbytes used avail %used Mounted on
/dev/vg01/lv_data40
115343360 103849288 10775698 91% /prod/dwhdb/oradata8
host1:/prod/dwhdb/oradata8>ll
total 207607872
-rw-r----- 1 ora11g dba11g 31088189440 Oct 6 00:25 dwhdb_data07a.dbf
-rw-r----- 1 ora11g dba11g 29989281792 Oct 6 00:25 dwhdb_data07b.dbf
-rw-r----- 1 ora11g dba11g 32212262912 Nov 4 2009 dwhdb_temp01j.dbf
-rw-r----- 1 ora11g dba11g 21474844672 Nov 4 2009 dwhdb_temp01k.dbf
drwxrwx--- 2 ora11g dba11g 96 Apr 12 13:20 lost+found
-rw-r----- 1 ora11g dba11g 8589942784 Oct 6 05:10 undotbs01m.dbf
-rw-r----- 1 ora11g dba11g 5368717312 Oct 6 00:25 undotbs01n.dbf
-rw-r----- 1 ora11g dba11g 5368717312 Oct 6 00:25 undotbs01o.dbf
-rw-r----- 1 ora11g dba11g 5368717312 Oct 6 08:26 undotbs01p.dbf
-rw-r----- 1 ora11g dba11g 5368717312 Oct 6 00:25 undotbs01q.dbf
host1:/prod/dwhdb/oradata8>

ON APPLICATION SERVER-
host2:/>cd /prod/dwhdbqa/oradata8
host2:/prod/dwhdbqa/oradata8>bdf .
Filesystem kbytes used avail %used Mounted on
/dev/vg01/qa_data40
157286400 141490689 14808484 91% /prod/dwhdbqa/oradata8
host2:/prod/dwhdbqa/oradata8>ll
total 282870112
-rw-r----- 1 hpsmh hpsmc 31088189440 Sep 27 12:23 dwhdb_data07a.dbf
-rw-r----- 1 hpsmh hpsmc 29989281792 Sep 27 12:23 dwhdb_data07b.dbf
-rw-r----- 1 hpsmh hpsmc 32212262912 Nov 4 2009 dwhdb_temp01j.dbf
-rw-r----- 1 hpsmh hpsmc 21474844672 Nov 4 2009 dwhdb_temp01k.dbf
drwxrwx--- 2 hpsmh hpsmc 96 Apr 12 13:20 lost+found
-rw-r----- 1 hpsmh hpsmc 8589942784 Sep 27 12:23 undotbs01m.dbf
-rw-r----- 1 hpsmh hpsmc 5368717312 Sep 27 12:23 undotbs01n.dbf
-rw-r----- 1 hpsmh hpsmc 5368717312 Sep 27 12:23 undotbs01o.dbf
-rw-r----- 1 hpsmh hpsmc 5368717312 Sep 27 12:23 undotbs01p.dbf
-rw-r----- 1 hpsmh hpsmc 5368717312 Sep 27 12:23 undotbs01q.dbf
apollo:/prod/dwhdbqa/oradata8>

i want to know why this difference?? plz help.
thanks,
irshad Ali
5 REPLIES 5

Re: FS/mount point sizes difference

it looks like you are restoring some Oracle temporary tablespaces - chances are on the source system those datafiles are sparse files (compare the output of ll and du -k for those files...)

when they are restored onto the target system the backup software is obviously restoring them as normal (non-sparse) files...

to understand the differences just search the forums with the keywords "sparse files" for lots of examples.

as to how to get around this, well its pretty simple - don't restore the files for the temporary tablespaces, just re-create them - they won't contain anything useful anyway - if you recreate them in the same way they were created on the source system, you shouldn't have a problem...

incidentally I'm always on at DBAs to check what the total of their temporary tablespaces is vs. the space they actually have available on the filesystem - in your case no doubt the "allocated" size of the temp datafiles exceeds the actual size of the filesystem - if oracle ever actually wrote into those files and filled them up you would have a problem...

HTH

Duncan

I am an HPE Employee
Accept or Kudo
irshad ali
Frequent Advisor

Re: FS/mount point sizes difference

Hi Duncan,

thanks for your quick reply. I am no much expert on oracle/dba.
let me tell you that database already made down before restoration.
And as you can see by bdf the total allocated size of FS on target is very much high on target server than source still it's FS got 100%. How is it possible?
I have checked the block size by fstyp, that is also same.
host1:/>fstyp -v /dev/vg01/lv_data40
vxfs
version: 6
f_bsize: 8192
f_frsize: 1024
f_blocks: 115343360
f_bfree: 11494072
f_bavail: 10775693
f_files: 2873548
f_ffree: 2873516
f_favail: 2873516
f_fsid: 1073807401
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 16
f_fsindex: 10
f_size: 115343360

AND
host2:/>fstyp -v /dev/vg01/qa_data40
vxfs
version: 6
f_bsize: 8192
f_frsize: 1024
f_blocks: 157286400
f_bfree: 15795711
f_bavail: 14808480
f_files: 3948956
f_ffree: 3948924
f_favail: 3948924
f_fsid: 1073807398
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 16
f_fsindex: 10
f_size: 157286400

plz help!
Solution

Re: FS/mount point sizes difference

I think you missed my point - the thing is, its possible with sparse files for the size reported by ll or ls -l to be different from the amount actually allocated by the underlying filesystem... here's an example:

# dd if=/dev/zero of=/tmp/sparse1GB bs=1024k seek=512 count=512
512+0 records in
512+0 records out
# ll /tmp/sparse1GB
-rw-r--r-- 1 root sys 1073741824 Oct 6 11:34 /tmp/sparse1GB
# du -k /tmp/sparse1GB
537800 /tmp/sparse1GB

So I created a file using dd which from the point of view of ll is 1GB in size, but when I look at what is actually used on the filesystem using du, I find only 512MB allocated.

Now what what happens when I copy the file (equivalent of a backup and restore):

# cp /tmp/sparse1GB /tmp/NOTsparse1GB
# ll /tmp/NOTsparse1GB
-rw-r--r-- 1 root sys 1073741824 Oct 6 11:36 /tmp/NOTsparse1GB
# du -k /tmp/NOTsparse1GB
1048576 /tmp/NOTsparse1GB

As you can see, when copied, sparse files get all their space allocated... this is what is probably happening with these files:

-rw-r----- 1 ora11g dba11g 32212262912 Nov 4 2009 dwhdb_temp01j.dbf
-rw-r----- 1 ora11g dba11g 21474844672 Nov 4 2009 dwhdb_temp01k.dbf

So just don't restore them - tell your DBA to recreate them - they're only temp files anyway so it shouldn't be a problem...

HTH

Duncan

I am an HPE Employee
Accept or Kudo
irshad ali
Frequent Advisor

Re: FS/mount point sizes difference

Hi Duncan,

I fully understood your point. I can see the difference in sizes of these 02 spares (oracle temp.) files between source and destination.
I checked the size by du on both the hosts. On source these files are less in size while on target after restoration the size randomly increased. And thats why destination host require more space.
I asked my DBA's confirmation about avoiding these files in restoration but did not get any answer so for time being I increased the FS size on target.
Millions thanks for your valuable support.I got the answer of my problem hence closing the thread.

Regards,
Irshad
irshad ali
Frequent Advisor

Re: FS/mount point sizes difference

Thanks a lot....