LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 06-24-2009, 04:24 PM   #1
jc179
LQ Newbie
 
Registered: Apr 2007
Location: Ontario, Canada
Distribution: Gentoo, slackware
Posts: 15

Rep: Reputation: 0
hard drive spindown [scsi, fibre channel, sata]... anything or kernel hack / patch av


Hi

I have a large disk array [14 disks] I use at home in my server for virtual machines. I'd like to find a way to spin down idle scsi disks, and most of the time the virtual machine is running [say linux + asterisk], and that disk is sitting there chewing up power. Instead of replacing it with a single hard drive I prefer to keep the individual disks for performance reasons. Is there any hard drive power management in Linux?

I did find some posts from about 2002 era with scsi-idle, but nothing much since then. I've looked through the kernel options without luck also.

If anyone knows what OS will do this [besides windows] can you also let me know, as I might have to look at moving in that direction.

Thanks

Jonathan
 
Old 06-24-2009, 04:27 PM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
You may want to look into the 'hdparm' and 'sdparm' utilities. The former is a tool for sending and receiving commands and information to/from IDE/ATA drives (hard disks basically) and the latter is the same, but for SCSI drives (including CDROM-type drives).

'sdparm' allows for stop & start commands, to spindown/up the drives.

Cheers,
Sasha

PS - you can install these tools on ANY Linux you choose to use. They may even be included with some of them.

Last edited by GrapefruiTgirl; 06-24-2009 at 04:29 PM.
 
Old 06-24-2009, 04:48 PM   #3
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
http://www.j-pfennig.de/LinuxImHaus/ngflushd_1_man.html
Quote:
ngflushd

This is a smart Disk Spin-down Daemon that can handle IDE, SATA, USB and SCSI. All disks types other than IDE are controlled by the SCSI subsystem of the kernel. Automatic SCSI spin up (which you will need) works at least since kernel 2.6.15. For older 2.6 kernels you may need a patch, 2.4 kernels are not supported. ngflushd will disable SCSI spin down for older 2.6 kernels automatically - but this can be overridden (using -z0).

The basic operation principle is that the kernel caches most data read from disk. And when the disk is spun down writes shall be cached too. As long as no non-cached data needs to be read and as long as there is enough memory to cache writes the disk does not need to spin.

if that is an external array, you may be at the mercy of the way the enclosure and array controller was designed.

You didn't describe your hardware, so it's difficult to tell how things are actually setup. if Linux is just seeing the array as a single large volume via a SCSI interface, I doubt there is any way to control individual disk spin down from within Linux.
 
Old 06-24-2009, 09:20 PM   #4
jc179
LQ Newbie
 
Registered: Apr 2007
Location: Ontario, Canada
Distribution: Gentoo, slackware
Posts: 15

Original Poster
Rep: Reputation: 0
Hey

Thanks for the replies! I'm going to investigate the sdparm utility.

Basically I have two arrays
7 x 500 gb disks for storage
and 14x 74 gb disks for virtual machine OS drives.

The array I'm referring to is actually fibre channel, running on a QLA2312. The array is a LSI SYM2600-FC, and all of the hard drives are ST373307FC. I've used the array in windows previously where I first noticed everytime I access the spanned volume after some time they would all spin up, but I really really don't want to start up another machine just to run this thing, espically a windows one!

I typically have the disks mounted in pairs (mirrored) or a small raid 5 array of three disks, so if its possible to shut down say the 2 disks of /dev/md7 and /dev/md8 for example that'd be fantastic, that would be 4 or 6 disks off until the vm was started or needed !

Edit: see below

Let me know if you have any more ideas!

Thanks,

Jonathan

Edit: Here is the output of sdparm, actually can see some mention of power condition mode.

