LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-12-2014, 06:13 AM   #1
phanimohanty
LQ Newbie
 
Registered: Jun 2014
Posts: 1
Blog Entries: 1

Rep: Reputation: Disabled
SCSI_INQUIRY(sg_inq) command is not working on RHEL 6.3 for partition disk


Hi,

I have presented 3Par/EVA Luns into RHEL 6.3 and partitioned(one partition) the disk. Then tried sg_inq command on whole disk as well as partition disk. The command failed for partition disk.

I tried same thing ON RHEL 6.1 and RHEL 6.2. The command worked fine for both whole disk and partition disk.


# sg_inq /dev/sdb
standard INQUIRY:
PQual=0 Device_type=0 RMB=0 version=0x06 [SPC-4]
[AERC=0] [TrmTsk=0] NormACA=0 HiSUP=1 Resp_data_format=2
SCCS=0 ACC=0 TPGS=0 3PC=1 Protect=0 BQue=0
EncServ=0 MultiP=1 (VS=0) [MChngr=0] [ACKREQQ=0] Addr16=0
[RelAdr=0] WBus16=1 Sync=1 Linked=0 [TranDis=0] CmdQue=1
[SPI: Clocking=0x0 QAS=0 IUS=0]
length=168 (0xa8) Peripheral device type: disk
Vendor identification: 3PARdata
Product identification: VV
Product revision level: 3122
Unit serial number: 1306584


# sg_inq /dev/sdb1
Both SCSI INQUIRY and fetching ATA information failed on /dev/sdb1[/B]

I can see there is a change in sg3_utils.

On RHEL 6.1
============
# rpm -qa | grep sg3
sg3_utils-libs-1.28-3.el6.x86_64
sg3_utils-1.28-3.el6.x86_64

On RHEL 6.3
===========
# rpm -qa | grep sg3
sg3_utils-libs-1.28-4.el6.x86_64
sg3_utils-1.28-4.el6.x86_64


Can anyone help me to find out what is the changed happen from RHEL 6.2 to RHEL6.3. What is the work around to work this for RHEL 6.3?

Regards,
Phani
 
Old 06-13-2014, 03:27 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Sending disk commands to anything other than a disk is undefined, isn't it?
 
1 members found this post helpful.
Old 06-13-2014, 03:46 PM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
I can confirm from testing on my systems just now that on pre RHEL6.3 running sg_inq on both the disk and a partition of the disk was giving output. However it is the SAME output in both cases (that is you don't get any more from the partition than you did from the disk itself).

Starting with RHEL6.3 running the newer version of sg3_utils (1.28-4) I can also confirm it is NOT giving the output on the partition but is on the disk itself. Also there is a newer version of sg3_utils (1.28-5) in the repositories and updating to that, one still sees it no longer gives the output on the partition.

As the prior poster suggests it probably was never correct for sg_inq to give output on the partition since it is querying the disk's parameters and never giving specifics for the partition anyway. It may be that RedHat "fixed" this silently as I I couldn't find where this got changed but clearly it did get changed.
 
Old 06-13-2014, 03:58 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
It likely wasn't RH that made the change, but the upstream project because the package "sg3_utils" runs on more than just Linux (FreeBSD, Solaris, Tru64 and Windows 2000 and later).
 
Old 10-23-2014, 10:12 AM   #5
mod11s
LQ Newbie
 
Registered: Oct 2014
Location: Israel
Distribution: RHEL, SLES
Posts: 2

Rep: Reputation: Disabled
Hi, I've experienced the same problem on Linux 6.3-6.5. Have anyone opened a bug to RedHat?
 
Old 10-24-2014, 10:32 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
It is NOT a bug but is a change. The tool is to query "disks" not "partitions". As noted above it probably never should have allowed partitions as input and it appears that got silently changed. The output it gave for the "partition" was exactly the same as it gave for the entire "disk" so there is no reason to run it on "partitions" in the first place.
 
Old 10-24-2014, 10:41 AM   #7
mod11s
LQ Newbie
 
Registered: Oct 2014
Location: Israel
Distribution: RHEL, SLES
Posts: 2

Rep: Reputation: Disabled
I don't claim that it's problem of tool, but a direct SCSI command built by a program fails as well. INQUIRY command must be supported by disk paths and partitions in order to identify that they relate to the same LUN.
 
Old 10-24-2014, 11:06 AM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
What relates them is the major/minor.

e.g.
For the full disk:
brw-r----- 1 root disk 8, 0 Oct 21 12:02 /dev/sda < Major 8, Minor 0 = first disk

For the partitions:
brw-r----- 1 root disk 8, 1 Oct 21 16:03 /dev/sda1 < Same major, incremented minor 1 = first partition on first disk
brw-r----- 1 root disk 8, 2 Oct 21 12:02 /dev/sda2 < Same major, re-incremented minor 2 = second partition on first disk.

If you have a tool such as Oracle ASM that is renaming things they'll still have the same major/minor as they would before renaming.

You can also get details about paritions with fdisk or parted or by examining things in /sys/class/scsi_host.

The command this thread was started for is specifically to do get sg scsi information on whole disks - not to relate partitions to them.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ftp command is not working in rhel 6.2 vikilinux Linux - General 6 03-30-2014 03:52 AM
RHEL 5 working slow and RAM is 1.5 GB & HHD is 150 GB,how to clean the Disk pramodpramu Red Hat 4 02-15-2014 05:34 AM
Setup command not working on RHEL 6.2 rupeshm62 Linux - General 4 01-14-2013 06:28 PM
command line disk partition utility Skaperen Linux - Software 5 01-11-2011 06:30 AM
LVM repair of working disk with corrupted but known partition structure wgtthompson Linux - Server 1 09-08-2010 05:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration