Score:0

Can not mount a partition having XFS filesystem and block size of 64K

cf flag
MMG

I am currently testing SQL in a container. I have attached a 6TB volume from XtremIO to this box and mapping my database directory to this volume(Partition name-/dev/sdb1). To get the optimal performance Microsoft have recommended to set the block size of the partition to 64K as per this-

https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-performance-best-practices?view=sql-server-ver16

I have created XFS filesystem with the command on the partition

sudo mkfs.xfs -f -b size=64k /dev/sdb1

I can see that the partition is created and the block size is 64K, however I cannot mount this partition to any directory.(for example /mnt/xfs_mount) and its throwing an error like below-

# sudo mount /dev/sdb1 /mnt/xfs_mount
mount: /mnt/xfs_mount: mount(2) system call failed: Function not implemented.
# sudo mount -o bs=64k /dev/sdb1 /mnt/xfs_mount
mount: /mnt/xfs_mount: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.

When investigated, I found that the system does not support mounting a volume which has block size >4K but this was for the old Linux kernels(less than 2.0 or 3.0) however my kernel version is 5.15.0-72-generic and its still not able to mount this volume which has xfs filesystem already created which I have confirmed by fdisk -l and here is the output-

Disk /dev/sdb: 6 TiB, 6597069766656 bytes, 12884901888 sectors
Disk model: XtremApp
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 16384 bytes / 65536 bytes
Disklabel type: gpt
Disk identifier: D6FECC4B-F90F-C34E-8C63-D75E89809B7C

Device     Start         End     Sectors Size Type
/dev/sdb1   2048 12884901854 12884899807   6T Linux filesystem

Can someone faced this issue? I cannot identify why the volume can not be mounted even if I have the latest kernel version and what are the changes I have to make to achieve this?

Thanks in advance

Marco avatar
br flag
`Only pagesize (4096) or less will currently work.` ... You can not mount xfs with pagesize larger than 4k.
MMG avatar
cf flag
MMG
Thanks! Is there a way to do this ? many people suggesting the kernel needs to be modified/tuned to support this like here- https://unix.stackexchange.com/questions/73536/how-can-i-mount-filesystems-with-4kb-block-sizes
Marco avatar
br flag
Microsoft does not say anything about xfs 64k blocksize. They describe how to align the underlying Hardware (Disks) to the Softraid (md). The xfs blocksize is still 4k in the document. Read carefully !
MMG avatar
cf flag
MMG
Thanks! Will have a look into it again.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.