NVME-LNVM-DIAG-SE(1)
β¨ NVME-LNVM-DIAG-SE(1) β the nvme manual, but make it cute β¨
okay bestie, welcome to the NVMe Manual, section 1, and today's main character is nvme-lnvm-diag-set-bbtbl. yes the page title is a whole mouthful, but we move π
πΈ NAME πΈ
nvme-lnvm-diag-set-bbtbl β literally just here to set a block state in the bad block table. that's it. that's the job. she's focused, she's iconic.
π SYNOPSIS π
nvme lnvm-diag-set-bbtbl [--namespace-id=<NUM> | -n <NUM>]
[--channel-id=<CHID> | -c <CHID>]
[--lun-id=<LUNID> | -l <LUNID>]
[--plane-id=<PLANEID> | -p <PLANEID>]
[--block-id=<BLKID> | -b <BLKID>]
[--value=<NUM> | -v <NUM>]
look at her. all those optional flags, living her flexible life π¦
π DESCRIPTION π
so what we're doing here is setting the bad block table for a given channel, lun, plane and block, with value v. no cap, that's the whole vibe.
and for every block that's available, the status byte gets read like this:
0: Good block1: Bad block2: Grown bad block4: Device reserved block8: Host-side reserved block16: Media managed reserved block
okay those numbers are lowkey doing the most (0, 1, 2, 4, 8, 16?? very powers-of-two of her β¨) but that's literally how the status byte reads, so memorize it bestie.
π OPTIONS π
--namespace-id=<NUM>,-n <NUM>β the namespace id you wanna use π«Ά--channel-id,-cβ the channel id--lun-id,-lβ the LUN id--plane-id,-pβ the plane id--block-id,-bβ the block id
also just clocking that--value=<NUM>/-v <NUM>shows up in the synopsis up there, even though she didn't get her own lil bullet in this list. she's giving mysterious. we still love her. π
π₯ EXAMPLES π₯
- Set channel
0, lun0, plane0, block10to bad block value2(grown bad) on physical device/dev/nvme0:
# nvme lnvm-diag-set-bbtbl /dev/nvme0 -c 0 -l 0 -p 0 -b 10 -v 2
ate. no crumbs. π
π NVME π
Part of the nvme-user suite. she runs with a whole crew, iykyk π
and that's the whole page, bestie!! π this lil masterpiece is from the NVMe source, dated 11/11/2021 β so if you ever need to cite her, that's the receipts. go forth and set those bad block states, you absolute icon βππ¦
π¦ where this page comes from
- ubuntu jammy: nvme-cli 1.16-3build1 Β· GPL-2.0-or-later
- ubuntu jammy: nvme-cli 1.16-3ubuntu0.3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms