SG_REFERRALS(8)
π SG_REFERRALS π
okay bestie, welcome to sg_referrals β a little icon from the sg3_utils collection (that's the manual fam, section 8, we're in the big-kid sysadmin pages now π«Ά).
β¨ NAME β¨
sg_referrals β the girl whose whole job is to send the SCSI REPORT REFERRALS command. that's it. that's the gig. π
πΈ SYNOPSIS πΈ
sg_referrals [--help] [--hex] [--lba=LBA] [--maxlen=LEN] [--one-segment]
[--raw] [--readonly] [--verbose] [--version] DEVICE
π¦ DESCRIPTION π¦
so here's the vibe: you point sg_referrals at a DEVICE, it sends the SCSI REPORT REFERRALS command, and then it outputs the response back at you. slay. β¨
lowkey a little history moment: this command was introduced in (draft) SBC-3 revision 24, and any device that supports referrals should support this command. iykyk. π
by default it decodes the response for all user data segment referral descriptors β like, every single one, no crumbs left. π if you want less yapping, the --lba and --one-segment options are right there to trim the output down. main character energy: you decide how much screen time the response gets. π
π OPTIONS π
quick heads up bestie: arguments to long options are mandatory for short options too. no skipping, periodt.
-h,--helpβ prints the usage message, then dips out. bye. π-H,--hexβ outputs the response to this command in ASCII hex, for when you wanna see the raw digits in all their glory.-l,--lba=LBAβ where LBA is the Logical Block Address (LBA) in the first user data segment that theDEVICEshould report the referrals parameter data for. very specific, very intentional. π-m,--maxlen=LENβ where LEN is the (maximum) response length in bytes. it gets placed in the cdb's "allocation length" field. if you don't give it one,256is used. and256is literally enough space for the response header and user data segment descriptors β she's got room. π«Ά-s,--one-segmentβ reports the user data segment of the segment specified by the LBA parameter only. one segment. one moment. no plus-ones. π-r,--rawβ outputs the response in binary, straight to stdout. raw and unfiltered, we love that for her. π₯-R,--readonlyβ opens theDEVICEread-only (e.g. in Unix with theO_RDONLYflag). the default is to open it read-write. so if you want zero writes happening, say it with your chest. β¨-v,--verboseβ increases the level of verbosity, i.e. debug output. any extra output caused by this option gets sent to stderr β keep your stdout clean, bestie. π-V,--versionβ prints the version string and then exits. cute and brief. β
π NOTES π
for a discussion of referrals, see section 4.25 of sbc3r25.pdf at https://www.t10.org (or the corresponding section of a later draft). yes, actual homework. yes, it's giving research era. π§
π EXIT STATUS π
the exit status of sg_referrals is 0 when it's successful. ngl that's the dream. π
otherwise? see the sg3_utils(8) man page. she'll explain. π
π AUTHORS π
Written by Douglas Gilbert and Hannes Reinecke. icons, both of them. π«Ά
π REPORTING BUGS π
report bugs to <dgilbert at interlog dot com>. be nice, be specific, include the details. π
π COPYRIGHT π
Copyright Β© 2009-2014 Douglas Gilbert and Hannes Reinecke
this software is distributed under a BSD-2-Clause license. there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. like, none. zero. nada. don't come for her if it breaks. π
β SEE ALSO β
and that's the page, bestie π
β¨ this whole thing is from sg3_utils-1.39, dated May 2014 β vintage, but make it iconic. π¦πΈ
π¦ where this page comes from
- arch rolling: sg3_utils 1.49-1 Β· GPL-2.0-or-later AND BSD-2-Clause
- nixpkgs unstable: sg3_utils 1.49
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms