VXFS Capacity ( df -h output )
Updated: 21 May 2010 | 1 comment
Dear all
I have created Vxfs filesystem on 50 G Volume , but it is showing weired capacity in df -h and showing capacity as 47 G , i have created 47G file and but capacity automatically increase .
can you somebody explain me theory behind this behivour.
below is what i did
root@psuls01 # df -h /mnt
Filesystem size used avail capacity Mounted on
/dev/vx/dsk/rsbindg/sybr 51G 78M 47G 1% /mnt
root@psuls01 # mkfile 47g test.log
root@psuls01 # df -h /mnt
Filesystem size used avail capacity Mounted on
/dev/vx/dsk/rsbindg/sybrs 51G 47G 3.2G 94% /mnt
Thanks
JM
Discussion Filed Under:
Comments
Hi, JM,
indeed this behavior is a little strange, especially if you try to find out the "real" available capacity of your filesystem.
But all this has something to do with the inodes in the VxFS and the fact, that VxFS is extend based and not block based. In UFS each representation size for one entry in an inode is a block of half a KB (512B). In VxFS the representation size of one entry in an inode is given by "start block" and "length", so you need for continous space in the filesystem only one inode entry. And it is depending of the fragmentation of your filesystem how many inode entries you need for your file to describe.
With your creation of only one large file of 47G in only one step you probably used a very little number of inodes to describe this file. And now, the second behavior of VxFS becomes important, it can "recycle" some "planned but not used as inode" inodes to give you some more space. And this your additional "weired" space.
To illustrate this, try to make 47000 file with 1MB each and you will see, that your available space in decreasing much faster, maybe you will not have the possibility to create all the files, because your filesystem is eating up mor inodes as "planned" in file system creation time... Very similar it is to make two small files and increase the filesize in very small steps in many many I/O`s, so that the I/O`s cannot find big continous spaces.
So, finally, there is no magic or weired things, only efficiency :-)
Have a nice day
Roger
Would you like to reply?
Login or Register to post your comment.