Unable to create XFS Filesystem on a PMEM (Persistent Memory) device
This document (7023858) is provided subject to the disclaimer at the end of this document.
Environment
Situation
Attempting to create a XFS Filesystem on a PMEM device fails as per the below example :
# mkfs.xfs -b size=65536 -f /dev/pmem1p2
illegal sector size 65536
Usage: mkfs.xfs
/* blocksize */ [-b size=num]
/* metadata */ [-m crc=0|1,finobt=0|1,uuid=xxx,rmapbt=0|1,reflink=0|1]
/* data subvol */ [-d agcount=n,agsize=n,file,name=xxx,size=num,
(sunit=value,swidth=value|su=num,sw=num|noalign),
sectsize=num
Resolution
Cause
On ppc64le, pmem devices report 64k as the physical
sector size unlike other normal disk devices. Regular
disk devices have a physical sector size of either 512 bytes or 4k
bytes.
XFS stores the physical sector size information in the super block. The member of the super block holding this information is 16 bits wide, hence the maximum value that can be stored here is 65535 and the reason why XFS sets a limit for the maximum sector size to be 32768 bytes. Due to this limit checking, mkfs.xfs fails on pmem devices (regardless of the filesystem block size being used).
The "-ssize=" option overrides the sector size value obtained from the underlying device. The XFS filesystem thus has to be created with the sector size more than or equal to the logical sector size.
p { margin-bottom: 0.1in; line-height: 115%; background: transparent none repeat scroll 0% 0%; }Additional Information
# blockdev --getss /dev/pmem0
512
# mkfs.xfs -f -b size=64k -s size=512 /dev/pmem0
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7023858
- Creation Date: 08-May-2019
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com