Re: "nvmecontrol: format request returned error" message for "nvmecontrol format -f 3 nvme1" on a still-new Optane DC P4800X 1.5T : max 120 sec also times out
- Reply: Mark Millard : "Re: "nvmecontrol: format request returned error" message for "nvmecontrol format -f 3 nvme1" on a still-new Optane DC P4800X 1.5T : D5982[78].diff work"
- In reply to: Mark Millard : "Re: "nvmecontrol: format request returned error" message for "nvmecontrol format -f 3 nvme1" on a still-new Optane DC P4800X 1.5T : Default behavior unchanged"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 19 Sep 2026 03:43:14 UTC
On 9/18/26 19:58, Mark Millard wrote:
> Just the new test context and initial results, old message content
> removed . . .
>
> The FreeBSD OS upgrade was to:
>
> # uname -apKU
> FreeBSD 7950X3D-ZFS 16.0-CURRENT FreeBSD 16.0-CURRENT
> main-n289384-758578370f6b GENERIC-NODEBUG amd64 amd64 1600026 1600026
>
> It is an official FreeBSD pkgbase upgrade from today, not a personal build.
>
>
> Context (my exploration):
>
> # sysctl -a | grep nvme | grep -i -e fmt -e format -e timeout
> dev.nvme.5.timeout_period: 30
> dev.nvme.5.admin_timeout_period: 60
> dev.nvme.4.timeout_period: 30
> dev.nvme.4.admin_timeout_period: 60
> dev.nvme.3.timeout_period: 30
> dev.nvme.3.admin_timeout_period: 60
> dev.nvme.2.timeout_period: 30
> dev.nvme.2.admin_timeout_period: 60
> dev.nvme.1.timeout_period: 30
> dev.nvme.1.admin_timeout_period: 60
> dev.nvme.0.timeout_period: 30
> dev.nvme.0.admin_timeout_period: 60
>
> (So: unchanged.)
>
> # sysctl -Td dev.nvme.0.admin_timeout_period
> # sysctl -Wd dev.nvme.0.admin_timeout_period
> dev.nvme.0.admin_timeout_period: Timeout period for Admin queue (in seconds)
>
> # nvmecontrol format
> Missing arg controller-id|namespace-id
> Usage:
> nvmecontrol format <args> controller-id|namespace-id
>
> Format/erase one or all the namespaces
> Options:
> -C, --crypto - Cryptographic erase
> -E, --erase - User data erase
> -f, --lbaf=<NUM> - LBA Format to apply to the media
> -m, --ms=<NUM> - Metadata settings
> -p, --pi=<NUM> - Protective information
> -l, --pil=<NUM> - Protective information location
> -s, --ses=<NUM> - Secure erase settings
>
> (So: No option to control the timeout is listed.) The man page shows:
>
> nvmecontrol format [-f fmt] [-m mset] [-p pi] [-l pil] [-E] [-C]
> ⟨device-id | namespace-id⟩
>
> ( So: no -s .)
>
>
> Plan:
>
> nvmecontrol devlist
> nvmecontrol identify nvme?ns1 # with appropriate value for the ?
>
> time -l \
> nvmecontrol format -f ? -m 0 nvme? # with appropriate value for each ?
>
> Possibly extract some text from dmesg -a related to the result.
>
>
> Initial results (it failed to wait for much more than 1 min for completion):
>
> # nvmecontrol devlist
> nvme0: INTEL SSDPE21K015TA
> nvme0ns1 (1430799MB)
> . . .
>
> # nvmecontrol identify nvme0ns1
> Size: 366284646 blocks
> Capacity: 366284646 blocks
> Utilization: 366284646 blocks
> Thin Provisioning: Not Supported
> Number of LBA Formats: 7
> Current LBA Format: LBA Format #03
> Metadata Capabilities
> Extended: Supported
> Separate: Not Supported
> Data Protection Caps: Last Bytes, Type 1
> Data Protection Settings: Not Enabled
> Multi-Path I/O Capabilities: Not Supported
> Reservation Capabilities: Not Supported
> Format Progress Indicator: Not Supported
> Deallocate Logical Block: Read Not Reported
> Optimal I/O Boundary: 0 blocks
> NVM Capacity: 0 bytes
> Globally Unique Identifier: 00000000000000000000000000000000
> IEEE EUI64: 5cd2e496b5ea0100
> LBA Format #00: Data Size: 512 Metadata Size: 0 Performance: Good
> LBA Format #01: Data Size: 512 Metadata Size: 8 Performance: Good
> LBA Format #02: Data Size: 512 Metadata Size: 16 Performance: Good
> LBA Format #03: Data Size: 4096 Metadata Size: 0 Performance: Best
> LBA Format #04: Data Size: 4096 Metadata Size: 8 Performance: Best
> LBA Format #05: Data Size: 4096 Metadata Size: 64 Performance: Best
> LBA Format #06: Data Size: 4096 Metadata Size: 128 Performance: Best
>
> # time -l \
>> nvmecontrol format -f 3 -m 0 nvme0
> nvmecontrol: format request returned error
> 60.21 real 0.00 user 0.00 sys
> 0 maximum resident set size
> 0 average shared memory size
> 0 average unshared data size
> 0 average unshared stack size
> 148 page reclaims
> 0 page faults
> 0 swaps
> 0 block input operations
> 0 block output operations
> 0 messages sent
> 0 messages received
> 0 signals received
> 5 voluntary context switches
> 0 involuntary context switches
>
> # dmesg -a | tail -7
> nvme0: Resetting controller due to a timeout.
> nvme0: event="start"
> nvme0: event="success"
> nvme0: aborting outstanding admin command
> nvme0: FORMAT_NVM (80) sqid:0 cid:15 nsid:ffffffff cdw10:00000003
> cdw11:00000000
> nvme0: ABORTED_BY_REQUEST (00/07) crd:0 m:0 dnr:1 p:0 sqid:0 cid:15 cdw0:0
> nvme0: done aborting outstanding admin
>
> Looks like the default used is still 60 sec.
>
>
> So next time I'll try:
>
> sysctl dev.nvme.0.admin_timeout_period= 1800 # 30 minutes
>
> time -l \
> nvmecontrol format -f 3 -m 0 nvme0 # with appropriate value for each ?
>
>
> I'm going to wait for 30 min or more, allowing the Optane to complete
> the process before trying such. More later.
>
>
Retesting ... but first showing the prior timeout messages timestamped:
# tail -7 /var/log/messages
Sep 18 19:31:21 7950X3D-ZFS kernel: nvme0: Resetting controller due to a
timeout.
Sep 18 19:31:21 7950X3D-ZFS kernel: nvme0: event="start"
Sep 18 19:31:21 7950X3D-ZFS kernel: nvme0: event="success"
Sep 18 19:31:21 7950X3D-ZFS kernel: nvme0: aborting outstanding admin
command
Sep 18 19:31:21 7950X3D-ZFS kernel: nvme0: FORMAT_NVM (80) sqid:0 cid:15
nsid:ffffffff cdw10:00000003 cdw11:00000000
Sep 18 19:31:21 7950X3D-ZFS kernel: nvme0: ABORTED_BY_REQUEST (00/07)
crd:0 m:0 dnr:1 p:0 sqid:0 cid:15 cdw0:0
Sep 18 19:31:21 7950X3D-ZFS kernel: nvme0: done aborting outstanding admin
But, for resting:
# sysctl dev.nvme.0.admin_timeout_period=1800
dev.nvme.0.admin_timeout_period: 60
sysctl: dev.nvme.0.admin_timeout_period=1800: Invalid argument
# sysctl -T dev.nvme.0.admin_timeout_period
# sysctl -W dev.nvme.0.admin_timeout_period
dev.nvme.0.admin_timeout_period: 60
Looking . . .
static int
nvme_sysctl_timeout_period(SYSCTL_HANDLER_ARGS)
{
uint32_t *ptr = arg1;
uint32_t newval = *ptr;
int error = sysctl_handle_int(oidp, &newval, 0, req);
if (error || (req->newptr == NULL))
return (error);
if (newval > NVME_MAX_TIMEOUT_PERIOD ||
newval < NVME_MIN_TIMEOUT_PERIOD) {
return (EINVAL);
} else {
*ptr = newval;
}
return (0);
}
# grep -r NVME_MAX_TIMEOUT_PERIOD /usr/src/sys # from pkgbase update
#define NVME_MAX_TIMEOUT_PERIOD (120)
/usr/src/sys/dev/nvme/nvme_ctrlr.c: timeout_period = min(timeout_period,
NVME_MAX_TIMEOUT_PERIOD);
/usr/src/sys/dev/nvme/nvme_ctrlr.c: timeout_period = min(timeout_period,
NVME_MAX_TIMEOUT_PERIOD);
/usr/src/sys/dev/nvme/nvme_sysctl.c: if (newval > NVME_MAX_TIMEOUT_PERIOD ||
So:
# sysctl dev.nvme.0.admin_timeout_period=120
dev.nvme.0.admin_timeout_period: 60 -> 120
# time -l \
nvmecontrol format -f 3 -m 0 nvme0
nvmecontrol: format request returned error
120.11 real 0.00 user 0.00 sys
0 maximum resident set size
0 average shared memory size
0 average unshared data size
0 average unshared stack size
149 page reclaims
0 page faults
0 swaps
0 block input operations
0 block output operations
0 messages sent
0 messages received
0 signals received
5 voluntary context switches
0 involuntary context switches
# tail -7 /var/log/messages
Sep 18 20:26:34 7950X3D-ZFS kernel: nvme0: Resetting controller due to a
timeout.
Sep 18 20:26:34 7950X3D-ZFS kernel: nvme0: event="start"
Sep 18 20:26:34 7950X3D-ZFS kernel: nvme0: event="success"
Sep 18 20:26:34 7950X3D-ZFS kernel: nvme0: aborting outstanding admin
command
Sep 18 20:26:34 7950X3D-ZFS kernel: nvme0: FORMAT_NVM (80) sqid:0 cid:11
nsid:ffffffff cdw10:00000003 cdw11:00000000
Sep 18 20:26:34 7950X3D-ZFS kernel: nvme0: ABORTED_BY_REQUEST (00/07)
crd:0 m:0 dnr:1 p:0 sqid:0 cid:11 cdw0:0
Sep 18 20:26:34 7950X3D-ZFS kernel: nvme0: done aborting outstanding admin
So, as stands, the FreeBSD OS does not let me know if the format
completed successfully because I can not make it wait for the result
from the device finishing.
According to Intel documentation referenced in an earlier message of
this sequence, even admin commands are ignored until the format
completes (presumes power is not cycled first).
--
===
Mark Millard
marklmi at yahoo.com