0

I have a Centos 6.5 and Solaris 5 machines. I'm trying to get the information about block size of a filesystem in the member f_frsize of statvfs. I tried first from Centos but when the filesystem is mounted in nfs, i got a value like 32768 or 65536. I think this value is the nfs data block size and not the block size.

And when i try to get the block size info of the same nfs filesystem but from Sun Solaris, i get a value like 1024.

So why did i get a different block size (f_frsize) when calling statvfs from Solaris and from Linux ?

Is there a way to get the f_frsize info of the nfs filesystem and not this nfs data block size ? i don't know if what i want is possible, but i would like more informations about this.

Thanks

0
0

I found the solution for my problem. It is simply a problem of mathematics ! Different numbers can give the same result. So between Linux and Solaris, the member f_frsize has a different value. But it doesn't matter because when you convert blocks to bytes using the f_frsize in both OS with this formula taken from here:

static unsigned long kscale(unsigned long b, unsigned long bs)
{
     return (b * (unsigned long long) bs + 1024/2) / 1024;
}

I got the same result as with the df command and in both OS. So there is no real problem, just my imagination :) Sorry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.