DL580 ~ # sdparm --all /dev/sdu
/dev/sdu: SEAGATE ST373405FC MS09
Read write error recovery mode page:
AWRE 1 [cha: y, def: 1, sav: 1]
ARRE 1 [cha: y, def: 1, sav: 1]
TB 0 [cha: y, def: 0, sav: 0]
RC 0 [cha: y, def: 0, sav: 0]
EER 0 [cha: y, def: 0, sav: 0]
PER 1 [cha: y, def: 0, sav: 1]
DTE 0 [cha: y, def: 0, sav: 0]
DCR 0 [cha: y, def: 0, sav: 0]
RRC 11 [cha: y, def: 11, sav: 11]
COR_S 240 [cha: n, def:240, sav:240]
HOC 0 [cha: n, def: 0, sav: 0]
DSOC 0 [cha: n, def: 0, sav: 0]
WRC 5 [cha: y, def: 5, sav: 5]
RTL -1 [cha: y, def: -1, sav: -1]
Disconnect-reconnect (SPC + transports) mode page:
BFR 128 [cha: y, def:128, sav:128]
BER 128 [cha: y, def:128, sav:128]
BIL 0 [cha: n, def: 0, sav: 0]
DTL 0 [cha: n, def: 0, sav: 0]
CTL 0 [cha: n, def: 0, sav: 0]
MBS 369 [cha: y, def:369, sav:369]
EMDP 0 [cha: n, def: 0, sav: 0]
FA 0 [cha: n, def: 0, sav: 0]
DIMM 0 [cha: n, def: 0, sav: 0]
DTDC 0 [cha: n, def: 0, sav: 0]
FBS 0 [cha: n, def: 0, sav: 0]
Format (SBC) mode page:
TPZ 15344 [cha: n, def:15344, sav:15344]
ASPZ 0 [cha: n, def: 0, sav: 0]
ATPZ 23 [cha: n, def: 23, sav: 23]
ATPLU 0 [cha: n, def: 0, sav: 0]
SPT 607 [cha: n, def:607, sav:607]
DBPPS 512 [cha: n, def:512, sav:512]
INTLV 1 [cha: n, def: 1, sav: 1]
TSF 96 [cha: n, def: 96, sav: 96]
CSF 90 [cha: n, def: 90, sav: 90]
SSEC 0 [cha: n, def: 0, sav: 0]
HSEC 1 [cha: n, def: 1, sav: 1]
RMB 0 [cha: n, def: 0, sav: 0]
SURF 0 [cha: n, def: 0, sav: 0]
Rigid disk (SBC) mode page:
NOC 29550 [cha: n, def:29550, sav:29550]
NOH 8 [cha: n, def: 8, sav: 8]
SCWP 0 [cha: n, def: 0, sav: 0]
SCRWC 0 [cha: n, def: 0, sav: 0]
DSR 0 [cha: n, def: 0, sav: 0]
LZC 0 [cha: n, def: 0, sav: 0]
RPL 0 [cha: n, def: 0, sav: 0]
ROTO 0 [cha: n, def: 0, sav: 0]
MRR 10040 [cha: n, def:10040, sav:10040]
Verify error recovery (SBC) mode page:
V_EER 0 [cha: y, def: 0, sav: 0]
V_PER 1 [cha: y, def: 0, sav: 1]
V_DTE 0 [cha: y, def: 0, sav: 0]
V_DCR 0 [cha: y, def: 0, sav: 0]
V_RC 11 [cha: y, def: 11, sav: 11]
V_COR_S 240 [cha: n, def:240, sav:240]
V_RTL -1 [cha: y, def: -1, sav: -1]
Caching (SBC) mode page:
IC 0 [cha: y, def: 0, sav: 0]
ABPF 0 [cha: n, def: 0, sav: 0]
CAP 0 [cha: y, def: 0, sav: 0]
DISC 1 [cha: y, def: 1, sav: 1]
SIZE 0 [cha: n, def: 0, sav: 0]
WCE 0 [cha: y, def: 1, sav: 0]
MF 0 [cha: n, def: 0, sav: 0]
RCD 0 [cha: y, def: 0, sav: 0]
DRRP 0 [cha: n, def: 0, sav: 0]
WRP 0 [cha: n, def: 0, sav: 0]
DPTL -1 [cha: n, def: -1, sav: -1]
MIPF 0 [cha: y, def: 0, sav: 0]
MAPF -1 [cha: y, def: -1, sav: -1]
MAPFC -1 [cha: n, def: -1, sav: -1]
FSW 1 [cha: y, def: 1, sav: 1]
LBCSS 0 [cha: n, def: 0, sav: 0]
DRA 0 [cha: y, def: 0, sav: 0]
NV_DIS 0 [cha: n, def: 0, sav: 0]
NCS 16 [cha: y, def: 16, sav: 16]
CSS 0 [cha: n, def: 0, sav: 0]
Control mode page:
TST 0 [cha: n, def: 0, sav: 0]
TMF_ONLY 0 [cha: n, def: 0, sav: 0]
D_SENSE 0 [cha: n, def: 0, sav: 0]
GLTSD 0 [cha: y, def: 1, sav: 0]
RLEC 1 [cha: y, def: 0, sav: 1]
QAM 0 [cha: y, def: 0, sav: 0]
QERR 0 [cha: n, def: 0, sav: 0]
RAC 0 [cha: n, def: 0, sav: 0]
UA_INTLCK 0 [cha: n, def: 0, sav: 0]
SWP 0 [cha: y, def: 0, sav: 0]
ATO 0 [cha: n, def: 0, sav: 0]
TAS 0 [cha: n, def: 0, sav: 0]
AUTOLOAD 0 [cha: n, def: 0, sav: 0]
BTP 0 [cha: n, def: 0, sav: 0]
ESTCT 0 [cha: y, def: 0, sav: 0]
Protocol specific port mode page:
PPID 0 [cha: n, def: 0, sav: 0]

******************************************************************

Power condition mode page:
IDLE 0 [cha: y, def: 1, sav: 0]
STANDBY 0 [cha: y, def: 1, sav: 0]
ICT 1 [cha: n, def: 1, sav: 1]
SCT 4 [cha: n, def: 4, sav: 4]

******************************************************************

Informational exceptions control mode page:
PERF 0 [cha: y, def: 0, sav: 0]
EBF 0 [cha: n, def: 0, sav: 0]
EWASC 0 [cha: y, def: 1, sav: 0]
DEXCPT 0 [cha: y, def: 0, sav: 0]
TEST 0 [cha: y, def: 0, sav: 0]
EBACKERR 0 [cha: n, def: 0, sav: 0]
LOGERR 0 [cha: y, def: 0, sav: 0]
MRIE 3 [cha: y, def: 0, sav: 3]
INTT 0 [cha: y, def: 0, sav: 0]
REPC 1 [cha: y, def: 1, sav: 1]
DL580 ~ #

Last edited by jc179; 06-24-2009 at 09:24 PM.
 
Old 06-24-2009, 09:34 PM   #5
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Code:
Power condition [po] [0x1a] mode page [PS=0]:
  IDLE        1  [cha: y, def:  1, sav:  1]  Idle timer active
  STANDBY     1  [cha: y, def:  1, sav:  1]  Standby timer active
  ICT       200  [cha: y, def:200, sav:200]  Idle condition timer (100 ms)
  SCT       4800  [cha: y, def:4800, sav:4800]  Standby condition timer (100 ms)
>> Informational exceptions control [ie] mode page [0x1c] not found
Timeout and protect (MMC) [tp] [0x1d] mode page [PS=0]:
  G3E         0  [cha: n, def:  0, sav:  0]  Group 3 timeout capability enable
  TMOE        0  [cha: y, def:  0, sav:  0]  Timeout enable
  DISP        0  [cha: n, def:  0, sav:  0]  Disable (unavailable) until power cycle
  SWPP        0  [cha: n, def:  0, sav:  0]  Software write protect until power cycle
  G1MT      120  [cha: y, def:120, sav:120]  Group 1 minimum timeout (sec)
  G2MT      5400  [cha: y, def:5400, sav:5400]  Group 2 minimum timeout (sec)
CD/DVD (MM) capabilities and mechanical status (MMC) [cms] [0x2a] mode page [PS=0]:
  D_RAM_R     1  [cha: y, def:  1, sav:  1]  DVD-RAM read
sdparm -av --long gives a little more plain english

Plus, another tool/package similar to this, called 'sg3_tools' or 'sg3_utilities' (I'll check the exact name if you want it and can't find it) does a lot of what sdparm does, only a *whole lot* more too; it is that much more complicated too, with longer. more confusing commands. Just incase sdparm doesn't do what you want.

Good luck,
Sasha
 
Old 06-24-2009, 09:44 PM   #6
jc179
LQ Newbie
 
Registered: Apr 2007
Location: Ontario, Canada
Distribution: Gentoo, slackware
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by GrapefruiTgirl View Post
Code:
Power condition [po] [0x1a] mode page [PS=0]:
  IDLE        1  [cha: y, def:  1, sav:  1]  Idle timer active
  STANDBY     1  [cha: y, def:  1, sav:  1]  Standby timer active
  ICT       200  [cha: y, def:200, sav:200]  Idle condition timer (100 ms)
  SCT       4800  [cha: y, def:4800, sav:4800]  Standby condition timer (100 ms)
