Solved nda0p1 added, but partition is not aligned on 32768 bytes

Hello, I've run into a strange behavior of gpart I can't interpret. Maybe you can give me some insights?

abishai@gamma:~ % gpart show nda0
=> 6 244190635 nda0 GPT (932G)
6 244190635 - free - (932G)


When I try to create a partition, aligned to 4k gpart outputs strange notice

abishai@gamma:~ % doas gpart add -t freebsd-zfs -a 4k -l data0 /dev/nda0
nda0p1 added, but partition is not aligned on 32768 bytes


Code:
abishai@gamma:~ % doas smartctl -a /dev/nvme0
smartctl 7.4 2023-08-01 r5530 [FreeBSD 14.2-RELEASE-p1 amd64] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number:                       WD_BLACK SN7100 1TB
Serial Number:                      25020F802183
Firmware Version:                   7615M0WD
PCI Vendor/Subsystem ID:            0x15b7
IEEE OUI Identifier:                0x001b44
Total NVM Capacity:                 1,000,204,886,016 [1.00 TB]
Unallocated NVM Capacity:           0
Controller ID:                      1
NVMe Version:                       2.0
Number of Namespaces:               1
Namespace 1 Size/Capacity:          1,000,204,886,016 [1.00 TB]
Namespace 1 Formatted LBA Size:     4096
Namespace 1 IEEE EUI-64:            001b44 8b4d10631b
Local Time is:                      Sat Apr  5 13:03:10 2025 MSK
Firmware Updates (0x14):            2 Slots, no Reset required
Optional Admin Commands (0x0017):   Security Format Frmw_DL Self_Test
Optional NVM Commands (0x00df):     Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat Timestmp Verify
Log Page Attributes (0x7e):         Cmd_Eff_Lg Ext_Get_Lg Telmtry_Lg Pers_Ev_Lg Log0_FISE_MI Telmtry_Ar_4
Maximum Data Transfer Size:         128 Pages
Warning  Comp. Temp. Threshold:     90 Celsius
Critical Comp. Temp. Threshold:     94 Celsius
Namespace 1 Features (0x92):        NA_Fields NP_Fields *Other*

Supported Power States
St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
 0 +     4.50W    4.50W       -    0  0  0  0        0       0
 1 +     3.00W    3.00W       -    0  0  0  0        0       0
 2 +     2.50W    2.50W       -    0  0  0  0        0       0
 3 -   0.0200W       -        -    3  3  3  3     2000    3000
 4 -   0.0050W       -        -    4  4  4  4     4000   12000
 5 -   0.0030W       -        -    5  5  5  5   176000   25000

Supported LBA Sizes (NSID 0x1)
Id Fmt  Data  Metadt  Rel_Perf
 0 -     512       0         2
 1 +    4096       0         1

=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

SMART/Health Information (NVMe Log 0x02)
Critical Warning:                   0x00
Temperature:                        26 Celsius
Available Spare:                    100%
Available Spare Threshold:          10%
Percentage Used:                    0%
Data Units Read:                    26 [13.3 MB]
Data Units Written:                 2 [1.02 MB]
Host Read Commands:                 1,307
Host Write Commands:                88
Controller Busy Time:               0
Power Cycles:                       3
Power On Hours:                     11
Unsafe Shutdowns:                   0
Media and Data Integrity Errors:    0
Error Information Log Entries:      0
Warning  Comp. Temperature Time:    0
Critical Comp. Temperature Time:    0
Temperature Sensor 1:               38 Celsius
Temperature Sensor 2:               27 Celsius

Error Information (NVMe Log 0x01, 16 of 256 entries)
No Errors Logged

Self-test Log (NVMe Log 0x06)
Self-test status: No self-test in progress
No Self-tests Logged

1. It this partition aligned to 4k? (it looks like)
2. Why it prints this notice?
 
Thanks, now I see where 32k came from
Code:
abishai@gamma:~ % doas diskinfo -v nda0
nda0
    4096            # sectorsize
    1000204886016    # mediasize in bytes (932G)
    244190646       # mediasize in sectors
    32768           # stripesize
    0               # stripeoffset
    WD_BLACK SN7100 1TB    # Disk descr.
    25020F802183    # Disk ident.
    nvme0           # Attachment
    Yes             # TRIM/UNMAP support
    0               # Rotation rate in RPM

So, disk controller reported this value, but is this information makes sense? If drive reports 4096 sector size, should I worry about stripe size? (I'd expected stripe size = sector size)
 
I do not think you need to worry about anything.
32KB is probably some internal flash block size.
Most SSDs nowadays have it as 16KB or 32KB, but few of them expose that number.
All manage just fine.
 
Back
Top