Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FileStore

 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Total space = 20 Gb
Unallocated space = 5 Gb
Used space = 15 Gb
Free space = 5 Gb

if it is then my volume should be 25 gb capacity, total=used+free+unallocated

I don't think there is any unallocated space on my volume D then what is it showing ?
untitled.JPG
[Thumbnail for untitled.JPG]
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps this: "total=used+free+unallocated" is not correct, because usable/free space and unallocated space are not mutually exlcusive.
 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:Perhaps this: "total=used+free+unallocated" is not correct, because usable/free space and unallocated space are not mutually exlcusive.


I'm not getting your point, please explain little bit more. thanks
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My point is that your assumption that "total=used+free+unallocated" may be incorrect. The javadocs do a bad job of explaining what the difference between "unused" and "unallocated" disk space might be; it's certainly not clear to me (and, I suspect, might vary between different file systems),
 
Tony Docherty
Bartender
Posts: 2965
59
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The API docs state the returned values are a hint and not a guarantee.

As Ulf has said the docs are not clear on what exactly these terms relate to but unallocated space on a physical hard drive is space which hasn't been allocated to a volume yet and if this is what getUnallocatedSpace() is returning then that is why it doesn't show up on the windows file properties dialog.
 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much guys.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic