I'm using a suse 11 server with xfs and using "xfs_info /srv" command i seen this.
xfs_info /srv/
meta-data=/dev/mapper/vg01-srvvol isize=256 agcount=38, agsize=1964032 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=73367552, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=3836, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
So i think xfs knows the size of underline disk sectsz, but I'm using now a disk with sectsz of 512 bytes, but my question is, how can find this kind of information using ext3/ext4 filesystem?
Because i would like to try to use a new disk with sectsz of 4096 and be sure, ext3/ext4 uses the underline sectsz.
This is the output of xfs_info using one new ssd with physical block size 4096:
xfs_info /dev/mapper/vg00-logvol
meta-data=/dev/mapper/vg00-logvol isize=256 agcount=16, agsize=7144576 blks
= sectsz=4096 attr=2, projid32bit=0
data = bsize=4096 blocks=114313216, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=55817, version=2
= sectsz=4096 sunit=1 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
First, find the underlying
dm
device:Example output:
Take the
dm-0
,dm-1
, etc and see here:The only reliable way to determine the real physical block size is by querying the disk directly with
hdparm
:All linux tools like
parted
,tune2fs
,fdisk
, also the kernel (via the value provided in /proc) output 512 Bytes for disks I have which are denoted 4K byhdparm
. (5 HDDs tested, with two being 4K ones.)