Skip to content

Instantly share code, notes, and snippets.

@pankaj-gecko
Created October 18, 2021 10:39
Show Gist options
  • Save pankaj-gecko/f95f2c6840a4029c88bd560beb800c7d to your computer and use it in GitHub Desktop.
Save pankaj-gecko/f95f2c6840a4029c88bd560beb800c7d to your computer and use it in GitHub Desktop.
modifying block size to 512b is not working -> Defaulting to 4096b
I am trying to experiment with tracks and blocks. I was searching for a filesystem that still supports 512b as block size
and came across xfs.
I tried to chose the block size as 512b but it is defaulting to 4096 everytime.
I know that many filesystem (or may be all) adjust the block size based on the size of partition but could not get much
information that what is the partition when such transitions happen.
Partition size assigned with 'fdisk' : 200M
<pre>meta-data=/dev/sdb isize=256 agcount=4, agsize=15630336 blks
= sectsz=512 attr=2, projid32bit=1
= crc=0 finobt=0, sparse=0, rmapbt=0
= reflink=0
data = bsize=512 blocks=62521344, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=512 blocks=30528, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0</pre>
'sudo mkfs -t xfs -f -m crc=0 -b size=512 /dev/sdb'
And below block size verification gives:
sudo blockdev --getbsz /dev/sdb
4096
I am performing this for experimental purpose to learn more about tracks and sectors and corresponding filesystem.
Please let me know if I am doing something wrong.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment