pmem logical and physical sector sizes

70 views
Skip to first unread message

Anton Gavriliuk

unread,
Apr 12, 2021, 3:51:18 AM4/12/21
to pmem
Hi all

Does anybody know how to setup pmem with 512 bytes physical sector size ?

linux-tg7k:/sys/class/block/pmem0/queue # ndctl create-namespace --mode fsdax --map mem -l 512 -e namespace0.0 -f
{
  "dev":"namespace0.0",
  "mode":"fsdax",
  "map":"mem",
  "size":"3012.00 GiB (3234.11 GB)",
  "uuid":"09da3d47-cee3-404d-871b-7e238b0add30",
  "sector_size":512,
  "align":2097152,
  "blockdev":"pmem0"
}
linux-tg7k:/sys/class/block/pmem0/queue #
linux-tg7k:/sys/class/block/pmem0/queue # fdisk -l /dev/pmem0
Disk /dev/pmem0: 3 TiB, 3234108276736 bytes, 6316617728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
linux-tg7k:/sys/class/block/pmem0/queue #

So the physical sector size is till 4096 bytes.

I'm asking this question, because on RHEL8.3 I need xfs with 1024 block size and got next warning

mkfs.xfs -f -m reflink=0 -b size=1024  /dev/pmem1
specified blocksize 1024 is less than device physical sector size 4096
switching to logical sector size 512


Anton

Jeff Moyer

unread,
Apr 12, 2021, 8:56:30 AM4/12/21
to Anton Gavriliuk, pmem
Anton Gavriliuk <antos...@gmail.com> writes:

> Hi all
>
> Does anybody know how to setup pmem with 512 bytes physical sector size ?

The physical sector size is tied to the system page size.

[snip]

> I'm asking this question, because on RHEL8.3 I need xfs with 1024 block
> size and got next warning
>
> mkfs.xfs -f -m reflink=0 -b size=1024 /dev/pmem1
> specified blocksize 1024 is less than device physical sector size 4096
> switching to logical sector size 512

I have no idea why xfs behaves that way. That's a question for the xfs
developers.

Cheers,
Jeff

Reply all
Reply to author
Forward
0 new messages