- Why is f.txt occupying 17K (17408 bytes) on disk?
I assume you are referring to the difference of the size reported by
ls -l f.txt and the blocks occupied. Normally these numbers are pretty close to each other.
As Sorcha already mentioned the file occupies 34 blocks and each block reported here normally has 512 bytes. You can verify that with
stat -c "%B" f.txt. If you do the math you will get 17408 bytes.
Normally the Linux filesystems has a block size of 4096 bytes, so anything below 512 bytes would nevertheless allocate 4096 bytes or 8*512 bytes on disk, which is the smallest allocatable size in the filesystem.
In your case it seems the blocksize of the filesystem is 17kbytes. For further clarification you would have to check the filesystem on the NFS server where the files are stored.
- What is IO Block size? Why is it 524288 bytes long and is not equal to filesystem block size (assuming file system block size is 17K)?
What you see here is, taken from
man stat, the optimal I/O transfer size hint and in case of NFS, this refers to the rsize/wsize mount option of NFS instead of the filesystem block size which normally is 4096 bytes. Run
stat f.txt on the NFS server, which holds the filesystem on disk, to see the difference.