du - Value too large to be stored in data type

Change Page: 12 > | Showing page 1 of 2, messages 1 to 10 of 12
Author Message
redondo_se

  • Total Posts : 10
  • Reward points : 85
  • Joined: 1/5/2007
  • Status: offline
du - Value too large to be stored in data type - Monday, July 26, 2010 1:43 PM ( #1 )
Hi,

I'm running windows server 2008 R2 64-bit.  I have installed SUA and the full Interix package.  uname -a produces the following:

Interix cindy 6.1 10.0.6030.0 genuineintel Intel64_Family_6_Model_15_Stepping_11

I get "Value too large to be stored in data type" on large files when I execute du.  Also, df -h is off by a factor of 1000, i.e. the values output are too small.  df -g outputs the correct values though.  One of my disks is a 2TB disk with 1 large volume.

Is there any way to fix these issues?

Thanks,
Sean
redondo_se

  • Total Posts : 10
  • Reward points : 85
  • Joined: 1/5/2007
  • Status: offline
Re:du - Value too large to be stored in data type - Wednesday, July 28, 2010 10:27 AM ( #2 )

Fixed it.  After some digging, I realized that I installed the older Utilities and SDK, the one intended for Server 2008 and Vista RTM.  I didn't realize there was a newer version for 2008 R2 and Windows 7.  I had also done the full tools warehouse package install.

I uninstalled everything including the SUA services, and started clean.  This time I installed the newer Utilities and SDK, and I'm taking a more minimal approach to installing things from the warehouse this time.

du and df are both working correctly now.
Rodney

  • Total Posts : 6450
  • Reward points : 1180
  • Joined: 7/9/2002
  • Location: /Tools lab
  • Status: offline
Re:du - Value too large to be stored in data type - Wednesday, July 28, 2010 5:40 PM ( #3 )
Glad you were able to fix it.

The 32-bit based utilities will install on the 64-bit systems and usually it'll be alright.
There is a separate bundle with just 64-bit utilities too.
When installing the utilities on a one-by-one basis the installer will pick the 64-bit package
first, if it is available, otherwise the 32-bit.

redondo_se

  • Total Posts : 10
  • Reward points : 85
  • Joined: 1/5/2007
  • Status: offline
Re:du - Value too large to be stored in data type - Thursday, July 29, 2010 10:09 AM ( #4 )
Rodney


Glad you were able to fix it.

The 32-bit based utilities will install on the 64-bit systems and usually it'll be alright.
There is a separate bundle with just 64-bit utilities too.
When installing the utilities on a one-by-one basis the installer will pick the 64-bit package
first, if it is available, otherwise the 32-bit.


Actually, I did install the 64-bit bundle.  However, things are not all well as I had thought.  df is working correctly, but du is still giving me some strange results:

 /dev/fs/F/BACKUP > ls -Fhl
 total 644391
 -rwxrwx---+ 1 +SYSTEM  +SYSTEM   100M Jun  3 03:13 cindy_boot_partition.tib*
 -rwxrwx---+ 1 +SYSTEM  +SYSTEM   4.2G Jun  3 02:31 cindy_test_backup.tib*
 
 /dev/fs/F/BACKUP > du -ha
 100M    ./cindy_boot_partition.tib
 214M    ./cindy_test_backup.tib
 314M    .
 


Notice that ls reports the correct size of cindy_test_backup.tib, but du does not.  I no longer get the value too large errors, but it's not correct in this case.

du does work correctly on large files on another drive.  However, notable differences are that the other drive is only a 500 GB drive.  The drive that I get bad numbers on is 2TB, and is also encrypted with truecrypt.

The du-1.0.1 package is the one that gives me the value too large errors.  The du that comes with the microsoft utilities and the du-1.0 package from the tool warehouse both give me the same bad numbers for this large file on my 2TB drive.

Is there an alternative to du to find the disk usage of directories?

Thanks,
Sean

redondo_se

  • Total Posts : 10
  • Reward points : 85
  • Joined: 1/5/2007
  • Status: offline
Re:du - Value too large to be stored in data type - Thursday, July 29, 2010 10:42 AM ( #5 )
Wasn't thinking correctly when I made that last post.  Actually, all my drives are encrypted with Truecrypt, so the size seems to be the only difference.
Rodney

  • Total Posts : 6450
  • Reward points : 1180
  • Joined: 7/9/2002
  • Location: /Tools lab
  • Status: offline
Re:du - Value too large to be stored in data type - Thursday, July 29, 2010 3:54 PM ( #6 )
The message from du 1.0.1 is likely the best clue.
A 32 bit integer will hold a value to 4G before rolling over.
So that 4.2G versus 214M makes sense in that context.

I'll go look at du right now.

Rodney

  • Total Posts : 6450
  • Reward points : 1180
  • Joined: 7/9/2002
  • Location: /Tools lab
  • Status: offline
Re:du - Value too large to be stored in data type - Thursday, July 29, 2010 6:17 PM ( #7 )
It's something more confusing then I thought it would be.
It's looking like the information returned from the stat(2) system call on 64-bit systems has the number
of blocks used wrong. The number of blocks reported is to use a block size of 512 (regardless of
the actual block size used on the device).

Rodney

  • Total Posts : 6450
  • Reward points : 1180
  • Joined: 7/9/2002
  • Location: /Tools lab
  • Status: offline
Re:du - Value too large to be stored in data type - Thursday, July 29, 2010 7:06 PM ( #8 )
Yeah, it's a subsystem bug. It's likely a casting thing.
I can do a workaround in du to calculate it right.


Rodney

  • Total Posts : 6450
  • Reward points : 1180
  • Joined: 7/9/2002
  • Location: /Tools lab
  • Status: offline
Re:du - Value too large to be stored in data type - Thursday, July 29, 2010 9:32 PM ( #9 )
There's an updated du now.
Do "pkg_update -L du" to get it installed.
Let me know if there is any problem still.

redondo_se

  • Total Posts : 10
  • Reward points : 85
  • Joined: 1/5/2007
  • Status: offline
Re:du - Value too large to be stored in data type - Saturday, July 31, 2010 4:38 PM ( #10 )
Rodney


There's an updated du now.
Do "pkg_update -L du" to get it installed.
Let me know if there is any problem still.


Hi Rodney,
 
I'm not getting email updates when you reply to this thread, even though I have it as a subscription with instant email notification.
 
Anyway, I was wrong earlier when I said it was working on the 500 GB drive but not the 2TB drive.   It's actually wrong on both.  I think version 1.0 has the same problem, it just doesn't give the "value too large" message.
 
I just tried your update, and unfortunately it's still not quite right.  It seems that "du -hsc *" give the right answer, but du -h does not.  And using * won't work if there are directories that begin with ".".
 
 /dev/fs/F/BACKUP > ls -Flh 
     total 644391 
     -rwxrwx---+ 1 +SYSTEM  +SYSTEM   100M Jun  3 03:13 cindy_boot_partition.tib* 
     -rwxrwx---+ 1 +SYSTEM  +SYSTEM   4.2G Jun  3 02:31 cindy_test_backup.tib* 
     /dev/fs/F/BACKUP > du -hsc * 
     100M    cindy_boot_partition.tib 
     4.2G    cindy_test_backup.tib 
     4.3G    total 
     /dev/fs/F/BACKUP > du -h 
     8.0P    . 
     

 
Thanks for giving it some attention. 
Sean
edit: just tried in another directory with more large files, and -hsc * does not work correctly there.
<message edited by redondo_se on Saturday, July 31, 2010 4:40 PM>
Change Page: 12 > | Showing page 1 of 2, messages 1 to 10 of 12

Jump to:

Current active users
There are 0 members and 1 guests.
Icon Legend and Permission
  • New Messages
  • No New Messages
  • Hot Topic w/ New Messages
  • Hot Topic w/o New Messages
  • Locked w/ New Messages
  • Locked w/o New Messages
  • Read Message
  • Post New Thread
  • Reply to message
  • Post New Poll
  • Submit Vote
  • Post reward post
  • Delete my own posts
  • Delete my own threads
  • Rate post

© 2000-2009 ASPPlayground.NET Forum Version 3.4