GithubHelp home page GithubHelp logo

hreinecke / sg3_utils Goto Github PK

View Code? Open in Web Editor NEW
142.0 28.0 91.0 7.98 MB

Deprecated git-svn mirror for sg3_utils

Home Page: http://sg.danny.cz/sg/sg3_utils.html

License: Other

C 86.04% Shell 2.16% Makefile 0.36% M4 0.16% Roff 0.07% C++ 10.31% HTML 0.91%

sg3_utils's Introduction

                        README for sg3_utils
                        ====================
Introduction
------------
sg3_utils is a package of utilities originally written to send individual
SCSI commands to storage devices that used one of the SCSI command sets.
These utilities can be divided into three groups:
   - sg_raw: the user supplies the CDB (Command Descriptor Block) and
     optionally the size of the data-in and data-out buffers
   - one command utilities: the majority of the utilities in this package
     send one SCSI command. Their names start with "sg_" while the
     remaining part of their name alludes to the name of the command which
     is sent. For example, "sg_inq" sends the SCSI INQUIRY command. Some
     utilities in this group send one of a selection of commands, typically
     those commands have a lot it common (e.g. sg_write_x).
   - copy type utilities: sg_dd, sgp_dd and sgm_dd use the Unix dd command
     functionality and command line syntax as a template. sg_dd may also be
     used to verify that two storage devices (or part thereof) contain the
     same user data, stopping at the first "miscompare". sg_xcopy sends the
     SCSI EXTENDED COPY command which in some cases can do offloaded copies.

Platforms
---------
These utilities were written on Linux and should work from Linux kernel
(lk) 2.4 through to the current series 6. The third group ("copy type")
are only implemented on Linux, but a separate portable package/utility
called ddpt implements similar functionality. The first two groups are
implemented (i.e. ported) to Android, FreeBSD, NetBSD, Solaris and
Windows.  The Windows port uses either a Cygwin or MinGW (plus Msys)
build environment (rather than Visual Studio).

Library
-------
Many of these utilities share a lot of code (e.g. SCSI error messages)
so a lot of repetition (potentially error prone) is saved by having a
library called libsgutils or some variation on that name. Distributions
(especially of Linux) have differing policies on how a library (and a
package) should be named. For that reason this package is sometimes
known as "sg3-utils" (i.e. the underscore is turned into a hyphen).
Various other packages use libsgutils. The library interface is not
altered from one package release, to the next, but the library interface
may be expanded. If a utility from one release is used with a libsgutils
from an earlier release, then the runtime linking may fail. Typically
package managers take care of these details so that runtime linking
errors should be rare.

Command Sets
------------
SCSI command sets are not the only storage command sets in wide use, there
are also ATA and NVMe command sets. There is a SCSI command set to
translate SCSI commands to ATA commands (called SAT: SCSI to ATA
Translation). SAT includes an ATA PASS-THROUGH SCSI command and sg_sat_*
utilities (there are four) are examples of using SAT. The SAS transport
(Serial Attached SCSI) can convey ATA commands through a SCSI/SAS domain
via its Serial ATA Tunnelled Protocol (STP).

NVMe command sets (e.g. Admin, NVM and MI) are relatively new. There was an
early paper on a SCSI to NVMe Translation Layer (SNTL) but it hasn't been
standardized. The sg_inq utility will send (and decode the response of) a
SCSI INQUIRY command if the underlying device is a SCSI device. If the
underlying device is a NVMe controller or namespace, then sg_inq will send
a NVMe Admin Identify command and decode the response. The sg_ses utility
(for SCSI Enclosure Services) also checks whether its underlying device is
SCSI or NVME. In the NVMe case, sg_ses translates the SCSI SEND DIAGNOSTIC
and READ DIAGNOSTIC RESULTS commands to the NVMe Management Interface (MI)
SES Send and SES Receive commands respectively. The output of the sg_ses
utility should be similar, irrespective of whether the "SES" device is
SCSI or NVMe.

The sg_raw utility may send NVMe Admin or NVM commands (as well as SCSI
commands). One difficulty with a command-line utility invoking NVME
commands is that those commands contain memory addresses for data-in (i.e.
data from the storage device) or data-out (i.e. data sent toward the
storage device) transfers. See the sg_raw manpage for how this difficulty
is addressed.

JSON
----
Taking a lead from smartmontools project, JSON is slowly being added to
those utilities that decode a significant amount of (meta-)data supplied
by storage devices. Human readable output is still the default with the
'--json' option changing the output to JSON. The '--json' option itself
takes an optional argument which is a string where each character turns
on (or off, if preceded by a '-') some attribute of the JSON output
(e.g. '--json=h-e').

One difficulty with JSON (or the json_builder library) is that its integer
representation is signed, 64 bit in size, and rendered in decimal, with a
leading negative sign if needed. However storage metadata tends to use
hexadecimal for large values (e.g. Logical Block Addresses (LBAs)). This
issue is addressed with the 'h' argument (e.g. '--json=h') which changes
decimal rendered numbers into a JSON subobject with two name-value pairs:
one name is 'i' whose value is the same decimal rendered integer, and the
other named 'hex' whose value is a JSON string with that integer rendered
in (unsigned) hexadecimal in that string.

To simplify name decoding in JSON, the "snake notation" convention is used.
This restricts names to the 26 lower case, alphabetical characters (from
English), the 10 digits and underscore. Further an underscore is never the
first or last character of the name and is never repeated. So underscore
can be used as a name separator (e.g. "device_id"). Other JSON producing
utilities follow different naming conventions. One advantage of the "snake
notation" is that it is compatible with various Unix pseudo file system
naming conventions (e.g. procfs and sysfs in Linux).

There is a manual page called "sg3_utils_json" that contains more
information.

Documentation
-------------
Manual pages ("manpages") are the primary method of utility documentation.
All utilities and scripts that are installed by this package have a
manpage. There are utilities in the examples, testing and utils
directories that are not installed and do not have manpages. Nearly
all utilities have runtime help, usually invoked with either the '-h'
short option or the '--help' long option. There is also an overarching
manpage called "sg3_utils". All manpages are placed in chapter 8 which
is for system administration commands/utilities.

The sg3_utils package and some more complex utilities have html pages:
   sg3_utils: https://sg.danny.cz/sg/sg3_utils.html
   sg_ses:    https://sg.danny.cz/sg/sg_ses.html
   sg_dd:     https://sg.danny.cz/sg/sg_dd.html

A tarball (and zip) of all the manpages from the previous release are
here:
   https://sg.danny.cz/sg/p/sg3_utils_man_html.tgz
   https://sg.danny.cz/sg/p/sg3_utils_man_html.zip

There is a html rendering of the sg3_utils manpage in the same directory
as this README file called sg3_utils.man8.html .

The previous README file is now called README.details plus there are
these OS specific files: README.freebsd , README.solaris , README.tru64
and README.win32 . To know the current state of the package the ChangeLog
file is the good reference.

The author's primary source code repository uses subversion and is on
the author's equipment (a RPi). One advantage of subversion is its
revision numbers which are simply integers starting at 1 and ascending.
For this package the current revision is 928 . The subversion repository
is mirrored in git (using "git svn" tools) here:
    https://github.com/doug-gilbert/sg3_utils


Douglas Gilbert
26th April 2023

sg3_utils's People

Contributors

doug-gilbert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sg3_utils's Issues

sg_pt_solaris.c will not compile on Solaris

There are references in this file to BSD, and some missing ";" that are causing it to fail to compile.

Fixing these obvious issues by changing the BSD references to solaris and adding in the missing semicolons has allowed it to compile successfully.

Writes to LBAs at or beyond 2TB issue

In the attached log, I'm able to write to LBAs below the 2TB range but not after. I have tried every possible combination of sg_write* and sg_read* without success. The disks I'm trying this are operating in JBOD mode behind a RAID that is also configured as JBOD.

1.47 fails to build with musl due to use of `uint`

Build fails on alpine linux with the following error:

gcc -DHAVE_CONFIG_H -I. -I..  -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -fomit-frame-pointer -Wall -W  -Os -fomit-frame-pointer -MT sg_dd.o -MD -MP -MF .deps/sg_dd.Tpo -c -o sg_dd.o sg_dd.c
sg_dd.c: In function 'main':
sg_dd.c:2402:17: error: unknown type name 'uint'; did you mean 'int'?
 2402 |                 uint off;
      |                 ^~~~
      |                 int
make[2]: *** [Makefile:1172: sg_dd.o] Error 1

rescan-scsi-bus.sh --luns=<lun #> prints existing LUNs instead of scanning the LUN specified

We have a customer report that the rescan-scsi-bus.sh script behavior changed from v1.35 to v1.40 regarding the rescan-scsi-bus.sh --luns=<lun #> command. Also latest master (2016-05-17, 2e5c149) is affected.

The expected behavior is that only the LUN specified is scanned at already existing SCSI hosts but it prints all existing LUNs instead and doesn't scan anything (verified with set -x). The command rescan-scsi-bus.sh --luns=<lun #> -a works as expected instead but also scans the specified LUN at not existing SCSI hosts.

The old behavior with v1.35 is that it behaves like the -a option is always set.

Should the expected behavior of scanning only the specified LUN at only existing SCSI hosts be implemented?

New behavior output:

node02:~ # rescan-scsi-bus.sh --luns=1
Scanning SCSI subsystem for new devices
Scanning host 0 for  SCSI target IDs  0 1 2 3 4 5 6 7, LUNs  1
Scanning host 1 for  SCSI target IDs  0 1 2 3 4 5 6 7, LUNs  1
Scanning host 2 for  SCSI target IDs  0 1 2 3 4 5 6 7, LUNs  1
 Scanning for device 2 0 0 0 ... 
OLD: Host: scsi2 Channel: 00 Id: 00 Lun: 00
      Vendor: IET      Model: VIRTUAL-DISK     Rev: 0   
      Type:   Direct-Access                    ANSI SCSI revision: 04
 Scanning for device 2 0 0 1 ... 
OLD: Host: scsi2 Channel: 00 Id: 00 Lun: 01
      Vendor: IET      Model: VIRTUAL-DISK     Rev: 0   
      Type:   Direct-Access                    ANSI SCSI revision: 04
 Scanning for device 2 0 0 2 ... 
OLD: Host: scsi2 Channel: 00 Id: 00 Lun: 02
      Vendor: IET      Model: VIRTUAL-DISK     Rev: 0   
      Type:   Direct-Access                    ANSI SCSI revision: 04
0 new or changed device(s) found.          
0 remapped or resized device(s) found.
0 device(s) removed.

Old behavior output:

node02:~ # rescan-scsi-bus.sh --luns=1
Scanning SCSI subsystem for new devices
Scanning host 0 for  SCSI target IDs  0 1 2 3 4 5 6 7, LUNs  1
Scanning host 1 for  SCSI target IDs  0 1 2 3 4 5 6 7, LUNs  1
Scanning host 2 for  SCSI target IDs  0 1 2 3 4 5 6 7, LUNs  1
 Scanning for device 2 0 0 1 ... 
OLD: Host: scsi2 Channel: 00 Id: 00 Lun: 01
      Vendor: IET      Model: VIRTUAL-DISK     Rev: 0   
      Type:   Direct-Access                    ANSI SCSI revision: 04
0 new or changed device(s) found.          
0 remapped or resized device(s) found.
0 device(s) removed.

sg_ses command fails when reading overall elements

