LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Preparing SCSI drive for Mission Critical use? (http://www.linuxquestions.org/questions/linux-hardware-18/preparing-scsi-drive-for-mission-critical-use-552583/)

Slim Backwater 05-09-2007 08:36 AM

Preparing SCSI drive for Mission Critical use?
 
I purchased a few used Compaq/HP StorageWorks 4314R enclosures with 36 GB drives and hooked them upto an Adaptec 39160 controller.

I replaced 8 of the 28 drives with new Fujitsu MAX3036NC drives and noticed that the Fujistu's come with Write Caching enabled (write back), whereas the old Compaqs do not (write through). (As seen in dmesg)

Code:

  Vendor: FUJITSU  Model: MAX3036NC        Rev: 0104
  Type:  Direct-Access                      ANSI SCSI revision: 03
scsi1:A:3:0: Tagged Queuing enabled.  Depth 4
 target1:0:3: Beginning Domain Validation
 target1:0:3: wide asynchronous
 target1:0:3: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 127)
 target1:0:3: Ending Domain Validation
SCSI device sde: 71819496 512-byte hdwr sectors (36772 MB)
sde: Write Protect is off
sde: Mode Sense: b3 00 00 08
SCSI device sde: drive cache: write back
SCSI device sde: 71819496 512-byte hdwr sectors (36772 MB)
sde: Write Protect is off
sde: Mode Sense: b3 00 00 08
SCSI device sde: drive cache: write back
 sde: sde1
sd 1:0:3:0: Attached scsi disk sde
sd 1:0:3:0: Attached scsi generic sg4 type 0
  Vendor: COMPAQ    Model: BD03663622        Rev: BDCB
  Type:  Direct-Access                      ANSI SCSI revision: 02
scsi1:A:4:0: Tagged Queuing enabled.  Depth 4
 target1:0:4: Beginning Domain Validation
 target1:0:4: wide asynchronous
 target1:0:4: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 127)
 target1:0:4: Ending Domain Validation
SCSI device sdf: 71132000 512-byte hdwr sectors (36420 MB)
sdf: Write Protect is off
sdf: Mode Sense: f1 00 10 08
SCSI device sdf: drive cache: write through w/ FUA
SCSI device sdf: 71132000 512-byte hdwr sectors (36420 MB)
sdf: Write Protect is off
sdf: Mode Sense: f1 00 10 08
SCSI device sdf: drive cache: write through w/ FUA
 sdf: sdf1
sd 1:0:4:0: Attached scsi disk sdf
sd 1:0:4:0: Attached scsi generic sg5 type 0

I have learned that WriteCaching is not "good" (for my environment, running an Oracle Database), in that there could be file system corruption (or loss) in the event of a power failure.

In trying to figure out how to change to write-through, I found sdparm, and I have been able to change the Write-Cache with it:

http://sg.torque.net/sg/sdparm.html

Code:

sdparm --clear=WCE --save /dev/sde
I have been comparing the setting of the old Compaq drives' and the new Fujitsus and I've noticed differences other than the Write-Cache, specifically PER, EWASC, DEXCPT and MRIE,

Code:

root@terra:~# sdparm --long --long /dev/sde
    /dev/sde: FUJITSU  MAX3036NC        0104
    Direct access device specific parameters: WP=0  DPOFUA=0
Read write error recovery [rw] 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
  PER        0  [cha: y, def:  0, sav:  0]  Post error
        0: do not post recovered errors
        1: report recovered errors
Caching (SBC) [ca] mode page [PS=1]:
  WCE        0  [cha: y, def:  1, sav:  0]  Write cache enable
  RCD        0  [cha: y, def:  0, sav:  0]  Read cache disable
Control [co] mode page [PS=1]:
  SWP        0  [cha: n, def:  0, sav:  0]  Software write protect
Informational exceptions control [ie] mode page [PS=1]:
  EWASC      0  [cha: y, def:  0, sav:  0]  Enable warning
  DEXCPT      1  [cha: y, def:  1, sav:  1]  Disable exceptions
  MRIE        0  [cha: y, def:  0, sav:  0]  Method of reporting informational exceptions
        0: no reporting; 1: async reporting; 2: unit attention
        3: conditional recovered error; 4: recovered error
        5: check condition with no sense; 6: request sense only

Code:

root@terra:~# sdparm --long --long /dev/sdf
    /dev/sdf: COMPAQ    BD03663622        BDCB
    Direct access device specific parameters: WP=0  DPOFUA=1
Read write error recovery [rw] 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
  PER        1  [cha: y, def:  1, sav:  1]  Post error
        0: do not post recovered errors
        1: report recovered errors
Caching (SBC) [ca] mode page [PS=1]:
  WCE        0  [cha: y, def:  1, sav:  0]  Write cache enable
  RCD        0  [cha: y, def:  0, sav:  0]  Read cache disable
Control [co] mode page [PS=1]:
  SWP        0  [cha: n, def:  0, sav:  0]  Software write protect
Informational exceptions control [ie] mode page [PS=1]:
  EWASC      1  [cha: y, def:  1, sav:  1]  Enable warning
  DEXCPT      0  [cha: y, def:  0, sav:  0]  Disable exceptions
  MRIE        4  [cha: y, def:  4, sav:  4]  Method of reporting informational exceptions
        0: no reporting; 1: async reporting; 2: unit attention
        3: conditional recovered error; 4: recovered error
        5: check condition with no sense; 6: request sense only

I'm wondering if I should change those settings as well.

In general I'm looking for a guide or advice on configuring these new drives for mission critical use. (I admit that I'm assuming the Compaq drives are properly configured for MC use as that's the environment they came from)

Thanks.

._.


All times are GMT -5. The time now is 08:46 AM.