{
    "mode": "man",
    "parameter": "sg_referrals",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/sg_referrals/8/json",
    "generated": "2026-06-02T21:27:46Z",
    "synopsis": "sgreferrals [--help] [--hex] [--lba=LBA] [--maxlen=LEN] [--one-segment] [--raw] [--readonly]\n[--verbose] [--version] DEVICE",
    "sections": {
        "NAME": {
            "content": "sgreferrals - send SCSI REPORT REFERRALS command\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "sgreferrals [--help] [--hex] [--lba=LBA] [--maxlen=LEN] [--one-segment] [--raw] [--readonly]\n[--verbose] [--version] DEVICE\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Send the SCSI REPORT REFERRALS command to the DEVICE and outputs the response.  This  command\nwas introduced in (draft) SBC-3 revision 24 and devices that support referrals should support\nthis command.\n\nThe default action is to decode the response for all user data segment referral  descriptors.\nThe amount of output can be reduced by the --lba and --one-segment options.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "Arguments to long options are mandatory for short options as well.\n",
            "subsections": [
                {
                    "name": "-h --help",
                    "content": "output the usage message then exit.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-H --hex",
                    "content": "output response to this command in ASCII hex.\n",
                    "flag": "-H",
                    "long": "--hex"
                },
                {
                    "name": "-l --lba",
                    "content": "where LBA is the Logical Block Address (LBA) in the first user data segment the DEVICE\nshould report the referrals parameter data for.\n",
                    "flag": "-l",
                    "long": "--lba"
                },
                {
                    "name": "-m --maxlen",
                    "content": "where LEN is the (maximum) response length in bytes. It is placed in the cdb's  \"allo‐\ncation  length\"  field. If not given then 256 is used. 256 is enough space for the re‐\nsponse header and user data segment descriptors.\n",
                    "flag": "-m",
                    "long": "--maxlen"
                },
                {
                    "name": "-s --one-segment",
                    "content": "report the user data segment of the segment spefified by the LBA parameter only.\n",
                    "flag": "-s",
                    "long": "--one-segment"
                },
                {
                    "name": "-r --raw",
                    "content": "output response in binary (to stdout).\n",
                    "flag": "-r",
                    "long": "--raw"
                },
                {
                    "name": "-R --readonly",
                    "content": "open the DEVICE read-only (e.g. in Unix with the ORDONLY flag).  The  default  is  to\nopen it read-write.\n",
                    "flag": "-R",
                    "long": "--readonly"
                },
                {
                    "name": "-v --verbose",
                    "content": "increase the level of verbosity, (i.e. debug output). Additional output caused by this\noption is sent to stderr.\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "-V --version",
                    "content": "print the version string and then exit.\n",
                    "flag": "-V",
                    "long": "--version"
                }
            ]
        },
        "NOTES": {
            "content": "For a discussion of referrals see section 4.25 of sbc3r25.pdf at http://www.t10.org  (or  the\ncorresponding section of a later draft).\n",
            "subsections": []
        },
        "EXIT STATUS": {
            "content": "The  exit  status  of sgreferrals is 0 when it is successful. Otherwise see the sg3utils(8)\nman page.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Written by Douglas Gilbert and Hannes Reinecke.\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "Report bugs to <dgilbert at interlog dot com>.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright © 2009-2014 Douglas Gilbert and Hannes Reinecke\nThis software is distributed under a FreeBSD license. There is NO warranty; not even for MER‐\nCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "sgvpd(8)\n\n\n\nsg3utils-1.39                                May 2014                               SGREFERRALS(8)",
            "subsections": []
        }
    },
    "summary": "sgreferrals - send SCSI REPORT REFERRALS command",
    "flags": [
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "output the usage message then exit."
        },
        {
            "flag": "-H",
            "long": "--hex",
            "arg": null,
            "description": "output response to this command in ASCII hex."
        },
        {
            "flag": "-l",
            "long": "--lba",
            "arg": null,
            "description": "where LBA is the Logical Block Address (LBA) in the first user data segment the DEVICE should report the referrals parameter data for."
        },
        {
            "flag": "-m",
            "long": "--maxlen",
            "arg": null,
            "description": "where LEN is the (maximum) response length in bytes. It is placed in the cdb's \"allo‐ cation length\" field. If not given then 256 is used. 256 is enough space for the re‐ sponse header and user data segment descriptors."
        },
        {
            "flag": "-s",
            "long": "--one-segment",
            "arg": null,
            "description": "report the user data segment of the segment spefified by the LBA parameter only."
        },
        {
            "flag": "-r",
            "long": "--raw",
            "arg": null,
            "description": "output response in binary (to stdout)."
        },
        {
            "flag": "-R",
            "long": "--readonly",
            "arg": null,
            "description": "open the DEVICE read-only (e.g. in Unix with the ORDONLY flag). The default is to open it read-write."
        },
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "increase the level of verbosity, (i.e. debug output). Additional output caused by this option is sent to stderr."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "print the version string and then exit."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "sgvpd",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/sgvpd/8/json"
        }
    ]
}