sg_ses command is failing when reading overall elements for voltage sensor. This issue is seen with multiple enclosure OEMs (DataON, Dell & Supermicro).
This issue is not present in the older releases of sg_ses. We have noticed that sg3_utils-1.47 version does not have this issue.


lsscsi -g

[0:0:299:0] enclosu DataON DNS-2640 0105 - /dev/sg0

./sg_ses --get=disable --index=vs,-1 /dev/sg0

0
0
index: 8,-1-0 not found
Some error occurred, try again with '-v' or '-vv' for more information

debugdata.zip


Capturing below debug data. Please let me know if further information is required.
sg_ses --page=all -HHHH /dev/sg0 > debugdata.hex

macOS Build?

Not a bug - just a question...

I'm presuming not, but is it possible to build and use this on macOS?

Use case: I need to send a SCSI INQUIRY command to old style (non-iOS) iPod devices on Windows, Linux, and macOS. I've got Windows and Linux covered. Finding hardly anything at all on how to do this on macOS.

[Question] Simultaneous execution of sg_persist command and mount command.

Hi everyone,

We use an agent called fence_scsi in a Linux cluster using the sg_persist command.
(https://github.com/ClusterLabs/fence-agents/blob/master/agents/scsi/fence_scsi.py)

This agent can operate in conjunction with the watchdog service, but if the device mount command and key acquisition by sg_persist overlap, the mount command may fail.

The problem seems to be that when the key acquisition by sg_persist is executed, the device accessed by sg_persist becomes invisible by mount command.

Is it possible for sg_persist to deal with this problem?
Or is the new sg_persist version solved this problem?

The problem can be reproduced by running the following script simultaneously.

Script 1.

#!/bin/sh
for i in {1..1000}; do
echo "### ${i} ###"

mount /dev/msa_b1 /dbfp/pgdata
if [ $? -ne 0 ]; then
    break
fi
sleep 2
umount /dev/msa_b1
sleep 2

done;

Script 2.

#!/bin/sh
for i in {1..10000}; do
echo "### ${i} ###"
sg_persist -n -i -k -d /dev/msa_b
sleep 1
done;

The environment is as follows.

  • RHEL8.0
  • sg3_utils-libs-1.44-2.el8.x86_64
  • sg3_utils-1.44-2.el8.x86_64

The key is registered in advance in /dev/msa_b.

Best Regards,
Hideo Yamauchi.

Does REQUEST SENSE through sg_raw spin up SAS drive in powered off state?

I do not think this is an issue but I wanted to get some information why SAS drives in powered off state are getting spun up when issuing REQUEST SENSE through sg_raw.

Here is want I found during my investigation:

  1. Issue sg_start to spin down a SAS drive:
    [root@sc-lab-kariraad-linux86 ~]# sg_start -v --stop /dev/sdc
    Start stop unit command: 1b 00 00 00 00 00

  2. Issue REQUEST SENSE using sg_raw: I was expecting the drive to return a check condition with ASC/ASCQ as 0x4/0x2
    [root@sc-lab-kariraad-linux86 ~]# sg_raw -v -r 32 /dev/sdc 03 00 00 00 FC 00
    cdb to send: 03 00 00 00 fc 00
    SCSI Status: Good

Received 32 bytes of data:
00 70 00 00 00 00 00 00 0a 00 00 00 00 00 00 00 00 p...............
10 00 00 95 46 3b 00 00 00 38 2a 95 46 3b 00 00 00 ...F;...8*.F;...
No errors

  1. In the dmesg log I found the following prints:
    [root@sc-lab-kariraad-linux86 ~]# dmesg | grep sdc
    sdc: Spinning up disk....<7>pdflush(438): WRITE block 477626552 on dm-0
    sdc : very big device. try to use READ CAPACITY(16).
    SCSI device sdc: 7814037168 512-byte hdwr sectors (4000787 MB)
    sdc: Write Protect is off
    sdc: Mode Sense: db 00 10 08
    SCSI device sdc: drive cache: write back w/ FUA
    sdc : very big device. try to use READ CAPACITY(16).
    SCSI device sdc: 7814037168 512-byte hdwr sectors (4000787 MB)
    sdc: Write Protect is off
    sdc: Mode Sense: db 00 10 08
    SCSI device sdc: drive cache: write back w/ FUA
    sdc:<7>sg_raw(10526): READ block 0 on sdc
    sg_raw(10526): READ block 8 on sdc
    sg_raw(10526): READ block 16 on sdc
    sg_raw(10526): READ block 24 on sdc
    sg_raw(10526): READ block 32 on sdc
    sg_raw(10526): READ block 7814037160 on sdc
    sg_raw(10526): READ block 7814037128 on sdc
    sg_raw(10526): READ block 7814037136 on sdc
    sg_raw(10526): READ block 7814037144 on sdc
    sg_raw(10526): READ block 7814037152 on sdc
    sdc1 sdc2 sdc3

  2. I do not see the drive spinning up when I force the drive into one of the power condition states. In the example below I am forcing the drive to enter STANDBY_Y
    [root@sc-lab-kariraad-linux86 ~]# sg_start -p 3 -m 1 -v /dev/sdc
    Start stop unit command: 1b 00 00 01 30 00

[root@sc-lab-kariraad-linux86 ~]# sg_raw -v -r 32 /dev/sdc 03 00 00 00 FC 00
cdb to send: 03 00 00 00 fc 00
SCSI Status: Good

Received 32 bytes of data:
00 70 00 00 00 00 00 00 0a 00 00 00 00 5e 0a 00 00 p...........^...
10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
No errors

I would really appreciate your thoughts on this.

sg_format test unit ready fails on Solaris

sg_format's default behaviour is "set IMMED=1 and poll with Test Unit Ready", however on Solaris this "Test Unit Ready" command appears to fail.

This results in sg_format reporting that the format is complete, when in fact it isn't. Using the "--wait" option makes sg_format correctly wait until the operation finishes, however the default behaviour is misleading (and caught me offguard, because it reported the operation had finished when it had not).

Example output where error occurs:

Format unit has started
test unit ready: pass-through os error: Invalid argument
FORMAT UNIT Complete

The 'test unit ready' should be checking for an error in its return code - and in this unknown state when an error is returned, warning the user that the drive may or may not be complete, rather than saying it is complete. It may also be better to default to "--wait" on Solaris rather than "set IMMED=1 with Test Unit Ready", unless the test unit ready command can be fixed.

Note: OS in my instance is SmartOS (Illumos).

sg_scan -s (on windows) not seeing any enclosures

Hi,

I was instructed by the vendor (AICIPC) of one of our JBODs to adjust some settings on the JBOD using sg_ses. I downloaded version 1.46 of the windows build of the sg_utils and pushed to our server (Dell 740xd with H740p and H840 raid cards).

I opened an elevated command shell and executed sg_scan -s to get a list of the bus devices. The tool only returns the virtual disks configured on the adapter. No Enclosures are listed. Is there a known issue with the latest windows server version and Dell Cards?

regards
Fabian

Numerical result out of range issue in rescan-scsi-bus.sh

In some situation,the lun of scsi device become a long numeric string(big than integer) and we hit "Numerical result out of range" warning while running rescan-scsi-bus.sh:
...
/usr/bin/rescan-scsi-bus.sh: line 576: test: 13370438325000993144: integer
expression expected
Scanning for device 13 0 0 12644192649239960158 ...
OLD: /usr/bin/rescan-scsi-bus.sh: line 132: printf: warning:
12644192649239960158: Numerical result out of range
...

Not sure why we got such a long numeric lun,still investigating.
But anyway,I think it is better to handle the lun as String rather than Int in rescan-scsi-bus.sh ,i.e.:
--- a/scripts/rescan-scsi-bus.sh
+++ b/scripts/rescan-scsi-bus.sh
@@ -128,7 +128,7 @@ print02i()
if [ "$1" = "*" ] ; then
echo "00"
else

  •    printf "%02i" "$1"
    
  •    printf "%02s" "$1"
    
    fi
    }

@@ -622,7 +622,7 @@ doreportlun()
inlist=
# OK, is existing $lun (still) in reported list
for tmplun in $targetluns; do

  •  if test $tmplun -eq $lun ; then
    
  •  if test "$tmplun" = "$lun" ; then
       inlist=1
       dolunscan $lun0added
     else
    

Power Condition Transitions log page is incorrectly decoded

Parameter codes used to decode PCT log page in src/sg_logs.c seem to contradict SCSI spec:
0000h -> active
0001h -> idle_a
0002h -> idle_b
0003h -> idle_c

SPC-4, Revision 37a, Table 399:
0001h -> active
0002h -> idle_a
0003h -> idle_b
0004h -> idle_c

Building in MSYS

What I did:

git clone https://github.com/hreinecke/sg3_utils
cd sg3_utils
./configure --enable-win32-spt-direct
make

what I got:

