SG_RESET_WP(8)

πŸ“¦
version 1.49 Β· 3 versions
, in alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ SG_RESET_WP(8) ✨

okay bestie, this is the SG_RESET_WP(8) manual page from SG3_UTILS πŸ’– it's the guide for the sg_reset_wp tool, and it's honestly so useful 🫢


πŸŽ€ NAME πŸŽ€

sg_reset_wp β€” send a SCSI RESET WRITE POINTER command πŸ¦‹

🌸 SYNOPSIS 🌸

sg_reset_wp [--all] [--count=ZC] [--help] [--verbose] [--version]
[--zone=ID] DEVICE

πŸ’… DESCRIPTION πŸ’…

okay so this tool sends a SCSI RESET WRITE POINTER command to your DEVICE πŸ”₯ the command is described in the ZBC standard (INCITS 536-2016) and in the draft ZBC-2 documents over at T10, like zbc2r12.pdf. literally the source of truth, no cap ✨

✨ OPTIONS ✨

quick heads up: arguments to long options are mandatory for short options as well πŸ™ˆ

  • -a, --all β€” this sets the ALL field in the cdb, so the reset hits every open zone and every full zone πŸ’œ if you use this, then any --zone=ID you pass gets ignored (rude, but that's the rule). you need either this or --zone=ID, one of them is required, periodt πŸ‘‘
  • -C, --count=ZC β€” ZC goes into the Zone Count field of the cdb for the RESET WRITE POINTER command. ZC should be somewhere from 0 to 65535 (0xffff), inclusive πŸ“ what the DEVICE actually does with it depends on whether --all is set too. for the full tea, check the RESET WRITE POINTER command description (section 5.9, table 46 in zbc2r12.pdf) 🧚
  • -h, --help β€” prints the usage message and then exits πŸ’€
  • -v, --verbose β€” bumps up the verbosity level, so you get extra debug output πŸ”
  • -V, --version β€” prints the version string and then exits 🌈
  • -z, --zone=ID β€” ID gets placed in the cdb's ZONE ID field. a zone id is a zone start logical block address (LBA), and this triggers a reset write pointer on whatever zone has that ZONE ID ✨ the default value is 0. you need either this or --all, so don't forget 🫢 ID is decimal by default, but if you prefix it with 0x or stick a trailing h on it, it's read as hexadecimal instead πŸ¦‹

πŸ“ NOTES πŸ“

the Zones Emptied log parameter in the Zoned Block Device Statistics log page keeps count of how many times RESET WRITE POINTER has been (successfully) invoked πŸ“Š so it's basically the scoreboard 😭

πŸšͺ EXIT STATUS πŸšͺ

the exit status of sg_reset_wp is 0 when it works πŸ’– otherwise, go check the sg3_utils(8) man page 🫢

πŸ‘©β€πŸ’» AUTHORS πŸ‘©β€πŸ’»

written by Douglas Gilbert, the legend himself πŸ‘‘

πŸ› REPORTING BUGS πŸ›

if something's broken, report it to <dgilbert at interlog dot com> πŸ’Œ

Copyright Β© 2014-2022 Douglas Gilbert 🌸 this software is distributed under a BSD-2-Clause license. there is NO warranty, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, so use your best judgment πŸ’…

πŸ”— SEE ALSO πŸ”—

sg_rep_zones,sg_zone(sg3_utils) ✨


okay that's the whole tea, bestie 🫢 from sg3_utils-1.48, February 2022, with SG_RESET_WP(8) energy forever πŸ’–πŸ¦‹πŸŒˆ

πŸ“¦ where this page comes from