Get block size of XFS filesystem.
Hello
I want to know the block size of my XFS partition. Two different commands give two different values. Code:
$ sudo blockdev --getbsz /dev/vgh/root Thanks |
No real knowledge but an idea:
The block device driver works with a block size of 512 for compatibility reason. So addressing a certain block is independent of the file system. (See block size in the dd command, "man dd"). The xfs_info command knows more about the file system. The xfs bsize might be tunable, the device block size will remain. |
It depends how the disk(?) was set up.
If your disk sectors are set up as 512 bytes then on a physical disk this is not optimal - even though important software may make assumptions that this is the case. It is much more efficient to use larger sectors - typically 4K bytes and these disks became available some years ago. To avoid problematic changeovers, these included a compatibility layer to allow these disks to be seen as 512 byte devices. This can cause performance problems. Don't know if this affected Linux. According to the man fdisk page, the sector size parameter is deprecated in favour of the blockdev command. But perhaps XFS is clever enough to override 512 bytes? A lengthy discussion can be found at https://en.wikipedia.org/wiki/Advanced_Format |
All times are GMT -5. The time now is 06:08 AM. |