cancel
Showing results for 
Search instead for 
Did you mean: 

NBU tar reports incorrect file size

SunnyTseng
Not applicable
Dear Experts,

Kindly please advise why the NBU provided tar does not report the exact file size
when it's over 1GB.

For example, we have some files in "/mnt".

root@e420 # ls -al /mnt
total 6428710
drwxr-xr-x   2 root     root         512 Sep 10 21:12 .
drwxr-xr-x  37 root     root        1024 Aug 30 09:17 ..
-r-xr-xr-x   1 root     root     68635077 Sep 10 21:12 NB-Java.tar.Z
-r--r--r--   1 root     root         102 Sep 10 21:06 hosts
-rw-r--r--   1 root     root     3221225472 Sep 10 18:24 myfile1.3g
root@e420 #
root@e420 # /usr/openv/volmgr/bin/tpreq -m A00001 -a r -f /tmp/mytape1
root@e420 # mt -f /tmp/mytape1 fsf 20
root@e420 # mt -f /tmp/mytape1 fsr 1
root@e420 # /usr/openv/netbackup/bin/tar -t -v -p -f /tmp/mytape1
Blocksize = 128 records
drwxr-xr-x root/root  0 Aug 30 09:17 2007 /
drwxr-xr-x root/root  0 Sep 10 21:12 2007 /mnt/
-rw------T root/root 1073741824 Sep 10 18:24 2007 /mnt/myfile1.3g
Qrw------T root/root          0 Sep 10 18:24 2007
--End header --
-r--r--r-- root/root        102 Sep 10 21:06 2007 /mnt/hosts
-r-xr-xr-x root/root   68635077 Sep 10 21:12 2007 /mnt/NB-Java.tar.Z
root@e420 #

As we could see from the above screen capture, tar shows only
1GB of size instead of 3GB for "myfile1.3g".

However, the file size is correct after extracting to disks.

root@e420 # mkdir /mnt/tmp
root@e420 # cd /mnt/tmp
root@e420 # /usr/openv/netbackup/bin/tar -x -v -p -f /tmp/mytape1
Blocksize = 128 records
/
Removing leading / from absolute path names in the archive.
/mnt/
/mnt/myfile1.3g

/mnt/hosts
/mnt/NB-Java.tar.Z
root@e420 # ls -al
total 6
drwxr-xr-x   3 root     root         512 Sep 11 14:09 .
drwxr-xr-x   3 root     root         512 Sep 11 14:08 ..
drwxr-xr-x   2 root     root         512 Sep 10 21:12 mnt
root@e420 # pwd
/mnt/tmp
root@e420 # cd mnt
root@e420 # ls -al
total 6428710
drwxr-xr-x   2 root     root         512 Sep 10 21:12 .
drwxr-xr-x   3 root     root         512 Sep 11 14:09 ..
-r-xr-xr-x   1 root     root     68635077 Sep 10 21:12 NB-Java.tar.Z
-r--r--r--   1 root     root         102 Sep 10 21:06 hosts
-rw------T   1 root     root     3221225472 Sep 10 18:24 myfile1.3g
root@e420 #

Is this a bug or some kind of limitation within the NBU tar?
Is there anyway that we could do to avoid or fix such a problem?
Btw, we're using NBU 6.0 MP5.

Kindly please advise.
Many Thanks!

Best Regards,
Richard

2 REPLIES 2

Andrew_Sydelko
Level 2
Note that the correct size of the file (3221225472) minus the size Netbackup reports (1073741824) is exactly 2 gigabytes. There are several places in Netbackup like bpflist where they do something similar.

--andy.

Omar_Villa
Level 6
Employee
Hi,
 
    The only logical reason for this is that you are compressing the files,  check your policy settings or under your library, see if you are using hardware compression.
 
 
Regards