Making all in src
make[2]: Entering directory '/home/Zibri/sg3_utils/src'
gcc -DHAVE_CONFIG_H -I. -I..  -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -Wall -W  -g -O2 -MT sg_bg_ctl.o -MD -MP -MF .deps/sg_bg_ctl.Tpo -c -o sg_bg_ctl.o sg_bg_ctl.c
mv -f .deps/sg_bg_ctl.Tpo .deps/sg_bg_ctl.Po
/bin/sh ../libtool  --tag=CC   --mode=link gcc -Wall -W  -g -O2   -o sg_bg_ctl.exe sg_bg_ctl.o ../lib/libsgutils2.la
libtool: link: gcc -Wall -W -g -O2 -o sg_bg_ctl.exe sg_bg_ctl.o  ../lib/.libs/libsgutils2.a
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: sg_bg_ctl.o: in function `sg_ll_background_control':
/home/Zibri/sg3_utils/src/sg_bg_ctl.c:111: undefined reference to `construct_scsi_pt_obj'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/src/sg_bg_ctl.c:116: undefined reference to `set_scsi_pt_cdb'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/src/sg_bg_ctl.c:117: undefined reference to `set_scsi_pt_sense'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/src/sg_bg_ctl.c:118: undefined reference to `do_scsi_pt'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/src/sg_bg_ctl.c:135: undefined reference to `destruct_scsi_pt_obj'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/src/sg_bg_ctl.c:135: undefined reference to `destruct_scsi_pt_obj'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/src/sg_bg_ctl.c:122: undefined reference to `get_scsi_pt_os_err'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: ../lib/.libs/libsgutils2.a(sg_cmds_basic.o): in function `sg_cmds_process_resp':
/home/Zibri/sg3_utils/lib/sg_cmds_basic.c:240: undefined reference to `get_pt_req_lengths'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:241: undefined reference to `get_pt_actual_lengths'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:242: undefined reference to `get_scsi_pt_sense_len'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:243: undefined reference to `get_scsi_pt_sense_buf'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:244: undefined reference to `get_scsi_pt_result_category'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:229: undefined reference to `get_pt_duration_ns'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:285: undefined reference to `get_scsi_pt_status_response'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:321: undefined reference to `get_scsi_pt_transport_err_str'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:234: undefined reference to `get_scsi_pt_duration_ms'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:339: undefined reference to `get_scsi_pt_os_err_str'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: ../lib/.libs/libsgutils2.a(sg_cmds_basic.o): in function `sg_ll_inquiry_com':
/home/Zibri/sg3_utils/lib/sg_cmds_basic.c:412: undefined reference to `partial_clear_scsi_pt_obj'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:413: undefined reference to `get_scsi_pt_cdb_buf'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:417: undefined reference to `get_scsi_pt_sense_buf'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:428: undefined reference to `set_scsi_pt_data_in'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:429: undefined reference to `do_scsi_pt'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:432: undefined reference to `get_scsi_pt_resid'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:422: undefined reference to `construct_scsi_pt_obj_with_fd'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:425: undefined reference to `set_scsi_pt_cdb'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:426: undefined reference to `set_scsi_pt_sense'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:473: undefined reference to `destruct_scsi_pt_obj'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:470: undefined reference to `set_scsi_pt_cdb'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:468: undefined reference to `set_scsi_pt_sense'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:436: undefined reference to `get_scsi_pt_os_err'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:420: undefined reference to `set_scsi_pt_sense'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:416: undefined reference to `set_scsi_pt_cdb'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: ../lib/.libs/libsgutils2.a(sg_cmds_basic.o): in function `sg_ll_test_unit_ready_com':
/home/Zibri/sg3_utils/lib/sg_cmds_basic.c:635: undefined reference to `partial_clear_scsi_pt_obj'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:636: undefined reference to `get_scsi_pt_cdb_buf'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:640: undefined reference to `get_scsi_pt_sense_buf'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:651: undefined reference to `set_scsi_pt_packet_id'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:652: undefined reference to `do_scsi_pt'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:658: undefined reference to `get_scsi_pt_sense_len'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:681: undefined reference to `destruct_scsi_pt_obj'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:678: undefined reference to `set_scsi_pt_cdb'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:676: undefined reference to `set_scsi_pt_sense'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:645: undefined reference to `construct_scsi_pt_obj_with_fd'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:648: undefined reference to `set_scsi_pt_cdb'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:649: undefined reference to `set_scsi_pt_sense'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:655: undefined reference to `get_scsi_pt_os_err'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:643: undefined reference to `set_scsi_pt_sense'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:639: undefined reference to `set_scsi_pt_cdb'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: ../lib/.libs/libsgutils2.a(sg_cmds_basic.o): in function `sg_ll_request_sense_com':
/home/Zibri/sg3_utils/lib/sg_cmds_basic.c:751: undefined reference to `get_scsi_pt_sense_buf'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:755: undefined reference to `get_scsi_pt_sense_buf'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:766: undefined reference to `set_scsi_pt_data_in'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:767: undefined reference to `do_scsi_pt'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:760: undefined reference to `construct_scsi_pt_obj_with_fd'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:763: undefined reference to `set_scsi_pt_cdb'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:764: undefined reference to `set_scsi_pt_sense'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:796: undefined reference to `destruct_scsi_pt_obj'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:792: undefined reference to `set_scsi_pt_sense'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:794: undefined reference to `set_scsi_pt_cdb'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:770: undefined reference to `get_scsi_pt_os_err'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:754: undefined reference to `set_scsi_pt_cdb'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:758: undefined reference to `set_scsi_pt_sense'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: ../lib/.libs/libsgutils2.a(sg_cmds_basic.o): in function `sg_ll_report_luns_com':
/home/Zibri/sg3_utils/lib/sg_cmds_basic.c:842: undefined reference to `partial_clear_scsi_pt_obj'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:843: undefined reference to `get_scsi_pt_cdb_buf'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:847: undefined reference to `get_scsi_pt_sense_buf'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:857: undefined reference to `set_scsi_pt_data_in'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:858: undefined reference to `do_scsi_pt'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:882: undefined reference to `destruct_scsi_pt_obj'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:879: undefined reference to `set_scsi_pt_cdb'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:877: undefined reference to `set_scsi_pt_sense'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: ../lib/.libs/libsgutils2.a(sg_cmds_basic.o): in function `create_pt_obj':
/home/Zibri/sg3_utils/lib/sg_cmds_basic.c:359: undefined reference to `construct_scsi_pt_obj'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: ../lib/.libs/libsgutils2.a(sg_cmds_basic.o): in function `sg_ll_report_luns_com':
/home/Zibri/sg3_utils/lib/sg_cmds_basic.c:854: undefined reference to `set_scsi_pt_cdb'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:855: undefined reference to `set_scsi_pt_sense'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:862: undefined reference to `get_scsi_pt_os_err'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:850: undefined reference to `set_scsi_pt_sense'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: /home/Zibri/sg3_utils/lib/sg_cmds_basic.c:846: undefined reference to `set_scsi_pt_cdb'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: ../lib/.libs/libsgutils2.a(sg_cmds_basic.o): in function `sg_cmds_open_device':
/home/Zibri/sg3_utils/lib/sg_cmds_basic.c:78: undefined reference to `scsi_pt_open_device'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: ../lib/.libs/libsgutils2.a(sg_cmds_basic.o): in function `sg_cmds_open_flags':
/home/Zibri/sg3_utils/lib/sg_cmds_basic.c:86: undefined reference to `scsi_pt_open_flags'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: ../lib/.libs/libsgutils2.a(sg_cmds_basic.o): in function `sg_cmds_close_device':
/home/Zibri/sg3_utils/lib/sg_cmds_basic.c:93: undefined reference to `scsi_pt_close_device'
/usr/lib/gcc/x86_64-pc-msys/11.2.0/../../../../x86_64-pc-msys/bin/ld: ../lib/.libs/libsgutils2.a(sg_cmds_basic.o): in function `sg_cmds_is_nvme':
/home/Zibri/sg3_utils/lib/sg_cmds_basic.c:353: undefined reference to `pt_device_is_nvme'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:795: sg_bg_ctl.exe] Error 1
make[2]: Leaving directory '/home/Zibri/sg3_utils/src'
make[1]: *** [Makefile:401: all-recursive] Error 1
make[1]: Leaving directory '/home/Zibri/sg3_utils'
make: *** [Makefile:333: all] Error 2

sg_ses crash when the value of -m parameter is less than 252

I found that sg_ses crash when the value of -m parameter is less than 252.
eg: sg_ses -p 0x97 -m 0x24 /dev/sg1 --verbose

the messages and stack are:

 [root@localhost sg3_utils]# sg_ses -p 0x97 -m 0x24 /dev/sg1 --verbose
     inquiry cdb: [12 00 00 00 24 00]
   QEMU      QEMU HARDDISK     1.5.
     disk device (not an enclosure)
     request sense cdb: [03 00 00 00 fc 00]
 Request Sense near startup detected something:
   Sense key: No Sense, additional: Additional sense: No additional sense information
   ... continue
     Receive diagnostic results cdb: [1c 01 97 00 24 00]
 Receive diagnostic results:
 Fixed format, current; Sense key: Illegal Request
 Additional sense: Invalid command operation code
 Attempt to fetch dpage 0x97 failed
     Illegal request, Invalid opcode, type: sense key + asc,ascq
 corrupted double-linked list (not small)
 Aborted (core dumped)
 #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
 #1  0x00007ffff7e02b21 in __GI_abort () at abort.c:79
 #2  0x00007ffff7e4333b in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff7f4a877 "%s\n") at ../sysdeps/posix/libc_fatal.c:181
 #3  0x00007ffff7e49aaa in malloc_printerr (str=str@entry=0x7ffff7f4b988 "corrupted double-linked list (not small)") at malloc.c:5389
 #4  0x00007ffff7e4aa0d in _int_free (av=0x7ffff7f79aa0 <main_arena>, p=<optimized out>, have_lock=<optimized out>) at malloc.c:4332
 #5  0x000000000040403b in main (argc=<optimized out>, argv=<optimized out>) at sg_ses.c:5934

I debug the code and found the reason is memset 'enc_stat_rsp' cause cross-border write.


5592     enc_stat_rsp = sg_memalign(op->maxlen, 0, &free_enc_stat_rsp, false);
5593     if (NULL == enc_stat_rsp) {
5594         pr2serr("Unable to get heap for enc_stat_rsp\n");
5595         goto err_out;
5596     }
5597     enc_stat_rsp_sz = op->maxlen;
5803         clear_scsi_pt_obj(ptvp);
5804         memset(enc_stat_rsp, 0, REQUEST_SENSE_RESP_SZ);
5805     }

The value of REQUEST_SENSE_RESP_SZ is 252, if the value of -m parameter is less than 252, memset 'enc_stat_rsp' will cause cross-border write, destroy the chunk of other variables, therefore, sg_sec will crash in free other variables.

Build failure on musl since version 1.46

Builds fails on musl since version 1.46 and d05a8bd because musl doesn't define srand48_r and mrand48_r:

sg_dd.c: In function 'main':
sg_dd.c:2127:9: warning: implicit declaration of function 'srand48_r'; did you mean 'srand48'? [-Wimplicit-function-declaration]
 2127 |         srand48_r(seed, &drand);
      |         ^~~~~~~~~
      |         srand48
/tmp/instance-0/output-1/host/bin/i586-linux-gcc -DHAVE_CONFIG_H -I. -I..  -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -c -o sgm_dd.o sgm_dd.c
/tmp/instance-0/output-1/host/bin/i586-linux-gcc -DHAVE_CONFIG_H -I. -I..  -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -c -o sgp_dd.o sgp_dd.c
sg_dd.c:2404:25: warning: implicit declaration of function 'mrand48_r'; did you mean 'mrand48'? [-Wimplicit-function-declaration]
 2404 |                         mrand48_r(&drand, &rn);
      |                         ^~~~~~~~~
      |                         mrand48
sg_dd.c: At top level:
sg_dd.c:179:28: error: storage size of 'drand' isn't known
  179 | static struct drand48_data drand;/* opaque, used by srand48_r and mrand48_r */
      |                            ^~~~~

Full build log: http://autobuild.buildroot.org/results/a72/a72d5979ba4184c38e7caccf67a3fa37983ea0af/build-end.log

power condition is not good in sg_logs.c

in below function , according to spec, power condition starts from zero ,not from 1. zero stands for active

static bool
show_power_condition_transitions_page(const uint8_t * resp, int len,
const struct opts_t * op)
{
int num, pl, pc;
const uint8_t * bp;
char str[PCB_STR_LEN];

if (op->verbose || ((! op->do_raw) && (0 == op->do_hex)))
    printf("Power condition transitions page  [0x1a]\n");
num = len - 4;
bp = &resp[0] + 4;
while (num > 3) {
    pc = sg_get_unaligned_be16(bp + 0);
    pl = bp[3] + 4;
    if (op->filter_given) {
        if (pc != op->filter)
            goto skip;
        if (op->do_raw) {
            dStrRaw(bp, pl);
            break;
        } else if (op->do_hex) {
            hex2stdout(bp, pl, ((1 == op->do_hex) ? 1 : -1));
            break;
        }
    }
    **switch (pc) {
    case 1:**  // banxianxie   here is not accurate

printf(" Accumulated transitions to active"); break;

sg_ses is not parsing page 0xa correctly

Dell MD1420 enclosure reports in Page 0x1 that it doesn't support "Device slot" and "Expander" element types. So, the only mandatory element type that needs to be present in page 0xa is the "Array Device" type element. The remaining other element types are optional.

However, sg_ses is trying to parse the 0xa page buffer even after the "Array Device" elements and says "<<<additional: response too short>>>"

The issue is seen with the latest code from github and is also seen on the last 3 release versions. Any feedback or help on this issue is greatly appreciated. Thanks.

[root@ocebst ~]# sg_ses -p 1 /dev/sg6
DELL MD1420 1.07
Configuration diagnostic page:
number of secondary subenclosures: 0
generation code: 0x0
enclosure descriptor list
Subenclosure identifier: 0 [primary]
relative ES process id: 1, number of ES processes: 1
number of type descriptor headers: 15
enclosure logical identifier (hex): 520474729a993c00
enclosure vendor: DELL product: MD1420 rev: 1.07
vendor-specific data:
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

type descriptor header and text list
Element type: Array device slot, subenclosure id: 0
number of possible elements: 24
text: Enclosure Drive Slot
Element type: Enclosure services controller electronics, subenclosure id: 0
number of possible elements: 2
text: Controller Module
Element type: Enclosure, subenclosure id: 0
number of possible elements: 1
text: Enclosure
Element type: Power supply, subenclosure id: 0
number of possible elements: 2
text: Power Supply
Element type: Cooling, subenclosure id: 0
number of possible elements: 4
text: Cooling Fan
Element type: Temperature sensor, subenclosure id: 0
number of possible elements: 7
text: Temp Sensor
Element type: Voltage sensor, subenclosure id: 0
number of possible elements: 6
text: Voltage Sensor
Element type: Current sensor, subenclosure id: 0
number of possible elements: 6
text: Current Sensor
Element type: SAS connector, subenclosure id: 0
number of possible elements: 8
text: SAS Connector
Element type: Display, subenclosure id: 0
number of possible elements: 4
text: Display Element
Element type: vendor specific [0x80], subenclosure id: 0
number of possible elements: 6
text: Dell Power Sensor
Element type: vendor specific [0x81], subenclosure id: 0
number of possible elements: 1
text: Dell Enclosure
Element type: vendor specific [0x82], subenclosure id: 0
number of possible elements: 2
text: Dell Controller Module
Element type: vendor specific [0x85], subenclosure id: 0
number of possible elements: 1
text: Dell Midplane
Element type: vendor specific [0x86], subenclosure id: 0
number of possible elements: 1
text: Dell Control Panel
[root@ocebst ~]#

[root@ocebst ~]# sg_ses -p 0xa /dev/sg6
DELL MD1420 1.07
Primary enclosure logical identifier (hex): 520474729a993c00
Additional element status diagnostic page:
generation code: 0x0
additional element status descriptor list
Element type: Array device slot, subenclosure id: 0 [ti=0]
Element index: 0 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 0
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500596e2b19
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500596e2b1a
phy identifier: 0x1
Element index: 1 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 1
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c50059503a95
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c50059503a96
phy identifier: 0x1
Element index: 2 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 2
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d3294295
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d3294296
phy identifier: 0x1
Element index: 3 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 3
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d33832d1
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d33832d2
phy identifier: 0x1
Element index: 4 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 4
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d3382935
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d3382936
phy identifier: 0x1
Element index: 5 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 5
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d1a65b21
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d1a65b22
phy identifier: 0x1
Element index: 6 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 6
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d18b01c5
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d18b01c6
phy identifier: 0x1
Element index: 7 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 7
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d1716e15
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d1716e16
phy identifier: 0x1
Element index: 8 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 8
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d18b99a5
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d18b99a6
phy identifier: 0x1
Element index: 9 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 9
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d3385059
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d338505a
phy identifier: 0x1
Element index: 10 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 10
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d338ea89
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d338ea8a
phy identifier: 0x1
Element index: 11 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 11
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d1a8cc69
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d1a8cc6a
phy identifier: 0x1
Element index: 12 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 12
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x500000e119a53b32
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x500000e119a53b33
phy identifier: 0x1
Element index: 13 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 13
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d3388059
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d338805a
phy identifier: 0x1
Element index: 14 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 14
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d3384fc1
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d3384fc2
phy identifier: 0x1
Element index: 15 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 15
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d1a71899
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d1a7189a
phy identifier: 0x1
Element index: 16 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 16
phy index: 0
SAS device type: no SAS device attached
initiator port for:
target port for:
attached SAS address: 0x0
SAS address: 0x0
phy identifier: 0x0
phy index: 1
SAS device type: no SAS device attached
initiator port for:
target port for:
attached SAS address: 0x0
SAS address: 0x0
phy identifier: 0x0
Element index: 17 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 17
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d171fdb9
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d171fdba
phy identifier: 0x1
Element index: 18 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 18
phy index: 0
SAS device type: no SAS device attached
initiator port for:
target port for:
attached SAS address: 0x0
SAS address: 0x0
phy identifier: 0x0
phy index: 1
SAS device type: no SAS device attached
initiator port for:
target port for:
attached SAS address: 0x0
SAS address: 0x0
phy identifier: 0x0
Element index: 19 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 19
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000c500d18ade5d
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000c500d18ade5e
phy identifier: 0x1
Element index: 20 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 20
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000039a4819810a
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000039a4819810b
phy identifier: 0x1
Element index: 21 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 21
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000039a4842685a
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000039a4842685b
phy identifier: 0x1
Element index: 22 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 22
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000039a4842663a
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000039a4842663b
phy identifier: 0x1
Element index: 23 eiioe=0
Transport protocol: SAS
number of phys: 2, not all phys: 0, device slot number: 23
phy index: 0
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993c7f
SAS address: 0x5000039a481980de
phy identifier: 0x0
phy index: 1
SAS device type: end device
initiator port for:
target port for: SSP
attached SAS address: 0x520474729a993cff
SAS address: 0x5000039a481980df
phy identifier: 0x1
<<<additional: response too short>>>
[root@ocebst ~]#

The below pagedump is from a different Dell MD1420 enclosure but the same issue is seen.

Page 0xA raw dump:
[Mar 1'23 12:58:36_541_649_120] PgLen:604
[Mar 1'23 12:58:36_541_659_280] 8310B000: 0406000A 00000000 00003E16 00000002
[Mar 1'23 12:58:36_541_675_480] 8310B010: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_541_691_960] 8310B020: 192B6E59 00000000 00000000 08000010
[Mar 1'23 12:58:36_541_707_520] 8310B030: 72740452 FF3C999A 00C50050 1A2B6E59
[Mar 1'23 12:58:36_541_723_120] 8310B040: 00000001 00000000 01003E16 01000002
[Mar 1'23 12:58:36_541_738_160] 8310B050: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_541_754_040] 8310B060: 953A5059 00000000 00000000 08000010
[Mar 1'23 12:58:36_541_768_880] 8310B070: 72740452 FF3C999A 00C50050 963A5059
[Mar 1'23 12:58:36_541_784_280] 8310B080: 00000001 00000000 02003E16 02000002
[Mar 1'23 12:58:36_541_799_760] 8310B090: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_541_814_960] 8310B0A0: 954229D3 00000000 00000000 08000010
[Mar 1'23 12:58:36_541_830_200] 8310B0B0: 72740452 FF3C999A 00C50050 964229D3
[Mar 1'23 12:58:36_541_846_080] 8310B0C0: 00000001 00000000 03003E16 03000002
[Mar 1'23 12:58:36_541_860_760] 8310B0D0: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_541_876_200] 8310B0E0: D13238D3 00000000 00000000 08000010
[Mar 1'23 12:58:36_541_892_120] 8310B0F0: 72740452 FF3C999A 00C50050 D23238D3
[Mar 1'23 12:58:36_541_907_320] 8310B100: 00000001 00000000 04003E16 04000002
[Mar 1'23 12:58:36_541_922_200] 8310B110: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_541_937_480] 8310B120: 352938D3 00000000 00000000 08000010
[Mar 1'23 12:58:36_541_952_920] 8310B130: 72740452 FF3C999A 00C50050 362938D3
[Mar 1'23 12:58:36_541_968_080] 8310B140: 00000001 00000000 05003E16 05000002
[Mar 1'23 12:58:36_541_982_840] 8310B150: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_541_998_600] 8310B160: 215BA6D1 00000000 00000000 08000010
[Mar 1'23 12:58:36_542_013_320] 8310B170: 72740452 FF3C999A 00C50050 225BA6D1
[Mar 1'23 12:58:36_542_028_320] 8310B180: 00000001 00000000 06003E16 06000002
[Mar 1'23 12:58:36_542_044_200] 8310B190: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_542_060_200] 8310B1A0: C5018BD1 00000000 00000000 08000010
[Mar 1'23 12:58:36_542_075_440] 8310B1B0: 72740452 FF3C999A 00C50050 C6018BD1
[Mar 1'23 12:58:36_542_091_400] 8310B1C0: 00000001 00000000 07003E16 07000002
[Mar 1'23 12:58:36_542_106_040] 8310B1D0: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_542_120_880] 8310B1E0: 156E71D1 00000000 00000000 08000010
[Mar 1'23 12:58:36_542_135_720] 8310B1F0: 72740452 FF3C999A 00C50050 166E71D1
[Mar 1'23 12:58:36_542_151_400] 8310B200: 00000001 00000000 08003E16 08000002
[Mar 1'23 12:58:36_542_166_120] 8310B210: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_542_181_120] 8310B220: A5998BD1 00000000 00000000 08000010
[Mar 1'23 12:58:36_542_196_520] 8310B230: 72740452 FF3C999A 00C50050 A6998BD1
[Mar 1'23 12:58:36_542_211_600] 8310B240: 00000001 00000000 09003E16 09000002
[Mar 1'23 12:58:36_542_226_440] 8310B250: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_542_242_080] 8310B260: 595038D3 00000000 00000000 08000010
[Mar 1'23 12:58:36_542_256_720] 8310B270: 72740452 FF3C999A 00C50050 5A5038D3
[Mar 1'23 12:58:36_542_271_640] 8310B280: 00000001 00000000 0A003E16 0A000002
[Mar 1'23 12:58:36_542_287_040] 8310B290: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_542_301_840] 8310B2A0: 89EA38D3 00000000 00000000 08000010
[Mar 1'23 12:58:36_542_316_880] 8310B2B0: 72740452 FF3C999A 00C50050 8AEA38D3
[Mar 1'23 12:58:36_542_332_080] 8310B2C0: 00000001 00000000 0B003E16 0B000002
[Mar 1'23 12:58:36_542_347_400] 8310B2D0: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_542_362_480] 8310B2E0: 69CCA8D1 00000000 00000000 08000010
[Mar 1'23 12:58:36_542_377_200] 8310B2F0: 72740452 FF3C999A 00C50050 6ACCA8D1
[Mar 1'23 12:58:36_542_580_840] 8310B300: 00000001 00000000 0C003E16 0C000002
[Mar 1'23 12:58:36_542_595_600] 8310B310: 08000010 72740452 7F3C999A E1000050
[Mar 1'23 12:58:36_542_610_560] 8310B320: 323BA519 00000000 00000000 08000010
[Mar 1'23 12:58:36_542_626_000] 8310B330: 72740452 FF3C999A E1000050 333BA519
[Mar 1'23 12:58:36_542_640_960] 8310B340: 00000001 00000000 0D003E16 0D000002
[Mar 1'23 12:58:36_542_655_840] 8310B350: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_542_671_560] 8310B360: 598038D3 00000000 00000000 08000010
[Mar 1'23 12:58:36_542_686_440] 8310B370: 72740452 FF3C999A 00C50050 5A8038D3
[Mar 1'23 12:58:36_542_701_440] 8310B380: 00000001 00000000 0E003E16 0E000002
[Mar 1'23 12:58:36_542_716_680] 8310B390: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_542_731_760] 8310B3A0: C14F38D3 00000000 00000000 08000010
[Mar 1'23 12:58:36_542_746_520] 8310B3B0: 72740452 FF3C999A 00C50050 C24F38D3
[Mar 1'23 12:58:36_542_762_240] 8310B3C0: 00000001 00000000 0F003E16 0F000002
[Mar 1'23 12:58:36_542_776_800] 8310B3D0: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_542_791_800] 8310B3E0: 9918A7D1 00000000 00000000 08000010
[Mar 1'23 12:58:36_542_806_560] 8310B3F0: 72740452 FF3C999A 00C50050 9A18A7D1
[Mar 1'23 12:58:36_542_822_320] 8310B400: 00000001 00000000 10003E16 10000002
[Mar 1'23 12:58:36_542_837_240] 8310B410: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_542_852_160] 8310B420: 79E238D3 00000000 00000000 08000010
[Mar 1'23 12:58:36_542_867_480] 8310B430: 72740452 FF3C999A 00C50050 7AE238D3
[Mar 1'23 12:58:36_542_882_480] 8310B440: 00000001 00000000 11003E16 11000002
[Mar 1'23 12:58:36_542_897_280] 8310B450: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_542_912_760] 8310B460: B9FD71D1 00000000 00000000 08000010
[Mar 1'23 12:58:36_542_927_600] 8310B470: 72740452 FF3C999A 00C50050 BAFD71D1
[Mar 1'23 12:58:36_542_942_680] 8310B480: 00000001 00000000 12003E16 12000002
[Mar 1'23 12:58:36_542_958_080] [skipped 0x000C empty dwords]
[Mar 1'23 12:58:36_542_967_480] 8310B4C0: 00000000 00000000 13003E16 13000002
[Mar 1'23 12:58:36_542_982_120] 8310B4D0: 08000010 72740452 7F3C999A 00C50050
[Mar 1'23 12:58:36_542_997_000] 8310B4E0: 5DDE8AD1 00000000 00000000 08000010
[Mar 1'23 12:58:36_543_012_160] 8310B4F0: 72740452 FF3C999A 00C50050 5EDE8AD1
[Mar 1'23 12:58:36_543_027_600] 8310B500: 00000001 00000000 14003E16 14000002
[Mar 1'23 12:58:36_543_042_160] 8310B510: 08000010 72740452 7F3C999A 9A030050
[Mar 1'23 12:58:36_543_057_720] 8310B520: 0A811948 00000000 00000000 08000010
[Mar 1'23 12:58:36_543_072_200] 8310B530: 72740452 FF3C999A 9A030050 0B811948
[Mar 1'23 12:58:36_543_087_240] 8310B540: 00000001 00000000 15003E16 15000002
[Mar 1'23 12:58:36_543_102_480] 8310B550: 08000010 72740452 7F3C999A 9A030050
[Mar 1'23 12:58:36_543_117_400] 8310B560: 5A684248 00000000 00000000 08000010
[Mar 1'23 12:58:36_543_132_040] 8310B570: 72740452 FF3C999A 9A030050 5B684248
[Mar 1'23 12:58:36_543_146_920] 8310B580: 00000001 00000000 16003E16 16000002
[Mar 1'23 12:58:36_543_162_320] 8310B590: 08000010 72740452 7F3C999A 9A030050
[Mar 1'23 12:58:36_543_177_360] 8310B5A0: 3A664248 00000000 00000000 08000010
[Mar 1'23 12:58:36_543_191_920] 8310B5B0: 72740452 FF3C999A 9A030050 3B664248
[Mar 1'23 12:58:36_543_207_560] 8310B5C0: 00000001 00000000 17003E16 17000002
[Mar 1'23 12:58:36_543_222_120] 8310B5D0: 08000010 72740452 7F3C999A 9A030050
[Mar 1'23 12:58:36_543_237_080] 8310B5E0: DE801948 00000000 00000000 08000010
[Mar 1'23 12:58:36_543_252_280] 8310B5F0: 72740452 FF3C999A 9A030050 DF801948
[Mar 1'23 12:58:36_543_267_200] 8310B600: 00000001 00000000 00000000 00000000
[Mar 1'23 12:58:36_543_293_240] [skipped 0x1E7C empty dwords]

sg_raw -r 32k fails on windows

sg_raw -r 32K or -r 32768 fails on windows while -r 32767 works.

There must be some int/uint problem before the deviceiocontrol
The same command works on cygwin.

I checked the code of wg_raw and the problem does not seem to be there.. perhaps it's in the library...
I'll check further and let you know.

Error while loading shared libraries: libsgutils2

I'm trying to build sg3_utils on my Raspberry Pi 4, with the Raspberry Pi OS (64bit). I cloned the repo, ran the usual ./configure, make, sudo make install, but every time I try to run one of the utilities I get the error sg_xxx: error while loading shared libraries: libsgutils2-1.47.so.2: cannot open shared object file: No such file or directory

I see various references to ligsgutils2 in the documentation, but I'm not sure if I need to build it, and if so, how? Any help would be appreciated.

sg_* commands can't to talk to write-protected disks

sg3_utils fails to communicate with a write-protected SCSI block device (i.e. one that sets the WP bit in its response to MODE SENSE):

$ sudo sg_luns /dev/sda
open error: /dev/sda: Read-only file system

Turning off the WP bit (and changing nothing else—I'm writing a target emulator, and it doesn't even implement WRITE yet) causes sg3_utils to work fine.

Not sure if this is a bug in sg3_utils or the kernel (or if I'm missing some way to make it work), but I'm opening it here first in hopes you all will know where the problem is.

$ sg_luns --version
version: 1.44 20200115

$ uname -a
Linux nixos 5.12.7 #1-NixOS SMP Wed May 26 10:59:15 UTC 2021 x86_64 GNU/Linux

The SCSI device in question is an experimental vhost-user-scsi implementation. It appears to the guest—running in QEMU—as a virtio-scsi device.

MODE SELECT LTO speed set conundrum

  1. page=MODE SENSE page 1/0

  2. change speed byte from 10h to 18h

  3. MODE SELECT yields:
    INQUIRY command error: SCSI status: Check Condition
    Fixed format, current; Sense key: Illegal Request
    Additional sense: Invalid field in parameter list
    Sense Key Specific: Error in Data parameters: byte 3 bit 3
    Raw sense data (in hex), sb_len=24, embedded_len=24
    70 00 05 00 00 00 00 10 00 00 00 00 26 00 00 8b
    00 03 00 00 00 00 00 00

  4. If the speed byte is not changed, MODE SELECT succeeds.

  5. On Windows 10 this same code and drive slows down tape speed.****

Looks like sg_map falls down with flat address method (and maybe more..)

I have been doing some testing with Linux and LUN numbers above 255. Two problems happen, one is fixable and one is not.

There is this check:
(((my_idlun->dev_id >> 8) & 0xff) == sidp->lun)

1 != 16385, etc.

This can't pass with flat addressing since 16384 is added to the LUN number and it is compared with only numbers 255 and lower. This is fixable by anding the LUN with 0x3ff and then it will work but only up to LUN 255 in flat addressing. LUNs higher than 255 continue to fail because of the kernel ioctl, SCSI_IOCTL_GET_IDLUN. This ioctl can only give values 255 and lower for the LUN number so the higher LUNs can never match.

I don't know what the plan is for flat address method handling in LUN numbers but it is becoming more interesting in the world of virtualization. No one used to have more than 255 LUNs on a host but now it is showing up more.

rescan-scsi-bus.sh: avoid scanning ghost/standby paths

(forwarded and anonymized for public use)

The customer is having 3PARdata LUNs configured in ALUA peer persistent mode. With this configuration half of the SCSI sub paths are from active/optimized controller and other half are from standby controller. The paths from standby controller shows up as "active ghost running" in multipath -ll output.

It was confirmed with HPE/3PAR support that paths from standby controller will remain in path group marked as "enabled". These paths do not support READ/WRITE SCSI commands and would only process TUR commands. The paths from standby controller would become active during controller failover.

For example:

mpathax (360002ac0000000000123456789012345) dm-29 3PARdata,VV
size=1.0G features='0' hwhandler='1 alua' wp=rw
|-+- policy='round-robin 0' prio=50 status=active
| |- 0:0:7:27 sdhl 133:176 active ready running
| |- 1:0:7:27 sdij 135:48  active ready running
| |- 0:0:6:27 sdfd 129:240 active ready running
| `- 1:0:5:27 sdgm 132:32  active ready running
`-+- policy='round-robin 0' prio=1 status=enabled
  |- 0:0:2:27 sdae 65:224  active ghost running		<---
  |- 1:0:2:27 sdbw 68:160  active ghost running		<---
  |- 0:0:3:27 sdcp 69:208  active ghost running		<---
  `- 1:0:3:27 sdeb 128:48  active ghost running		<---