>> Informational exceptions control [ie] mode page [0x1c] not found
Timeout and protect (MMC) [tp] [0x1d] mode page [PS=0]:
  G3E         0  [cha: n, def:  0, sav:  0]  Group 3 timeout capability enable
  TMOE        0  [cha: y, def:  0, sav:  0]  Timeout enable
  DISP        0  [cha: n, def:  0, sav:  0]  Disable (unavailable) until power cycle
  SWPP        0  [cha: n, def:  0, sav:  0]  Software write protect until power cycle
  G1MT      120  [cha: y, def:120, sav:120]  Group 1 minimum timeout (sec)
  G2MT      5400  [cha: y, def:5400, sav:5400]  Group 2 minimum timeout (sec)
CD/DVD (MM) capabilities and mechanical status (MMC) [cms] [0x2a] mode page [PS=0]:
  D_RAM_R     1  [cha: y, def:  1, sav:  1]  DVD-RAM read
sdparm -av --long gives a little more plain english

Plus, another tool/package similar to this, called 'sg3_tools' or 'sg3_utilities' (I'll check the exact name if you want it and can't find it) does a lot of what sdparm does, only a *whole lot* more too; it is that much more complicated too, with longer. more confusing commands. Just incase sdparm doesn't do what you want.

Good luck,
Sasha
Thanks for the help! I also found something called sg_start (or rather just the man page of it . - http://linux.die.net/man/8/sg_start)

Here's some more output


~ # sdparm -p po -l /dev/sdu
/dev/sdu: SEAGATE ST373405FC MS09
Direct access device specific parameters: WP=0 DPOFUA=1
Power condition [po] mode page:
IDLE 1 [cha: y, def: 1, sav: 0] Idle timer active
STANDBY 1 [cha: y, def: 1, sav: 0] Standby timer active
ICT 1 [cha: n, def: 1, sav: 1] Idle condition timer (100 ms)
SCT 4 [cha: n, def: 4, sav: 4] Standby condition timer (100 ms)

And the --long output... which is also very long, but I did enjoy more english

DL580 ~ # sdparm -av --long /dev/sdu
>>> about to open device name: /dev/sdu
/dev/sdu: SEAGATE ST373405FC MS09
Direct access device specific parameters: WP=0 DPOFUA=1
Read write error recovery [rw] [0x1] mode page [PS=1]:
AWRE 1 [cha: y, def: 1, sav: 1] Automatic write reallocation enabled
ARRE 1 [cha: y, def: 1, sav: 1] Automatic read reallocation enabled
TB 0 [cha: y, def: 0, sav: 0] Transfer block
RC 0 [cha: y, def: 0, sav: 0] Read continuous
EER 0 [cha: y, def: 0, sav: 0] Enable early recovery
PER 1 [cha: y, def: 0, sav: 1] Post error
DTE 0 [cha: y, def: 0, sav: 0] Data terminate on error
DCR 0 [cha: y, def: 0, sav: 0] Disable correction
RRC 11 [cha: y, def: 11, sav: 11] Read retry count
COR_S 240 [cha: n, def:240, sav:240] Correction span (obsolete)
HOC 0 [cha: n, def: 0, sav: 0] Head offset count (obsolete)
DSOC 0 [cha: n, def: 0, sav: 0] Data strobe offset count (obsolete)
WRC 5 [cha: y, def: 5, sav: 5] Write retry count
RTL -1 [cha: y, def: -1, sav: -1] Recovery time limit (ms)
Disconnect-reconnect (SPC + transports) [dr] [0x2] mode page [PS=1]:
BFR 128 [cha: y, def:128, sav:128] Buffer full ratio
BER 128 [cha: y, def:128, sav:128] Buffer empty ratio
BIL 0 [cha: n, def: 0, sav: 0] Bus inactivity limit
DTL 0 [cha: n, def: 0, sav: 0] Disconnect time limit
CTL 0 [cha: n, def: 0, sav: 0] Connect time limit
MBS 369 [cha: y, def:369, sav:369] Maximum burst size (512 bytes)
EMDP 0 [cha: n, def: 0, sav: 0] Enable modify data pointers
FA 0 [cha: n, def: 0, sav: 0] Fair arbitration
DIMM 0 [cha: n, def: 0, sav: 0] Disconnect immediate
DTDC 0 [cha: n, def: 0, sav: 0] Data transfer disconnect control
FBS 0 [cha: n, def: 0, sav: 0] First burst size (512 bytes)
Format (SBC) [fo] [0x3] mode page [PS=1]:
TPZ 15344 [cha: n, def:15344, sav:15344] Tracks per zone
ASPZ 0 [cha: n, def: 0, sav: 0] Alternate sectors per zone
ATPZ 23 [cha: n, def: 23, sav: 23] Alternate tracks per zone
ATPLU 0 [cha: n, def: 0, sav: 0] Alternate tracks per logical unit
SPT 607 [cha: n, def:607, sav:607] Sectors per track
DBPPS 512 [cha: n, def:512, sav:512] Data bytes per physical sector
INTLV 1 [cha: n, def: 1, sav: 1] Interleave
TSF 96 [cha: n, def: 96, sav: 96] Track skew factor
CSF 90 [cha: n, def: 90, sav: 90] Cylinder skew factor
SSEC 0 [cha: n, def: 0, sav: 0] Soft sector
HSEC 1 [cha: n, def: 1, sav: 1] Hard sector
RMB 0 [cha: n, def: 0, sav: 0] Removable
SURF 0 [cha: n, def: 0, sav: 0] Surface
Rigid disk (SBC) [rd] [0x4] mode page [PS=1]:
NOC 29550 [cha: n, def:29550, sav:29550] Number of cylinders
NOH 8 [cha: n, def: 8, sav: 8] Number of heads
SCWP 0 [cha: n, def: 0, sav: 0] Starting cylinder for write precompensation
SCRWC 0 [cha: n, def: 0, sav: 0] Starting cylinder for reduced write current
DSR 0 [cha: n, def: 0, sav: 0] Device step rate
LZC 0 [cha: n, def: 0, sav: 0] Landing zone cylinder
RPL 0 [cha: n, def: 0, sav: 0] Rotational position locking
ROTO 0 [cha: n, def: 0, sav: 0] Rotational offset
MRR 10040 [cha: n, def:10040, sav:10040] Medium rotation rate (rpm)
Verify error recovery (SBC) [ve] [0x7] mode page [PS=1]:
V_EER 0 [cha: y, def: 0, sav: 0] Enable early recovery
V_PER 1 [cha: y, def: 0, sav: 1] Post error
V_DTE 0 [cha: y, def: 0, sav: 0] Data terminate on error
V_DCR 0 [cha: y, def: 0, sav: 0] Disable correction
V_RC 11 [cha: y, def: 11, sav: 11] Verify retry count
V_COR_S 240 [cha: n, def:240, sav:240] Verify correction span (obsolete)
V_RTL -1 [cha: y, def: -1, sav: -1] Verify recovery time limit (ms)
Caching (SBC) [ca] [0x8] mode page [PS=1]:
IC 0 [cha: y, def: 0, sav: 0] Initiator control
ABPF 0 [cha: n, def: 0, sav: 0] Abort pre-fetch
CAP 0 [cha: y, def: 0, sav: 0] Caching analysis permitted
DISC 1 [cha: y, def: 1, sav: 1] Discontinuity
SIZE 0 [cha: n, def: 0, sav: 0] Size enable
WCE 0 [cha: y, def: 1, sav: 0] Write cache enable
MF 0 [cha: n, def: 0, sav: 0] Multiplication factor
RCD 0 [cha: y, def: 0, sav: 0] Read cache disable
DRRP 0 [cha: n, def: 0, sav: 0] Demand read retention priority
WRP 0 [cha: n, def: 0, sav: 0] Write retention priority
DPTL -1 [cha: n, def: -1, sav: -1] Disable pre-fetch transfer length
MIPF 0 [cha: y, def: 0, sav: 0] Minimum pre-fetch
MAPF -1 [cha: y, def: -1, sav: -1] Maximum pre-fetch
MAPFC -1 [cha: n, def: -1, sav: -1] Maximum pre-fetch ceiling
FSW 1 [cha: y, def: 1, sav: 1] Force sequential write
LBCSS 0 [cha: n, def: 0, sav: 0] Logical block cache segment size
DRA 0 [cha: y, def: 0, sav: 0] Disable read ahead
NV_DIS 0 [cha: n, def: 0, sav: 0] Non-volatile cache disable
NCS 16 [cha: y, def: 16, sav: 16] Number of cache segments
CSS 0 [cha: n, def: 0, sav: 0] Cache segment size
Control [co] [0xa] mode page [PS=1]:
TST 0 [cha: n, def: 0, sav: 0] Task set type
TMF_ONLY 0 [cha: n, def: 0, sav: 0] Task management functions only
D_SENSE 0 [cha: n, def: 0, sav: 0] Descriptor format sense data
GLTSD 0 [cha: y, def: 1, sav: 0] Global logging target save disable
RLEC 1 [cha: y, def: 0, sav: 1] Report log exception condition
QAM 0 [cha: y, def: 0, sav: 0] Queue algorithm modifier
QERR 0 [cha: n, def: 0, sav: 0] Queue error management
RAC 0 [cha: n, def: 0, sav: 0] Report a check
UA_INTLCK 0 [cha: n, def: 0, sav: 0] Unit attention interlocks control
SWP 0 [cha: y, def: 0, sav: 0] Software write protect
ATO 0 [cha: n, def: 0, sav: 0] Application tag owner
TAS 0 [cha: n, def: 0, sav: 0] Task aborted status
AUTOLOAD 0 [cha: n, def: 0, sav: 0] Autoload mode
BTP 0 [cha: n, def: 0, sav: 0] Busy timeout period (100us)
ESTCT 0 [cha: y, def: 0, sav: 0] Extended self test completion time (sec)
>> Control extension [coe] mode subpage [0xa,0x1] not found
>> SAT pATA control [pat] mode subpage [0xa,0xf1] not found
>> Power condition - old version [poo] mode page [0xd] not found
>> XOR control (SBC) [xo] mode page [0x10] not found
>> Protocol specific logical unit [pl] mode page [0x18] not found
Protocol specific port [pp] [0x19] mode page [PS=1]:
PPID 0 [cha: n, def: 0, sav: 0] Port's (transport) protocol identifier
Power condition [po] [0x1a] mode page [PS=1]:
IDLE 1 [cha: y, def: 1, sav: 0] Idle timer active
STANDBY 1 [cha: y, def: 1, sav: 0] Standby timer active
ICT 1 [cha: n, def: 1, sav: 1] Idle condition timer (100 ms)
SCT 4 [cha: n, def: 4, sav: 4] Standby condition timer (100 ms)
Informational exceptions control [ie] [0x1c] mode page [PS=1]:
PERF 0 [cha: y, def: 0, sav: 0] Performance (impact of ie operations)
EBF 0 [cha: n, def: 0, sav: 0] Enable background function
EWASC 0 [cha: y, def: 1, sav: 0] Enable warning
DEXCPT 0 [cha: y, def: 0, sav: 0] Disable exceptions
TEST 0 [cha: y, def: 0, sav: 0] Test (simulate device failure)
EBACKERR 0 [cha: n, def: 0, sav: 0] Enable background (scan + self test) error reporting
LOGERR 0 [cha: y, def: 0, sav: 0] Log informational exception errors
MRIE 3 [cha: y, def: 0, sav: 3] Method of reporting informational exceptions
INTT 0 [cha: y, def: 0, sav: 0] Interval timer (100 ms)
REPC 1 [cha: y, def: 1, sav: 1] Report count (or Test flag number [SSC-3])
>> Background control (SBC) [bc] mode subpage [0x1c,0x1] not found
DL580 ~ #

Edit :

Thanks again - let me know if you find any more info on that other lead! I did find http://freshmeat.net/projects/sg3_utils/ and it deals with Scsi disks also possibly the same thing?

Jonathan

Last edited by jc179; 06-24-2009 at 09:49 PM.
 
Old 06-24-2009, 09:49 PM   #7
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
If you have sg_start, then you should have the rest of it; that IS one of the commands in `sg3_utils` of which I have version 1.25 which I built from source. It doesn't list a homepage, but I'll see what that is and edit this post.

Sasha
 
Old 06-24-2009, 09:52 PM   #8
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
README for sg3_utils
====================
Introduction
============
This package contains low level utilities for devices that use a SCSI
command set. Apart from SCSI parallel interface (SPI) devices, the SCSI
command set is used by ATAPI devices (CD/DVDs and tapes), USB
mass storage devices, Fibre Channel disks, IEEE 1394 storage
devices (that use the "SBP" protocol), SAS and iSCSI.

This package originally targeted the Linux SCSI subsystem. Since most
operating systems contain a SCSI command pass-through mechanism, many

..blah ..

A web site supporting the sg3_utils package, its predecessor sg_utils, and
the Linux SCSI generic driver can be found at http://www.torque.net/sg .
The most recent release version of sg3_utils and the most recent beta are
available from that page. There is also a page describing the utilities in
the sg3_utils and sg_utils packages: http://www.torque.net/sg/sg3_utils.html .
EDIT: There it is!
 
Old 06-24-2009, 11:15 PM   #9
jc179
LQ Newbie
 
Registered: Apr 2007
Location: Ontario, Canada
Distribution: Gentoo, slackware
Posts: 15

Original Poster
Rep: Reputation: 0
Hey

thanks for the info!

I've need to do some digging to see how to get sdparm to set properly... I don't think the machine really liked me stopping the disk manually.

this was just from "sd_start --stop /dev/sdt"

After which I had to run the "redetect scsi" app. Any idea if how to set the sdparms? I've googled a bit and found one for a usb drive; but jsut to disable it.

The code was
sdparm --clear STANDBY -6 /dev/sda

I've tried

sdparm --set STANDBY -6 /dev/sdu and all sorts of combinations but just get strange errors.

I was able to get a bit further, but still don't know what I'm setting or how to control it ...

I tried..

DL580 ~ # sdparm -p po --set=IDLE=1 /dev/sdu
/dev/sdu: SEAGATE ST373405FC MS09
DL580 ~ # sdparm -p po --set=ICT=1 /dev/sdu
/dev/sdu: SEAGATE ST373405FC MS09
DL580 ~ # sdparm -p po --set=SCT=1 /dev/sdu
/dev/sdu: SEAGATE ST373405FC MS09
DL580 ~ # sdparm -p po -l /dev/sdu
/dev/sdu: SEAGATE ST373405FC MS09
Direct access device specific parameters: WP=0 DPOFUA=1
Power condition [po] mode page:
IDLE 1 [cha: y, def: 1, sav: 0] Idle timer active
STANDBY 1 [cha: y, def: 1, sav: 0] Standby timer active
ICT 1 [cha: n, def: 1, sav: 1] Idle condition timer (100 ms)
SCT 4 [cha: n, def: 4, sav: 4] Standby condition timer (100 ms)
DL580 ~ #


I can definately turn things on and off, I'm not sure if the sav: 0 field needs to be sav: 1 to be enabled?

Cheers

Jonathan



* Output below after sd_start --stop /dev/sdt

sd 11:0:12:0: [sdt] Device not ready: Sense Key : 0x2 [current]
sd 11:0:12:0: [sdt] Device not ready: ASC=0x4 ASCQ=0x2
end_request: I/O error, dev sdt, sector 0
Buffer I/O error on device sdt, logical block 0
Buffer I/O error on device sdt, logical block 1
Buffer I/O error on device sdt, logical block 2
Buffer I/O error on device sdt, logical block 3
Buffer I/O error on device sdt, logical block 4
Buffer I/O error on device sdt, logical block 5
Buffer I/O error on device sdt, logical block 6
Buffer I/O error on device sdt, logical block 7
Buffer I/O error on device sdt, logical block 8
Buffer I/O error on device sdt, logical block 9
sd 11:0:12:0: [sdt] Device not ready: Sense Key : 0x2 [current]
sd 11:0:12:0: [sdt] Device not ready: ASC=0x4 ASCQ=0x2
end_request: I/O error, dev sdt, sector 0
sd 11:0:12:0: [sdt] Device not ready: Sense Key : 0x2 [current]
sd 11:0:12:0: [sdt] Device not ready: ASC=0x4 ASCQ=0x2
end_request: I/O error, dev sdt, sector 2
sd 11:0:12:0: [sdt] Device not ready: Sense Key : 0x2 [current]
sd 11:0:12:0: [sdt] Device not ready: ASC=0x4 ASCQ=0x2
end_request: I/O error, dev sdt, sector 0
printk: 10 messages suppressed.
Buffer I/O error on device sdt, logical block 0
Buffer I/O error on device sdt, logical block 1
sd 11:0:12:0: [sdt] Device not ready: Sense Key : 0x2 [current]
sd 11:0:12:0: [sdt] Device not ready: ASC=0x4 ASCQ=0x2
end_request: I/O error, dev sdt, sector 0
sd 11:0:12:0: [sdt] Device not ready: Sense Key : 0x2 [current]
sd 11:0:12:0: [sdt] Device not ready: ASC=0x4 ASCQ=0x2
end_request: I/O error, dev sdt, sector 2
sd 11:0:12:0: [sdt] Device not ready: Sense Key : 0x2 [current]
sd 11:0:12:0: [sdt] Device not ready: ASC=0x4 ASCQ=0x2
end_request: I/O error, dev sdt, sector 0
sd 11:0:12:0: [sdt] Device not ready: Sense Key : 0x2 [current]
sd 11:0:12:0: [sdt] Device not ready: ASC=0x4 ASCQ=0x2
end_request: I/O error, dev sdt, sector 0
sd 11:0:12:0: [sdt] Device not ready: Sense Key : 0x2 [current]
sd 11:0:12:0: [sdt] Device not ready: ASC=0x4 ASCQ=0x2
end_request: I/O error, dev sdt, sector 143374736
sd 11:0:12:0: [sdt] Device not ready: Sense Key : 0x2 [current]
sd 11:0:12:0: [sdt] Device not ready: ASC=0x4 ASCQ=0x2
end_request: I/O error, dev sdt, sector 143374736
printk: 27 messages suppressed.
Buffer I/O error on device sdt, logical block 71687368
sd 11:0:12:0: [sdt] Device not ready: Sense Key : 0x2 [current]
sd 11:0:12:0: [sdt] Device not ready: ASC=0x4 ASCQ=0x2
end_request: I/O error, dev sdt, sector 0
sd 11:0:12:0: [sdt] Device not ready: Sense Key : 0x2 [current]
sd 11:0:12:0: [sdt] Device not ready: ASC=0x4 ASCQ=0x2
end_request: I/O error, dev sdt, sector 0
qla2xxx 0000:02:01.1: LIP reset occured (f71e).
qla2xxx 0000:02:01.1: LIP occured (f71e).
qla2xxx 0000:02:01.1: LIP reset occured (f71e).
qla2xxx 0000:02:01.1: LIP occured (f71e).
rport-11:0-4: blocked FC remote port time out: removing target and saving binding
qla2xxx 0000:02:01.1: LIP reset occured (f7f7).
qla2xxx 0000:02:01.1: LIP occured (f7f7).
qla2xxx 0000:02:01.1: LIP reset occured (f7f7).
qla2xxx 0000:02:01.1: LIP occured (f7f7).
 
Old 06-24-2009, 11:40 PM   #10
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
If/when I put a hard drive to sleep, I believe I send it a sdparm -w to reset it (which awakes it)

But, most of the options with sdparm require a boolean input, ie a 1 or a 0, to enable/disable something or set something true/false.

The man pages are pretty decent; the one for sg3_utils is exactly that: `man sg3_utils` and `man sdparm` is the other (also, `sdparm --help` is good)

Cheers,
Sasha
 
Old 06-25-2009, 01:53 AM   #11
jc179
LQ Newbie
 
Registered: Apr 2007
Location: Ontario, Canada
Distribution: Gentoo, slackware
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by farslayer View Post
http://www.j-pfennig.de/LinuxImHaus/ngflushd_1_man.html



if that is an external array, you may be at the mercy of the way the enclosure and array controller was designed.

You didn't describe your hardware, so it's difficult to tell how things are actually setup. if Linux is just seeing the array as a single large volume via a SCSI interface, I doubt there is any way to control individual disk spin down from within Linux.
Hey

Thanks for that info, somehow I missed this, I must have jumped intoo fast, but if this works that will be exactly what I need!

Thanks

Jonathan
 
  


Reply

Tags
harddrive, sdparm, spindown


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Configuring Hard Drive Spindown Schalken Linux - Laptop and Netbook 3 01-13-2009 03:45 AM
SATA drive spindown, laptop mode, and hdparm--what works and how? enigma_0Z Linux - Hardware 1 05-02-2008 04:11 PM
kernel accessing pata cd rom drive instead of sata OS hard drive for filesystem elaps2007 Linux - Kernel 0 03-19-2008 10:39 AM
Hard drive in primary channel showing in secondary channel Ale Linux - Hardware 2 02-20-2004 12:39 PM
SCSI generic, RedHat 9.0, Qlogic Fibre Channel card niverson Linux - Hardware 2 07-12-2003 02:15 PM


All times are GMT -5. The time now is 01:23 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration