NVME-LNVM-DIAG-SE(1)

πŸ“¦ version 1.16, in ubuntu jammy

✨ 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 block
  • 1: Bad block
  • 2: Grown bad block
  • 4: Device reserved block
  • 8: Host-side reserved block
  • 16: 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 πŸ”₯

  1. Set channel 0, lun 0, plane 0, block 10 to bad block value 2 (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