[root@host1 ~]# sg_rtpg -vvd /dev/sdhl
open /dev/sdhl with flags=0x802
    report target port groups cdb: a3 0a 00 00 00 00 00 00 04 00 00 00
    report target port group: pass-through requested 1024 bytes but got 100 bytes
Report list length = 100
Report target port groups:
  target port group id : 0x102 , Pref=1
    target port group asymmetric access state : 0x00 (active/optimized)		<<---------- Paths from active/optimized controller.
    T_SUP : 1, O_SUP : 0, LBD_SUP : 0, U_SUP : 1, S_SUP : 1, AN_SUP : 0, AO_SUP : 1
    status code : 0x00 (no status available)
    vendor unique status : 0x00
    target port count : 0a
    Relative target port ids:
      0x7d1
      0x7d2
      0x7e6
      0x7e7
      0x7e8
      0x835
      0x836
      0x849
      0x84b
      0x84c
  target port group id : 0x101 , Pref=0
    target port group asymmetric access state : 0x02 (standby)		<<---------- Paths from standby controller.
    T_SUP : 1, O_SUP : 0, LBD_SUP : 0, U_SUP : 1, S_SUP : 1, AN_SUP : 0, AO_SUP : 1
    status code : 0x00 (no status available)
    vendor unique status : 0x00
    target port count : 0a
    Relative target port ids:
      0x3e9
      0x3ea
      0x3fe
      0x3ff
      0x400
      0x44d
      0x44e
      0x461
      0x463
      0x464

Issue:

As the above paths from standby controller are in "Not Ready" state, the TUR command on these paths returns following messages as expected:

kernel: sd 0:0:2:27: [sdae] tag#0 Done: SUCCESS Result: hostbyte=DID_OK driverbyte=DRIVER_OK
kernel: sd 0:0:2:27: [sdae] tag#0 CDB: Test Unit Ready 00 00 00 00 00 00
kernel: sd 0:0:2:27: [sdae] tag#0 Sense Key : Not Ready [current] 
kernel: sd 0:0:2:27: [sdae] tag#0 Add. Sense: Logical unit not accessible, target port in standby state

Since the TUR command was completed with "Sense Key : Not Read" the sg_turs commands returns a return code of 2.

[root@host1 ~]#  sg_turs -vvv /dev/sdae
open /dev/sdae with flags=0x800
    test unit ready cdb: 00 00 00 00 00 00
      duration=0 ms
test unit ready:  Fixed format, current;  Sense key: Not Ready
 Additional sense: Logical unit not accessible, target port in standby state
 Raw sense data (in hex):
        70 00 02 00 00 00 00 0a  00 00 00 00 04 0b 00 00
        00 00
device not ready
[root@host1 ~]# echo $?
2		<<----------

The return code of 2 is expected for paths in standby or "Not Ready" state:

$ man sg3_utils
[...]
EXIT STATUS
	To aid scripts that call these utilities, the exit status is set to indicate 
	success (0) or failure (1 or more). Note that some of the lower  values  
	correspond  to  the SCSI sense key values. The exit status values are:

       0      	success

       1      	syntax error. Either illegal command line options, options with bad
		arguments or a combination of options that is not permitted.

       2      	the  DEVICE reports that it is not ready for the operation requested.
		The device may be in the process of becoming ready (e.g.  spinning up
		but not at speed) so the utility may work after a wait.

But this return code of 2 for sg_turs command creates problem in following code block in rescan-scsi-bus.sh script which keep iterating through the same while loop for 8 times. Each iteration in this while loop adds 1 second delay.

$vi rescan-scsi-bus.sh
[...]	 
  while test $RC = 2 -o $RC = 6 && test $ctr -le 8; do				<------
    if test $RC = 2 -a "$RMB" != "1"; then echo -n "."; let LN+=1; sleep 1	<------
    else usleep 20000; fi
    let ctr+=1
    sg_turs /dev/$SGDEV &>/dev/null
    RC=$?
[...]

The rescan-scsi-bus.sh script keeps looping in above while loop as the sg_turs command returns 2 for paths in "Not Ready" state.

For the systems with with approx 10 LUNs with 4 paths in standby mode will lead to total 40 paths in ghost/standby state. For each of these paths, above while loop will add 8 seconds delay, i.e. total of 8*40 = 320 seconds. Customer is planning to increase the number of LUNs from 10 to ~50-60 and it would cause even more delays in re-scan.

Steps to Reproduce:

  1. Assign the LUNs from 3PAR storage configured in peer-persistent mode.
  2. Verify that half of the paths in multipath -ll are in "active ghost running" state
  3. Re-scan the paths using rescan-scsi-bus.sh script, it shows excessive delay in scanning.

Actual results:

  • Excessive delays in re-scanning the paths from 3PAR LUNs configured in peer-persistent mode.

Expected results:

  • rescan-scsi-bus.sh script should better handle the paths in "Not Ready" state, to avoid excessive delays in re-scan.

Additional comments:

Below are more details for the paths in "active ghost running" state for ALUA setup with standby controller: https://access.redhat.com/solutions/1172323

HPE Guide on ghost/standby paths:
Page 158: https://support.hpe.com/hpesc/public/docDisplay?docId=c04448818#_OPENTOPIC_TOC_PROCESSING_d94e26609

For now we have work-around the current issue by commenting out the sleep 1 command in following while loop in rescan-scsi-bus.sh script:

$vi rescan-scsi-bus.sh
[...]	 
  while test $RC = 2 -o $RC = 6 && test $ctr -le 8; do
    if test $RC = 2 -a "$RMB" != "1"; then echo -n "."; let LN+=1; # sleep 1	<------ Commenting out "sleep 1"
    else usleep 20000; fi
    let ctr+=1
    sg_turs /dev/$SGDEV &>/dev/null
    RC=$?
[...]

(note that the code excerpts above are from sg3_utils-1.37 and while the code has changed slightly, functionality is roughly the same: https://github.com/hreinecke/sg3_utils/blob/master/scripts/rescan-scsi-bus.sh#L275)

sg_opcodes reports support [DID_ABORT]

I have an embedded USB device that responds to some SCSI commands e.g. sg_inq, sg_vpd, etc. When I query the device for command support around sanitize/format, it returns support even though the log captures a DID_ABORT.

I've confirmed the device does not actually support any of these commands. Can we make the support query fail on DID_ABORT instead of "Command is supported"?

image

How to build sg utility for Windows

Hi

I need to build sg utility from source code for my Windows Server.

I downloaded sg3_utils-1.46.tar.xz

I also installed mingw-w64 in my Ubuntu 20.04.

Then, I use the following commands to build sg utility for my Windows Server.
./configure --enable-lib32 --enable-lib64 --enable-experimental --host=x86_64-w64-mingw32
make

Then, I have following error messages. Does anyone know how to build sg utility from source code for a Window system?

o -c -o sg_bg_ctl.o sg_bg_ctl.c
mv -f .deps/sg_bg_ctl.Tpo .deps/sg_bg_ctl.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_bg_ctl.exe sg_bg_ctl.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_bg_ctl.exe sg_bg_ctl.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_compare_and_write.o -MD -MP -MF .deps/sg_compare_and_write.Tpo -c -o sg_compare_and_write.o sg_compare_and_write.c
mv -f .deps/sg_compare_and_write.Tpo .deps/sg_compare_and_write.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_compare_and_write.exe sg_compare_and_write.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_compare_and_write.exe sg_compare_and_write.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_decode_sense.o -MD -MP -MF .deps/sg_decode_sense.Tpo -c -o sg_decode_sense.o sg_decode_sense.c
mv -f .deps/sg_decode_sense.Tpo .deps/sg_decode_sense.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_decode_sense.exe sg_decode_sense.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_decode_sense.exe sg_decode_sense.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_format.o -MD -MP -MF .deps/sg_format.Tpo -c -o sg_format.o sg_format.c
mv -f .deps/sg_format.Tpo .deps/sg_format.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_format.exe sg_format.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_format.exe sg_format.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_get_config.o -MD -MP -MF .deps/sg_get_config.Tpo -c -o sg_get_config.o sg_get_config.c
mv -f .deps/sg_get_config.Tpo .deps/sg_get_config.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_get_config.exe sg_get_config.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_get_config.exe sg_get_config.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_get_elem_status.o -MD -MP -MF .deps/sg_get_elem_status.Tpo -c -o sg_get_elem_status.o sg_get_elem_status.c
mv -f .deps/sg_get_elem_status.Tpo .deps/sg_get_elem_status.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_get_elem_status.exe sg_get_elem_status.o ../lib/libsgutils2.la
f .deps/sg_compare_and_write.Tpo .deps/sg_compare_and_write.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_compare_and_write.exe sg_compare_and_write.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_compare_and_write.exe sg_compare_and_write.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
liblibtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_get_elem_status.exe sg_get_elem_status.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_get_lba_status.o -MD -MP -MF .deps/sg_get_lba_status.Tpo -c -o sg_get_lba_status.o sg_get_lba_status.c
mv -f .deps/sg_get_lba_status.Tpo .deps/sg_get_lba_status.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_get_lba_status.exe sg_get_lba_status.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_get_lba_status.exe sg_get_lba_status.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_ident.o -MD -MP -MF .deps/sg_ident.Tpo -c -o sg_ident.o sg_ident.c
mv -f .deps/sg_ident.Tpo .deps/sg_ident.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_ident.exe sg_ident.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_ident.exe sg_ident.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_inq.o -MD -MP -MF .deps/sg_inq.Tpo -c -o sg_inq.o sg_inq.c
mv -f .deps/sg_inq.Tpo .deps/sg_inq.Po
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_inq_data.o -MD -MP -MF .deps/sg_inq_data.Tpo -c -o sg_inq_data.o sg_inq_data.c
mv -f .deps/sg_inq_data.Tpo .deps/sg_inq_data.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_inq.exe sg_inq.o sg_inq_data.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_inq.exe sg_inq.o sg_inq_data.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_logs.o -MD -MP -MF .deps/sg_logs.Tpo -c -o sg_logs.o sg_logs.c
mv -f .deps/sg_logs.Tpo .deps/sg_logs.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_logs.exe sg_logs.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_logs.exe sg_logs.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_luns.o -MD -MP -MF .deps/sg_luns.Tpo -c -o sg_luns.o sg_luns.c
mv -f .deps/sg_luns.Tpo .deps/sg_luns.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_luns.exe sg_luns.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_luns.exe sg_luns.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
f .deps/sg_compare_and_write.Tpo .deps/sg_compare_and_write.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_compare_and_write.exe sg_compare_and_write.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_compare_and_write.exe sg_compare_and_write.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libx86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_modes.o -MD -MP -MF .deps/sg_modes.Tpo -c -o sg_modes.o sg_modes.c
mv -f .deps/sg_modes.Tpo .deps/sg_modes.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_modes.exe sg_modes.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_modes.exe sg_modes.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_opcodes.o -MD -MP -MF .deps/sg_opcodes.Tpo -c -o sg_opcodes.o sg_opcodes.c
mv -f .deps/sg_opcodes.Tpo .deps/sg_opcodes.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_opcodes.exe sg_opcodes.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_opcodes.exe sg_opcodes.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_persist.o -MD -MP -MF .deps/sg_persist.Tpo -c -o sg_persist.o sg_persist.c
mv -f .deps/sg_persist.Tpo .deps/sg_persist.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_persist.exe sg_persist.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_persist.exe sg_persist.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_prevent.o -MD -MP -MF .deps/sg_prevent.Tpo -c -o sg_prevent.o sg_prevent.c
mv -f .deps/sg_prevent.Tpo .deps/sg_prevent.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_prevent.exe sg_prevent.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_prevent.exe sg_prevent.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_raw.o -MD -MP -MF .deps/sg_raw.Tpo -c -o sg_raw.o sg_raw.c
mv -f .deps/sg_raw.Tpo .deps/sg_raw.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_raw.exe sg_raw.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_raw.exe sg_raw.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_rdac.o -MD -MP -MF .deps/sg_rdac.Tpo -c -o sg_rdac.o sg_rdac.c
mv -f .deps/sg_rdac.Tpo .deps/sg_rdac.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_rdac.exe sg_rdac.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_rdac.exe sg_rdac.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_read_attr.o -MD -MP -MF .deps/sg_read_attr.Tpo -c -o sg_read_attr.o sg_read_attr.c
mv -f .deps/sg_read_attr.Tpo .deps/sg_read_attr.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_read_attr.exe sg_read_attr.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_read_attr.exe sg_read_attr.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_read_block_limits.o -MD -MP -MF .deps/sg_read_block_limits.Tpo -c -o sg_read_block_limits.o sg_read_block_limits.c
mv -f .deps/sg_read_block_limits.Tpo .deps/sg_read_block_limits.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_read_block_limits.exe sg_read_block_limits.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_read_block_limits.exe sg_read_block_limits.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_read_buffer.o -MD -MP -MF .deps/sg_read_buffer.Tpo -c -o sg_read_buffer.o sg_read_buffer.c
mv -f .deps/sg_read_buffer.Tpo .deps/sg_read_buffer.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_read_buffer.exe sg_read_buffer.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_read_buffer.exe sg_read_buffer.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_read_long.o -MD -MP -MF .deps/sg_read_long.Tpo -c -o sg_read_long.o sg_read_long.c
mv -f .deps/sg_read_long.Tpo .deps/sg_read_long.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_read_long.exe sg_read_long.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_read_long.exe sg_read_long.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
f .deps/sg_compare_and_write.Tpo .deps/sg_compare_and_write.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_compare_and_write.exe sg_compare_and_write.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_compare_and_write.exe sg_compare_and_write.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
liblibtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
f .deps/sg_compare_and_write.Tpo .deps/sg_compare_and_write.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_compare_and_write.exe sg_compare_and_write.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_compare_and_write.exe sg_compare_and_write.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libx86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_readcap.o -MD -MP -MF .deps/sg_readcap.Tpo -c -o sg_readcap.o sg_readcap.c
mv -f .deps/sg_readcap.Tpo .deps/sg_readcap.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_readcap.exe sg_readcap.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_readcap.exe sg_readcap.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_reassign.o -MD -MP -MF .deps/sg_reassign.Tpo -c -o sg_reassign.o sg_reassign.c
mv -f .deps/sg_reassign.Tpo .deps/sg_reassign.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_reassign.exe sg_reassign.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_reassign.exe sg_reassign.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_referrals.o -MD -MP -MF .deps/sg_referrals.Tpo -c -o sg_referrals.o sg_referrals.c
mv -f .deps/sg_referrals.Tpo .deps/sg_referrals.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_referrals.exe sg_referrals.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_referrals.exe sg_referrals.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_rep_pip.o -MD -MP -MF .deps/sg_rep_pip.Tpo -c -o sg_rep_pip.o sg_rep_pip.c
mv -f .deps/sg_rep_pip.Tpo .deps/sg_rep_pip.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_rep_pip.exe sg_rep_pip.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_rep_pip.exe sg_rep_pip.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_rep_zones.o -MD -MP -MF .deps/sg_rep_zones.Tpo -c -o sg_rep_zones.o sg_rep_zones.c
mv -f .deps/sg_rep_zones.Tpo .deps/sg_rep_zones.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_rep_zones.exe sg_rep_zones.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_rep_zones.exe sg_rep_zones.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_requests.o -MD -MP -MF .deps/sg_requests.Tpo -c -o sg_requests.o sg_requests.c
mv -f .deps/sg_requests.Tpo .deps/sg_requests.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_requests.exe sg_requests.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_requests.exe sg_requests.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_reset_wp.o -MD -MP -MF .deps/sg_reset_wp.Tpo -c -o sg_reset_wp.o sg_reset_wp.c
mv -f .deps/sg_reset_wp.Tpo .deps/sg_reset_wp.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_reset_wp.exe sg_reset_wp.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_reset_wp.exe sg_reset_wp.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_rmsn.o -MD -MP -MF .deps/sg_rmsn.Tpo -c -o sg_rmsn.o sg_rmsn.c
mv -f .deps/sg_rmsn.Tpo .deps/sg_rmsn.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_rmsn.exe sg_rmsn.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_rmsn.exe sg_rmsn.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_rtpg.o -MD -MP -MF .deps/sg_rtpg.Tpo -c -o sg_rtpg.o sg_rtpg.c
mv -f .deps/sg_rtpg.Tpo .deps/sg_rtpg.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_rtpg.exe sg_rtpg.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_rtpg.exe sg_rtpg.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_safte.o -MD -MP -MF .deps/sg_safte.Tpo -c -o sg_safte.o sg_safte.c
mv -f .deps/sg_safte.Tpo .deps/sg_safte.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_safte.exe sg_safte.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_safte.exe sg_safte.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_sanitize.o -MD -MP -MF .deps/sg_sanitize.Tpo -c -o sg_sanitize.o sg_sanitize.c
mv -f .deps/sg_sanitize.Tpo .deps/sg_sanitize.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_sanitize.exe sg_sanitize.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_sanitize.exe sg_sanitize.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_sat_identify.o -MD -MP -MF .deps/sg_sat_identify.Tpo -c -o sg_sat_identify.o sg_sat_identify.c
mv -f .deps/sg_sat_identify.Tpo .deps/sg_sat_identify.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_sat_identify.exe sg_sat_identify.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_sat_identify.exe sg_sat_identify.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_sat_phy_event.o -MD -MP -MF .deps/sg_sat_phy_event.Tpo -c -o sg_sat_phy_event.o sg_sat_phy_event.c
mv -f .deps/sg_sat_phy_event.Tpo .deps/sg_sat_phy_event.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_sat_phy_event.exe sg_sat_phy_event.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_sat_phy_event.exe sg_sat_phy_event.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_sat_read_gplog.o -MD -MP -MF .deps/sg_sat_read_gplog.Tpo -c -o sg_sat_read_gplog.o sg_sat_read_gplog.c
mv -f .deps/sg_sat_read_gplog.Tpo .deps/sg_sat_read_gplog.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_sat_read_gplog.exe sg_sat_read_gplog.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_sat_read_gplog.exe sg_sat_read_gplog.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_sat_set_features.o -MD -MP -MF .deps/sg_sat_set_features.Tpo -c -o sg_sat_set_features.o sg_sat_set_features.c
mv -f .deps/sg_sat_set_features.Tpo .deps/sg_sat_set_features.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_sat_set_features.exe sg_sat_set_features.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_sat_set_features.exe sg_sat_set_features.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_seek.o -MD -MP -MF .deps/sg_seek.Tpo -c -o sg_seek.o sg_seek.c
mv -f .deps/sg_seek.Tpo .deps/sg_seek.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_seek.exe sg_seek.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_seek.exe sg_seek.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_senddiag.o -MD -MP -MF .deps/sg_senddiag.Tpo -c -o sg_senddiag.o sg_senddiag.c
mv -f .deps/sg_senddiag.Tpo .deps/sg_senddiag.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_senddiag.exe sg_senddiag.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_senddiag.exe sg_senddiag.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_ses.o -MD -MP -MF .deps/sg_ses.Tpo -c -o sg_ses.o sg_ses.c
mv -f .deps/sg_ses.Tpo .deps/sg_ses.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_ses.exe sg_ses.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_ses.exe sg_ses.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_ses_microcode.o -MD -MP -MF .deps/sg_ses_microcode.Tpo -c -o sg_ses_microcode.o sg_ses_microcode.c
mv -f .deps/sg_ses_microcode.Tpo .deps/sg_ses_microcode.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_ses_microcode.exe sg_ses_microcode.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_ses_microcode.exe sg_ses_microcode.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_start.o -MD -MP -MF .deps/sg_start.Tpo -c -o sg_start.o sg_start.c
mv -f .deps/sg_start.Tpo .deps/sg_start.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_start.exe sg_start.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_start.exe sg_start.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_stpg.o -MD -MP -MF .deps/sg_stpg.Tpo -c -o sg_stpg.o sg_stpg.c
mv -f .deps/sg_stpg.Tpo .deps/sg_stpg.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_stpg.exe sg_stpg.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_stpg.exe sg_stpg.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_stream_ctl.o -MD -MP -MF .deps/sg_stream_ctl.Tpo -c -o sg_stream_ctl.o sg_stream_ctl.c
mv -f .deps/sg_stream_ctl.Tpo .deps/sg_stream_ctl.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_stream_ctl.exe sg_stream_ctl.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_stream_ctl.exe sg_stream_ctl.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_sync.o -MD -MP -MF .deps/sg_sync.Tpo -c -o sg_sync.o sg_sync.c
mv -f .deps/sg_sync.Tpo .deps/sg_sync.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_sync.exe sg_sync.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_sync.exe sg_sync.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_timestamp.o -MD -MP -MF .deps/sg_timestamp.Tpo -c -o sg_timestamp.o sg_timestamp.c
mv -f .deps/sg_timestamp.Tpo .deps/sg_timestamp.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_timestamp.exe sg_timestamp.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_timestamp.exe sg_timestamp.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs'
libtool: error: Continuing, but uninstalled executables may not work.
libtool: error: Could not determine the host path corresponding to
libtool: error: '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/lib/.libs:/usr/local/lib:/usr/local/bin'
libtool: error: Continuing, but uninstalled executables may not work.
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -MT sg_turs.o -MD -MP -MF .deps/sg_turs.Tpo -c -o sg_turs.o sg_turs.c
mv -f .deps/sg_turs.Tpo .deps/sg_turs.Po
/bin/bash ../libtool --tag=CC --mode=link x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o sg_turs.exe sg_turs.o ../lib/libsgutils2.la
libtool: link: x86_64-w64-mingw32-gcc -Wall -W -g -O2 -D__USE_MINGW_ANSI_STDIO -o .libs/sg_turs.exe sg_turs.o ../lib/.libs/libsgutils2.dll.a -L/usr/local/lib
/usr/bin/x86_64-w64-mingw32-ld: sg_turs.o: in function wait_millisecs': /home/edward/workspace/sg_utility/win/sg3_utils-1.47/src/sg_turs.c:340: undefined reference to nanosleep'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1027: sg_turs.exe] Error 1
make[2]: Leaving directory '/home/edward/workspace/sg_utility/win/sg3_utils-1.47/src'
make[1]: *** [Makefile:405: all-recursive] Error 1
make[1]: Leaving directory '/home/edward/workspace/sg_utility/win/sg3_utils-1.47'
make: *** [Makefile:337: all] Error 2

Is it possible to clone a 520 or 526 or 528 bytes per sector to disk image file?

Hello sorry
I have searched for a mailing list about sg3_utils but can't find one

So excuse me to write here

I have plugged some SAS drives to my UBUNTU 18 to clone them with destination image file like disk00.bin or disk01.dsk

With a simulation like sg_format I have detected that the drives are 528 bytes per sector

Well is there any of sg_xxx utils that does allow to clone the drive

Thank you
Robert

sg_read gives error for more than 64 blocks

trying to use sg_read for more than 64 blocks to read but ioctl failed
example:
sg_read if=/dev/sg5 count=65 bs=4096 cdbsz=10

but is succeeds for less than 65 example:
sg_read if=/dev/sg5 count=64 bs=4096 cdbsz=10

EVEN if I am trying this without the tool by forming the CDB and sending the ioctl scsi command it is failing although for more than 256 kb data length (64*4k)

1.44 + master: build fails

1.44 + all patches up to master.

Gcc 1.0.1 from rawhide.

[tkloczko@barrel sg3_utils-1.44]$ make
make  all-recursive
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/sg3_utils-1.44'
Making all in include
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/sg3_utils-1.44/include'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/sg3_utils-1.44/include'
Making all in lib
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/sg3_utils-1.44/lib'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/sg3_utils-1.44/lib'
Making all in src
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/sg3_utils-1.44/src'
gcc -DHAVE_CONFIG_H -I. -I..  -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -Wall -W  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto=auto -flto-partition=none -Os -c -o sg_get_elem_status.o sg_get_elem_status.c
sg_get_elem_status.c:1:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘-’ token
    1 | PROPS-END
      |      ^
In file included from /usr/include/stdlib.h:394,
                 from sg_get_elem_status.c:14:
/usr/include/sys/types.h:33:9: error: unknown type name ‘__u_char’
   33 | typedef __u_char u_char;
      |         ^~~~~~~~
make[2]: *** [Makefile:1152: sg_get_elem_status.o] Error 1
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/sg3_utils-1.44/src'
make[1]: *** [Makefile:400: all-recursive] Error 1
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/sg3_utils-1.44'

sg_raw with Maintenance Out and PROTOCOL_OUT_SEVICE_ACTION (0x10) returns illegal request

Running sg_raw version - 0.4.6 on CentOS 7.8.2003

sg_raw to send maintenance out command returns Illegal Request.

[root@BaseOS bin]# sg_raw -s 8 -vvvvvv /dev/sg7 a4 10 fa 00 00 00 00 00 00 08 00 00
found bsg_major=249
open /dev/sg7 with flags=0x802
cdb to send: a4 10 fa 00 00 00 00 00 00 08 00 00
Command name: Management protocol out
encl show
SCSI Status: Check Condition

Sense Information:
Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid command operation code
Raw sense data (in hex):
70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00
00 00

Other commands like - Inquiry, ReadBuffer sent through sg_raw go through without any issues.

Possible regression in sg_pt_freebsd.c:scsi_pt_open_flags()

This was reported long time ago in FreeBSD bug tracker, user complains that sg_persist -i -s da0 (e.g. called on device name as opposed to full path /dev/da0) stopped working after update from 1.42 to 1.44. This may be a regression introduced by d82f040, there's now a stat(2) call on a specified path:

if (stat(device_name, &a_stat) < 0) {

which requires a valid path, however the device name is later passed to cam_get_device(3) which performs additional parsing

     cam_get_device() takes a path argument containing a string with a device
     name followed by a unit number.  It then breaks the string down into a
     device name and unit number, and passes them back in dev_name and unit,
     respectively.  cam_get_device() can handle strings of the following
     forms, at least:

     /dev/foo1
     foo0
     nsa2

     cam_get_device() is provided as a convenience function for applications
     that need to provide functionality similar to cam_open_device().

My guess here is that the current logic which expects raw path no longer allows to specify a unit number, and maybe cam_get_device should be called early to split dev name first which can be then passed to stat and other checks.

Note that I don't use sg3_utils, just conveying a potential problem.

sg_write_same and dd command

I am writing a file at particular lba with sg_write_same command. Then i am reading the particular block with the dd command. I am unable to retrieve the file. Here are the sequence of steps i follow.

a> sg_write_same --32 --lba=2468 --in=sg_modes.c /dev/sda
b> dd if=/dev/sda skip=2468 bs=512 of=file count=10000.

But i can't retrieve the file sg_modes.c in of=file.

Please let me know how i can verify the writes and read.

OSF1 does not define CAM_DIR_BOTH

Hello,
I cloned the repository yesterday and tried to compile on Tru64 UNIX 5.1B (OSF/1) and discovered that two functions in lib/sg_pt_osf1.c use the constant CAM_DIR_BOTH, which is unknown to OSF/1. I presume this was adopted from the FreeBSD version, "sg_pt_freebsd.c", as only FreeBSD and OSF/1 seem to support CAM, and FreeBSD apparently knows this constant.
You probably don't care, considering that Tru64 is comatose, if not entirely dead, but I thought I'd let you know.
Rob Urban

Machine parseable output

We use the amazing sg_ses command line tools to get information from various Element Types like Array device slot and Device slot and slurp out interesting (to us) attributes like the SAS address and device slot number and if the physical disk is blinking (i.e. Ident=0|1) .

But I need to aggregate this information on a routine basis - so I'm ashamed to say I've grown a rather robust parser to massage the textual output of these tools into a more predictable data exchange format.

I feel like a missed a more obviously correct solution though. The information reported by these tools isn't really line oriented - it's structured! Is there a machine parsable output format - or a really obvious way to wrap some high level interface in the underlying c library from a dynamic scripting language and get all the same data that's normally displayed in the textual output - but in a more structured form? Like a giant json blob or even a single huge struct with descriptive field names?

Any feedback or insight on how you might approach a problem space like this would be well received! My apologies if I missed something obvious! Thanks in advance.

Just curious if the command sg_write_attr is in the works

The READ and WRITE ATTRIBUTE commands are particularly useful for tapes, and for their MAM (cartridge) memory.
It should be noted that the READ BUFFER command may be used to read Medium Auxilliary Memory, however the WRITE BUFFER command cannot be used for that purpose. I am not sure if sg_logs or sg_inq can help as they DO provide a lot of useful output, but it would be very nice to have the complement to the READ ATTRIBUTE command added to this library in Github.
This would implement the WRITE ATTRIBUTE sg command (sg_write_attr) per the specification documents:
the initial draft (SPC-3 revision number 17) spc3r17.pdf, and the final working document (SPC-3 revision number 23) spc3r23.pdf. See http://www.csit-sun.pub.ro/~cpop/Documentatie_SMP/Standarde_magistrale/SCSI/spc3r17.pdf or http://www.13thmonkey.org/documentation/SCSI/spc3r23.pdf for those documents. The IBM LTO SCSI references also briefly discuss these commands - at least as early as Generation 3 (perhaps a tiny bit before - not sure).
I am willing to write the code for it, however, I would need a tiny bit of guidance from someone like Doug Gilbert or someone else, who can explain if the attributes are part of a "standard". When I search the MAM memory, I don't find that the tape's cartridge memory information are organized per the tables in sg_read_attr.c in general. Perhaps we need to first write in that format? Can someone explain here? Or she we have a command that allows us to store the offsets into our own (dynamic?) table, that we build up when we find a tape that's not standard. Or are we relying on the firmware in the drive - this is what is confusing me? One last question is, do the LInux generic drivers support this? I assume we do NOT need Vendor-specific drivers.
For example, the Host attribute {0x806, "Barcode", RA_FMT_ASCII, 32, 0}, does not always seem to be 32 bytes long, it's more like 8 normally (6 followed by L3 for example). But perhaps this changed as of LTO 4?
Anyway, for those tapes that are already written, it would be nice to have a WRITE command that allows writing to an offset in the Medium Access Memory.
"A host attribute does not exist in the MAM until a WRITE
ATTRIBUTE command creates it." The previous quote answers it partially. Page 156 of the Ultrium SCSI reference for LTO 3 generation section Medium Auxiliary Memory does seem to explain most of what is going on.
In the meantime, I'll just use the 8D scsi command which should in theory write an attribute.
Any help appreciated while I research this myself.

sg_logs - application client - how to add custom log to 0xf log page

As I understood from man and SCSI Commands Reference Manual SCSI devices have reserved place for client logs. Man pages tell very briefly how to use it:

The Application Client log page has 64 log parameters with parameters codes 0 to 63.
Each can hold 252 bytes of user binary data. That 252 bytes (or less) of user data, with
a 4 byte prefix (for a total of 256 bytes) can be provided with the --in=FN option. A
typical prefix would be '0,n,83,fc'. The "n" is the parameter code in hex so the last log
parameter would be '0,3f,83,fc'. That log parameter could be read back at some later
time with '--page=0xf --filter=0x<n>'.

I tried various combinations with sg_logs command, but never succeeded to write anything into that memory.

Could you please give an example what flags to the command to give and what is the structure of the message that has to be sent.

I tried this:

sg_logs --in=- --page=0xf --select /dev/sda -s
0 0 83 fc aa bb cc dd

aa bb cc dd is what I wanted to be written to the log page

sg_raw.c fetch_dataout() fails on partial read from stdin pipe

A problem with the code quoted below is that it behaves as though a short read return count is an error ("EOF on input file/stream"). However when the input is coming from a pipe it may be simply that the pipe writer has not yet finished writing all the expected data. The pipe reader code here must continue to read and accumulate input until it gets back a return count of zero, denoting EOF. A non-zero short read return count does not indicate EOF, contrary to the error message issued. See "RETURN VALUE" in read(2).

sg_raw.c
fetch_dataout(struct opts_t * op, uint8_t ** free_buf, int * errp)
...
    len = read(fd, buf, op->dataout_len);
    if (len < 0) {
        err = errno;
        if (errp)
            *errp = sg_convert_errno(err);
        perror("Failed to read input data");
        goto bail;
    } else if (len < op->dataout_len) {
        if (errp)
            *errp = SG_LIB_FILE_ERROR;
        pr2serr("EOF on input file/stream\n");
        goto bail;
    }

In the rescan-scsi-bus.sh script version 1.46, the output data format is incorrect

In the rescan-scsi-bus.sh script version 1.46, the output data format is incorrect

The error format is as follows:
Scanning host 6 for SCSI target IDs 0
1
2
3
4
5
6
7, all LUNs
Scanning host 7 for SCSI target IDs 0
1
2
3
4
5
6
7, all LUNs
Scanning host 8 for SCSI target IDs 0
1
2
3
4
5
6
7, all LUNs
Scanning host 9 for SCSI target IDs 0
1
2
3
4
5
6
7, all LUNs
0 new or changed device(s) found.
0 remapped or resized device(s) found.
0 device(s) removed.

Version 1.42 is normal
Scanning host 19 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 2 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 20 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 21 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 22 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 23 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 24 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 25 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 26 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 27 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 28 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 29 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 3 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 30 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 31 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 32 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning host 4 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs

I'm not sure if this is a bug

sg_write_buffer firmware flashing

Hello,

I am not involved in sg3_utils and know nothing about it in detail. I am just user of it...

I have been trying to flash firmware to SAS SSD drive with command such as:

sudo sg_write_buffer -b 4k -m dmc_offs_save -I file.rel -v /dev/sg1

and got an error:

image

I am just curious if I can do something with it or not... Is it related to the input file?

In fact, I am trying to flash Samsung PM1643 (not HPE labeled) with HPE firmware which is compatibile with such drive labeled with HPE label.

Thanks.

RAID controller pass-through

We would like to make use of sg3_utils, but our disks are behind a RAID controller.

It would be nice if sg3_utils had the ability to reach behind a RAID controller, similar to smartmontools.

smartmontools does this by allowing the user to specify the type of RAID controller (limited to a few common types), and then uses ioctl() calls directly to the controller, invoking SCSI passthrough to allow sending SCSI commands and receiving SCSI results directly to/from the connected disks.

The downside to smartmontools for our needs is its focus on SMART-related queries without the rich SCSI understanding of sg3_utils.

Thanks in advance for considering this feature request.

NVME translations

Hi all, trying to use sg_persist for reservations of a Dell rebranded Intel NVME, but got the following error. I'm using a version compiled from master. Any clue what could be done here?

root@zfs-1:~# sg_inq -d /dev/nvme0n1
Identify controller for /dev/nvme0n1:
  Model number: Dell Express Flash NVMe P4600 1.6TB SFF
  Serial number: PHLE842101GC1P6CGN
  Firmware revision: QDV1DP15
  Version: 1.2
  Optional admin command support:
    Firmware download and commit
    Format NVM
  Optional NVM command support:
    Dataset management
    Write uncorrectable
  PCI vendor ID VID/SSVID: 0x8086/0x1028
  IEEE OUI Identifier: 0x5cd2e4
  Controller ID: 0x0
  Number of namespaces: 1
  Total NVM capacity: 1600321314816 bytes
  Maximum data transfer size: 32 pages
  Namespace 1 (deduced from device name):
    Namespace size/capacity: 390703446/390703446 blocks
    Namespace utilization: 390703446 blocks
    NGUID: 0x01000000010000005cd2e4b9854a5051
    EUI-64: 0x5cd2e4b9854a0100
    Number of LBA formats: 2
    Index LBA size: 1
    LBA format 0 support:
      Logical block size: 512 bytes
      Approximate namespace size: 200 GB
      Metadata size: 0 bytes
      Relative performance: Good [0x2]
    LBA format 1 support: <-- active
      Logical block size: 4096 bytes
      Approximate namespace size: 0 GB
      Metadata size: 0 bytes
      Relative performance: Best [0x0]
root@zfs-1:~# /usr/bin/sg_persist -n -i -k -d /dev/nvme0n1 -vvv
open /dev/nvme0n1 with flags=0x802
    Persistent reservation in cdb: 5e 00 00 00 00 00 00 20 00 00
sg_do_nvme_pt: no translation to NVMe for SCSI Persistent reserve in, read keys command
      duration=0 ms
Persistent reservation in:
Fixed format, current; Sense key: Illegal Request
Additional sense: Invalid command operation code
 Raw sense data (in hex), sb_len=18, embedded_len=18
        70 00 05 00 00 00 00 0a  00 00 00 00 20 00 00 00
        00 00
PR in (Read keys): command not supported
root@zfs-1:~# uname -r
4.15.0-48-generic

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.