Add NVMe Format NVM support to camcontrol(8):
camcontrol nvformat ndaX [-e <user|crypto|num>] [-G]
[-f format] [-l pil] [-m mset] [-p pi]This allows formatting an NVMe namespace (or, with -G, all
namespaces on the drive), changing the LBA format (sector size and
metadata size), configuring protection information, and secure
erase (user data or cryptographic).
The supported LBA formats and the current LBA format for a
namespace are visible in the NVMe namespace Identify data, via
camcontrol identify ndaX -N.
sbin/camcontrol/nvformat.c:
New file, the camcontrol(8) nvformat subcommand.
sbin/camcontrol/camcontrol.c:
Add the nvformat subcommand.
sbin/camcontrol/camcontrol.h:
Add the nvmeformat() prototype.
sbin/camcontrol/Makefile:
Add nvformat.c to the build.
sbin/camcontrol/camcontrol.8:
Document the nvformat subcommand. Point readers of the format (SCSI FORMAT UNIT) subcommand documentation at nvformat for NVMe devices.
Sponsored by: Spectra Logic
Depends on D59534
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>