* [ANNOUNCE] sdparm 0.90
@ 2005-04-18 13:26 Douglas Gilbert
2005-04-18 17:42 ` Jeff Garzik
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Douglas Gilbert @ 2005-04-18 13:26 UTC (permalink / raw)
To: linux-scsi
sdparm is a new 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).
The elements within mode pages are addressed via acronyms
(e.g. "WCE" for "write cache enable" in the caching mode
page). There is also numeric addressing of the form:
<start_byte>:<start_bit>:<num_bits>
This symbolic or numeric addressing should be more
convenient for changing parameters than the techniques used
by scsiinfo, sginfo and sg_wr_mode.
A GUI wrapping sdparm would be a useful extension.
It could show the mode page as found in the standard or
the vendor's product manual with attributes such as
"changeable" represented by colour or shading.
I hope to add VPD pages in the future. sdparm shares some
code with sg3_utils but is currently independent; they may
share a library (libsgutils) in the future.
A tarball, rpms and a "deb" can be found on
http://www.torque.net/sg .
Currently, the most complete documentation is in the
man page.
Examples (taken from the man page):
To list the common (mode) parameters of a disk:
sdparm /dev/sda
To see all parameters for the caching control mode page:
sdparm --page=ca /dev/sda
To get the WCE values (current changeable default and
saved) in hex:
sdparm -g WCE -H /dev/sda
0x01 0x00 0x01 0x01
To get the WCE current value in hex:
sdparm -g WCE=1 -H /dev/sda
0x01
To set the "write cache enable" bit in the current page:
sdparm --set=WCE /dev/sda
To set the "write cache enable" bit in the current and
saved page:
sdparm --set=WCE --save /dev/sda
To set the "write cache enable" and clear "read cache
disable":
sdparm --set=WCE --clear=RCD --save /dev/sda
The previous example can also by written as:
sdparm -s WCE=1,RCD=0 -S /dev/sda
To re-establish the manufacturer’s defaults in the
current and saved caching control mode page:
sdparm --page=ca --defaults -save /dev/sda
If an ATAPI cd/dvd player is at /dev/hdc then its common
(mode) parameters could be listed with:
sdparm /dev/hdc
Comments, suggestions and patches welcome.
Doug Gilbert
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ANNOUNCE] sdparm 0.90
2005-04-18 13:26 [ANNOUNCE] sdparm 0.90 Douglas Gilbert
@ 2005-04-18 17:42 ` Jeff Garzik
2005-04-19 0:33 ` Douglas Gilbert
2005-04-18 19:50 ` folkert
2005-04-18 19:52 ` folkert
2 siblings, 1 reply; 6+ messages in thread
From: Jeff Garzik @ 2005-04-18 17:42 UTC (permalink / raw)
To: dougg; +Cc: linux-scsi
Douglas Gilbert wrote:
> sdparm is a new 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).
I'm biased, but I would prefer to use blktool for this sort of thing...
Jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ANNOUNCE] sdparm 0.90
2005-04-18 13:26 [ANNOUNCE] sdparm 0.90 Douglas Gilbert
2005-04-18 17:42 ` Jeff Garzik
@ 2005-04-18 19:50 ` folkert
2005-04-18 19:52 ` folkert
2 siblings, 0 replies; 6+ messages in thread
From: folkert @ 2005-04-18 19:50 UTC (permalink / raw)
To: Douglas Gilbert; +Cc: linux-scsi
[-- Attachment #1: Type: text/plain, Size: 4944 bytes --]
keetweej:/usr/src# sdparm -a /dev/sda
SG_IO (inquiry) error: Invalid argument
SCSI INQUIRY command failed on /dev/sda
keetweej:/usr/src# sdparm /dev/sda
SG_IO (inquiry) error: Invalid argument
SCSI INQUIRY command failed on /dev/sda
Feb 21 12:58:10 keetweej kernel: SCSI subsystem driver Revision: 1.00
Feb 21 12:58:10 keetweej kernel: scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 6.2.36
Feb 21 12:58:10 keetweej kernel: <Adaptec aic7880 Ultra SCSI adapter>
Feb 21 12:58:10 keetweej kernel: aic7880: Ultra Wide Channel A, SCSI Id=7, 16/253 SCBs
Feb 21 12:58:10 keetweej kernel:
Feb 21 12:58:10 keetweej kernel: Vendor: RICOH Model: MP6200S Rev: 2.20
Feb 21 12:58:10 keetweej kernel: Type: CD-ROM ANSI SCSI revision: 02
Feb 21 12:58:10 keetweej kernel: (scsi0:A:6): 5.813MB/s transfers (5.813MHz, offset 15)
Feb 21 12:58:10 keetweej kernel: Vendor: IBM Model: DCAS-34330 Rev: S65A
Feb 21 12:58:10 keetweej kernel: Type: Direct-Access ANSI SCSI revision: 02
Feb 21 12:58:10 keetweej kernel: scsi0:A:6:0: Tagged Queuing enabled. Depth 32
Feb 21 12:58:10 keetweej kernel: Attached scsi disk sda at scsi0, channel 0, id 6, lun 0
Feb 21 12:58:10 keetweej kernel: SCSI device sda: 8467200 512-byte hdwr sectors (4335 MB)
Feb 21 12:58:10 keetweej kernel: /dev/scsi/host0/bus0/target6/lun0: p1 p2
0000:00:06.0 SCSI storage controller: Adaptec AIC-7880U
keetweej:/var/log# lspci -n | grep 0000:00:06.0
0000:00:06.0 0100: 9004:8078
On Mon, Apr 18, 2005 at 11:26:03PM +1000, Douglas Gilbert wrote:
> sdparm is a new 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).
>
> The elements within mode pages are addressed via acronyms
> (e.g. "WCE" for "write cache enable" in the caching mode
> page). There is also numeric addressing of the form:
> <start_byte>:<start_bit>:<num_bits>
> This symbolic or numeric addressing should be more
> convenient for changing parameters than the techniques used
> by scsiinfo, sginfo and sg_wr_mode.
>
> A GUI wrapping sdparm would be a useful extension.
> It could show the mode page as found in the standard or
> the vendor's product manual with attributes such as
> "changeable" represented by colour or shading.
>
> I hope to add VPD pages in the future. sdparm shares some
> code with sg3_utils but is currently independent; they may
> share a library (libsgutils) in the future.
>
> A tarball, rpms and a "deb" can be found on
> http://www.torque.net/sg .
> Currently, the most complete documentation is in the
> man page.
>
>
> Examples (taken from the man page):
> To list the common (mode) parameters of a disk:
>
> sdparm /dev/sda
>
> To see all parameters for the caching control mode page:
>
> sdparm --page=ca /dev/sda
>
> To get the WCE values (current changeable default and
> saved) in hex:
>
> sdparm -g WCE -H /dev/sda
> 0x01 0x00 0x01 0x01
>
> To get the WCE current value in hex:
>
> sdparm -g WCE=1 -H /dev/sda
> 0x01
>
> To set the "write cache enable" bit in the current page:
>
> sdparm --set=WCE /dev/sda
>
> To set the "write cache enable" bit in the current and
> saved page:
>
> sdparm --set=WCE --save /dev/sda
>
> To set the "write cache enable" and clear "read cache
> disable":
>
> sdparm --set=WCE --clear=RCD --save /dev/sda
>
> The previous example can also by written as:
>
> sdparm -s WCE=1,RCD=0 -S /dev/sda
>
> To re-establish the manufacturer?s defaults in the
> current and saved caching control mode page:
>
> sdparm --page=ca --defaults -save /dev/sda
>
> If an ATAPI cd/dvd player is at /dev/hdc then its common
> (mode) parameters could be listed with:
>
> sdparm /dev/hdc
>
>
> Comments, suggestions and patches welcome.
>
>
> Doug Gilbert
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Folkert van Heusden
Auto te koop, zie: http://www.vanheusden.com/daihatsu.php
Op zoek naar een IT of Finance baan? Mail me voor de mogelijkheden.
--------------------------------------------------------------------
UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)
a try, it brings monitoring logfiles to a different level! See
http://vanheusden.com/multitail/features.html for a feature-list.
--------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE
Get your PGP/GPG key signed at www.biglumber.com!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 282 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ANNOUNCE] sdparm 0.90
2005-04-18 13:26 [ANNOUNCE] sdparm 0.90 Douglas Gilbert
2005-04-18 17:42 ` Jeff Garzik
2005-04-18 19:50 ` folkert
@ 2005-04-18 19:52 ` folkert
2005-04-19 0:42 ` Douglas Gilbert
2 siblings, 1 reply; 6+ messages in thread
From: folkert @ 2005-04-18 19:52 UTC (permalink / raw)
To: Douglas Gilbert; +Cc: linux-scsi
[-- Attachment #1: Type: text/plain, Size: 3439 bytes --]
oh wait, 2.6 yes?
then forget my bugreport (running 2.4.26-NANO)
On Mon, Apr 18, 2005 at 11:26:03PM +1000, Douglas Gilbert wrote:
> sdparm is a new 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).
>
> The elements within mode pages are addressed via acronyms
> (e.g. "WCE" for "write cache enable" in the caching mode
> page). There is also numeric addressing of the form:
> <start_byte>:<start_bit>:<num_bits>
> This symbolic or numeric addressing should be more
> convenient for changing parameters than the techniques used
> by scsiinfo, sginfo and sg_wr_mode.
>
> A GUI wrapping sdparm would be a useful extension.
> It could show the mode page as found in the standard or
> the vendor's product manual with attributes such as
> "changeable" represented by colour or shading.
>
> I hope to add VPD pages in the future. sdparm shares some
> code with sg3_utils but is currently independent; they may
> share a library (libsgutils) in the future.
>
> A tarball, rpms and a "deb" can be found on
> http://www.torque.net/sg .
> Currently, the most complete documentation is in the
> man page.
>
>
> Examples (taken from the man page):
> To list the common (mode) parameters of a disk:
>
> sdparm /dev/sda
>
> To see all parameters for the caching control mode page:
>
> sdparm --page=ca /dev/sda
>
> To get the WCE values (current changeable default and
> saved) in hex:
>
> sdparm -g WCE -H /dev/sda
> 0x01 0x00 0x01 0x01
>
> To get the WCE current value in hex:
>
> sdparm -g WCE=1 -H /dev/sda
> 0x01
>
> To set the "write cache enable" bit in the current page:
>
> sdparm --set=WCE /dev/sda
>
> To set the "write cache enable" bit in the current and
> saved page:
>
> sdparm --set=WCE --save /dev/sda
>
> To set the "write cache enable" and clear "read cache
> disable":
>
> sdparm --set=WCE --clear=RCD --save /dev/sda
>
> The previous example can also by written as:
>
> sdparm -s WCE=1,RCD=0 -S /dev/sda
>
> To re-establish the manufacturer?s defaults in the
> current and saved caching control mode page:
>
> sdparm --page=ca --defaults -save /dev/sda
>
> If an ATAPI cd/dvd player is at /dev/hdc then its common
> (mode) parameters could be listed with:
>
> sdparm /dev/hdc
>
>
> Comments, suggestions and patches welcome.
>
>
> Doug Gilbert
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Folkert van Heusden
Auto te koop, zie: http://www.vanheusden.com/daihatsu.php
Op zoek naar een IT of Finance baan? Mail me voor de mogelijkheden.
--------------------------------------------------------------------
UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)
a try, it brings monitoring logfiles to a different level! See
http://vanheusden.com/multitail/features.html for a feature-list.
--------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE
Get your PGP/GPG key signed at www.biglumber.com!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 282 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ANNOUNCE] sdparm 0.90
2005-04-18 17:42 ` Jeff Garzik
@ 2005-04-19 0:33 ` Douglas Gilbert
0 siblings, 0 replies; 6+ messages in thread
From: Douglas Gilbert @ 2005-04-19 0:33 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-scsi
Jeff Garzik wrote:
> Douglas Gilbert wrote:
>
>> sdparm is a new 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).
>
>
> I'm biased, but I would prefer to use blktool for this sort of thing...
Jeff,
There is definitely some overlap on the most important
parameters for disks (e.g. write caching). blktool covers
near end (HBA), transport and device settings. sdparm
concentrates on the far end device settings (and in some
cases transport settings from the point of view of that
device) for devices that use a SCSI command set.
sdparm assumes some knowledge of SCSI mode page structure
and what facilities are available. Figures and descriptions
of mode pages are found in product manuals and SCSI
standards (e.g. SPC-3 and SBC-2). Beyond primary settings
such as write caching, there are many interesting
settings.
For example, SCSI disks recovered from (hardware)
RAIDs (>= 3) often have the Automatic Read/Write Reallocation
bits (ARRE and AWRE) clear. This is not the manufacturer's
default. I assume this is to generate medium errors at the
first sign of trouble so the parity disk is brought into
play. When such a disk is used stand alone, a user would probably
want those bits on (and of course they should be using
smartmontools or similar to gauge the health of the disk).
sdparm can set a mode page back to its manufacturer's
default settings.
Another example is the tuning mode that Seagate has
introduced for its disks (i.e. server or desktop mode).
See sdparm.8 for further information.
IMO blktool and sdparm complement one another.
Doug Gilbert
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ANNOUNCE] sdparm 0.90
2005-04-18 19:52 ` folkert
@ 2005-04-19 0:42 ` Douglas Gilbert
0 siblings, 0 replies; 6+ messages in thread
From: Douglas Gilbert @ 2005-04-19 0:42 UTC (permalink / raw)
To: folkert; +Cc: linux-scsi
folkert@vanheusden.com wrote:
> oh wait, 2.6 yes?
In lk 2.4 you get to use sg device nodes as noted in
the man page ;-) sg_map (in sg3_utils) will show the
mapping.
If sdparm is popular I could add a SCSI_IOCTL_SEND_COMMAND
interface for lk 2.4 as a fall back. Alternatively sdparm
could internally iterate like sginfo does (in sg3_utils)
to find the mapping to a sg device node.
Doug Gilbert
> then forget my bugreport (running 2.4.26-NANO)
>
> On Mon, Apr 18, 2005 at 11:26:03PM +1000, Douglas Gilbert wrote:
>
>>sdparm is a new 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).
>>
>>The elements within mode pages are addressed via acronyms
>>(e.g. "WCE" for "write cache enable" in the caching mode
>>page). There is also numeric addressing of the form:
>><start_byte>:<start_bit>:<num_bits>
>>This symbolic or numeric addressing should be more
>>convenient for changing parameters than the techniques used
>>by scsiinfo, sginfo and sg_wr_mode.
>>
>>A GUI wrapping sdparm would be a useful extension.
>>It could show the mode page as found in the standard or
>>the vendor's product manual with attributes such as
>>"changeable" represented by colour or shading.
>>
>>I hope to add VPD pages in the future. sdparm shares some
>>code with sg3_utils but is currently independent; they may
>>share a library (libsgutils) in the future.
>>
>>A tarball, rpms and a "deb" can be found on
>>http://www.torque.net/sg .
>>Currently, the most complete documentation is in the
>>man page.
>>
>>
>>Examples (taken from the man page):
>>To list the common (mode) parameters of a disk:
>>
>> sdparm /dev/sda
>>
>>To see all parameters for the caching control mode page:
>>
>> sdparm --page=ca /dev/sda
>>
>>To get the WCE values (current changeable default and
>>saved) in hex:
>>
>> sdparm -g WCE -H /dev/sda
>> 0x01 0x00 0x01 0x01
>>
>>To get the WCE current value in hex:
>>
>> sdparm -g WCE=1 -H /dev/sda
>> 0x01
>>
>>To set the "write cache enable" bit in the current page:
>>
>> sdparm --set=WCE /dev/sda
>>
>>To set the "write cache enable" bit in the current and
>>saved page:
>>
>> sdparm --set=WCE --save /dev/sda
>>
>>To set the "write cache enable" and clear "read cache
>>disable":
>>
>> sdparm --set=WCE --clear=RCD --save /dev/sda
>>
>>The previous example can also by written as:
>>
>> sdparm -s WCE=1,RCD=0 -S /dev/sda
>>
>>To re-establish the manufacturer?s defaults in the
>>current and saved caching control mode page:
>>
>> sdparm --page=ca --defaults -save /dev/sda
>>
>>If an ATAPI cd/dvd player is at /dev/hdc then its common
>>(mode) parameters could be listed with:
>>
>> sdparm /dev/hdc
>>
>>
>>Comments, suggestions and patches welcome.
>>
>>
>>Doug Gilbert
>>-
>>To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>>the body of a message to majordomo@vger.kernel.org
>>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
> Folkert van Heusden
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-04-19 8:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18 13:26 [ANNOUNCE] sdparm 0.90 Douglas Gilbert
2005-04-18 17:42 ` Jeff Garzik
2005-04-19 0:33 ` Douglas Gilbert
2005-04-18 19:50 ` folkert
2005-04-18 19:52 ` folkert
2005-04-19 0:42 ` Douglas Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox