SUSE Support

Here When You Need Us

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

SUSE Linux Enterprise Server 15 Service Pack 1 (PPC-64)

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

For atomicity requirements, the XFS filesystem must be created with the sector size set to the logical sector size of the underlying device.

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

To create the XFS filesystem with the sector size equal equal to the logical sector size, first obtain the logical sector size using for example;

Get the logical sector size for the PMEM device, in this case "/dev/pmem0" with:
# blockdev --getss /dev/pmem0
512
In the above example, the logical sector size is "512", to create the filesystem the command then needs to be as follows:

# 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

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.