Bug 166863

Summary: sg3_utils package is too old to contain sg_persist
Product: Red Hat Enterprise Linux 4 Reporter: James Bottomley <james.bottomley>
Component: sg3_utilsAssignee: Phil Knirsch <pknirsch>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: rvokal, snitzer
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHEA-2007-0280 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-01 17:25:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Bottomley 2005-08-26 15:30:39 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc3 Firefox/1.0.6

Description of problem:
We have a cluster application which we'd like to use SCSI-3 persistent group reservations on.  We'd also like to use the existin commands in sg3_utils to manipulate them rather than rolling our own.

sg_persist has been in sg3_utils since version 1.07 (just one revision beyond what redhat ships).  The currently shipping verson of sg3_utils is 1.16

Version-Release number of selected component (if applicable):
sg3_utils-1.06-3

How reproducible:
Always

Steps to Reproduce:
1. Try to execute sg_persist
2.
3.
  

Actual Results:  gives file not found

Expected Results:  puts a persistent reservation on the device

Additional info:

The source for sg3_utils is

http://sg.torque.net/sg/

We'd really appreciate Red Hat shipping any version from 1.07 on, but if you're going to update, then updating to the latest version would seem to make sense.

Comment 1 Mike Snitzer 2005-10-27 20:46:30 UTC
Also, the 1.06 sg3_utils that redhat ships (RHEL4 U2 included) has the wrong
return codes.  In particular, sg_turs returns 0 when with the latest upstream
sg3_utils returns 1, e.g.:

[root@lab13-11 snapper]# sg_turs /dev/sg1
tur: scsi status: Check Condition
Current, Sense key: Illegal Request
[valid=0] Info fld=0x0, Additional sense: Logical unit not supported
Raw sense data (in hex):
  70 00 05 00 00 00 00 0a 00 00 00 00 25 00 00 00 00 00
plus...: Driver_status=0x08 (DRIVER_SENSE,SUGGEST_OK)
Completed 1 Test Unit Ready commands with 1 errors
[root@lab13-11 snapper]# echo $?
0
[root@lab13-11 snapper]# rpm -Uvh sg3_utils-1.17-1.i386.rpm
libsgutils-1_0-1.17-1.i386.rpm
Preparing...                ########################################### [100%]
   1:libsgutils-1_0         ########################################### [ 50%]
   2:sg3_utils              ########################################### [100%]
[root@lab13-11 snapper]# sg_turs /dev/sg1
test unit ready: SCSI status: Check Condition
 Fixed format, current;  Sense key: Illegal Request
 Additional sense: Logical unit not supported
plus...: Driver_status=0x08 [DRIVER_SENSE, SUGGEST_OK]
Completed 1 Test Unit Ready commands with 1 errors
[root@lab13-11 snapper]# echo $?
1

Just more justification for redhat to update sg3_utils... fyi,
http://www.garloff.de/kurt/linux/rescan-scsi-bus.sh uses sg_turs and relies on
the correct exit status for it to work properly.

Comment 2 Phil Knirsch 2006-05-10 14:00:49 UTC
As an updates, is still under evaluation but of course will be fixed (latest
version) in Red Hat Enterprise Linux 5.

Read ya, Phil

Comment 11 Red Hat Bugzilla 2007-05-01 17:25:42 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2007-0280.html