2005-05-20 11:12:55

by Douglas Gilbert

[permalink] [raw]
Subject: [ANNOUNCE] sdparm 0.92

sdparm is a command line utility designed to get and set
SCSI disk parameters (cf hdparm for ATA disks). More generally
it gets and sets mode page information on SCSI devices or devices
that use a SCSI command set (e.g. CD/DVD drives (any transport)
and SCSI tape drives). It also can list VPD pages including
the device identification page.

For more information and downloads (tarball, rpm and deb
packages) see:
http://www.torque.net/sg/sdparm.html

There are now more than 150 parameters accessed by sdparm.
Thanks to Kai Makisara for interface and sanity checking
suggestions.

ChangeLog for sdparm-0.92 [20050520]
- add data compression and device configuration mode
pages (ssc3)
- add timeout + protect plus write parameters mode
pages (mmc5)
- add XOR control mode page (sbc2)
- add SES management mode page (ses2)
- discriminate mode pages based on device's peripheral
device type
- disallow set/clear acronyms whose pdt doesn't match
current device
- with option "-ll" decode more of INQUIRY standard
response
- improve error checking when getting non-existent
fields
- use double fetch technique when fetching mode pages
- add RBC device parameters mode page (rbc)
- add '--flexible' option for mode sense 6/10 response
mixup
- '--inquiry -all' now outputs supported VPD pages page

Doug Gilbert


2005-05-24 23:49:06

by Mogens Valentin

[permalink] [raw]
Subject: Re: [ANNOUNCE] sdparm 0.92

Douglas Gilbert wrote:
> sdparm is a command line utility designed to get and set
> SCSI disk parameters (cf hdparm for ATA disks). More generally
> it gets and sets mode page information on SCSI devices or devices
> that use a SCSI command set (e.g. CD/DVD drives (any transport)
> and SCSI tape drives). It also can list VPD pages including
> the device identification page.
>
> For more information and downloads (tarball, rpm and deb
> packages) see:
> http://www.torque.net/sg/sdparm.html

Nice! Just got it and tried on an external usb disk.
One feature I could use, probably others as well:
Could you add the ability to spin down/up a scsi disk?
I'd really like this for exteral (usb) disks.

Doesn't seem it can; if I missed it, I'm sorry..

--
Kind regards,
Mogens Valentin

2005-05-25 01:40:51

by Douglas Gilbert

[permalink] [raw]
Subject: Re: [ANNOUNCE] sdparm 0.92

Mogens Valentin wrote:
> Douglas Gilbert wrote:
>
>> sdparm is a command line utility designed to get and set
>> SCSI disk parameters (cf hdparm for ATA disks). More generally
>> it gets and sets mode page information on SCSI devices or devices
>> that use a SCSI command set (e.g. CD/DVD drives (any transport)
>> and SCSI tape drives). It also can list VPD pages including
>> the device identification page.
>>
>> For more information and downloads (tarball, rpm and deb
>> packages) see:
>> http://www.torque.net/sg/sdparm.html
>
>
> Nice! Just got it and tried on an external usb disk.
> One feature I could use, probably others as well:
> Could you add the ability to spin down/up a scsi disk?
> I'd really like this for exteral (usb) disks.

Mogens,
With sg_start (in the sg3_utils package) I have tried
to spin up and down an ATA disk inside a USB enclosure
without success. The same command on a USB connected
CD/DVD combo drive did work.

Could you try sg_start on your USB external enclosure
which I assume contains an ATA disk rather than a
SCSI (SPI) disk and report if it works?

BTW I just checked libata (for SATA disks) and it does
not seem to support the START STOP UNIT command.
Jeff, could that one be added?

> Doesn't seem it can; if I missed it, I'm sorry..

It is hard to know where to stop with sdparm ;-)
At the moment I am adding transport (protocol) specific
mode page support. So currently sdparm specializes
in mode pages (for all SCSI command sets) and INQUIRY
information (including the device identification VPD
page).

Doug Gilbert

2005-05-25 02:43:52

by Mogens Valentin

[permalink] [raw]
Subject: Re: [ANNOUNCE] sdparm 0.92

Douglas Gilbert wrote:
> Mogens Valentin wrote:
>
>> Douglas Gilbert wrote:
>>
>>> sdparm is a command line utility designed to get and set
>>> SCSI disk parameters (cf hdparm for ATA disks). ..snip..
>>
>> Nice! Just got it and tried on an external usb disk.
>> One feature I could use, probably others as well:
>> Could you add the ability to spin down/up a scsi disk?
>> I'd really like this for exteral (usb) disks.
>
> Mogens,
> With sg_start (in the sg3_utils package) I have tried
> to spin up and down an ATA disk inside a USB enclosure
> without success. The same command on a USB connected
> CD/DVD combo drive did work.
>
> Could you try sg_start on your USB external enclosure
> which I assume contains an ATA disk rather than a
> SCSI (SPI) disk and report if it works?

Sure. Got it, compiled, but got the error:
.../usr/include/scsi/sg.h /usr/include/scsi/scsi.h
/usr/include/stdint.h sg_lib.h sg_cmds.h llseek.h
gcc: cannot specify -o with -c or -S and multiple compilations
make: *** [sgp_dd.o] Error 1

I could only find -o and -c in the makefiles around line 95.

Slack 9.1 / 2.6.10 from sources.

It's 4am, I'm off to bed, sorry :p

--
Kind regards,
Mogens Valentin