Skip to content

Unable to add log/special device with different LBA size #18182

@stuartthebruce

Description

@stuartthebruce

System information

Type Version/Name
Distribution Name AlmaLinux
Distribution Version 10.1
Kernel Version 6.12.0-124.31.1
Architecture x86_64
OpenZFS Version 2.4.0

Describe the problem you're observing

I am unable to add a log or special device to a pool unless the formatted LBA size matches the existing data vdev, or explicitly request a matching ashift. However, I am able to create a pool with different sizes.

Describe how to reproduce the problem

[root@zfs6 ~]# nvme list
Node                  Generic               SN                   Model                                    Namespace  Usage                      Format           FW Rev  
--------------------- --------------------- -------------------- ---------------------------------------- ---------- -------------------------- ---------------- --------
/dev/nvme0n1          /dev/ng0n1            222139D6115B         Micron_7450_MTFDKCC6T4TFS                0x1          4.21  TB /   6.40  TB    512   B +  0 B   E2MU200 
/dev/nvme1n1          /dev/ng1n1            22303A6B91A6         Micron_7450_MTFDKBA400TFS                0x1        211.33  GB / 400.09  GB    512   B +  0 B   E2MU200 
/dev/nvme2n1          /dev/ng2n1            22303A6B9184         Micron_7450_MTFDKBA400TFS                0x1        384.74  GB / 400.09  GB    512   B +  0 B   E2MU200 
/dev/nvme3n1          /dev/ng3n1            222139D6117C         Micron_7450_MTFDKCC6T4TFS                0x1          4.21  TB /   6.40  TB    512   B +  0 B   E2MU200 
/dev/nvme4n1          /dev/ng4n1            PHKE931600G51P5CGN   INTEL SSDPE21K015TA                      0x1          1.50  TB /   1.50  TB    512   B +  0 B   E2010650
/dev/nvme5n1          /dev/ng5n1            S609NE0N600009       Dell Ent NVMe AGN RI U.2 3.84TB          0x1          3.84  TB /   3.84  TB      4 KiB +  0 B   2.4.0   
/dev/nvme6n1          /dev/ng6n1            S609NE0N600010       Dell Ent NVMe AGN RI U.2 3.84TB          0x1          3.84  TB /   3.84  TB    512   B +  0 B   2.4.0   
/dev/nvme7n1          /dev/ng7n1            PHAL211400AF400BGN   INTEL SSDPF21Q400GB                      0x1        400.09  GB / 400.09  GB    512   B +  0 B   L0310600
/dev/nvme8n1          /dev/ng8n1            PHKE906600D41P5CGN   INTEL SSDPE21K015TA                      0x1          1.50  TB /   1.50  TB    512   B +  0 B   E2010650

[root@zfs6 ~]# zpool create test nvme5n1

[root@zfs6 ~]# zdb -C test | grep ashift
                ashift: 12

[root@zfs6 ~]# zpool add test log nvme7n1
cannot add to 'test': adding devices with different physical sector sizes is not allowed

[root@zfs6 ~]# zpool add test special nvme7n1
cannot add to 'test': adding devices with different physical sector sizes is not allowed

[root@zfs6 ~]# zpool add test special nvme7n1 -o ashift=12
[root@zfs6 ~]# zdb -C test | grep ashift
                ashift: 12
                ashift: 12

[root@zfs6 ~]# zpool destroy test

[root@zfs6 ~]# zpool create test nvme5n1 special nvme7n1

[root@zfs6 ~]# zdb -C test | grep ashift
                ashift: 12
                ashift: 9

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions