http://www.debian-administration.org/users/sneex/weblog Standard: /dev/sda: Timing cached reads: 5706 MB in 2.00 seconds = 2854.73 MB/sec Timing buffered disk reads: 1114 MB in 3.00 seconds = 370.78 MB/sec deb:/boot# echo cfq > /sys/block/sda/queue/scheduler deb:/boot# hdparm -tT /dev/sda | tee -a /tmp/output /dev/sda: Timing cached reads: 5892 MB in 2.00 seconds = 2947.46 MB/sec Timing buffered disk reads: 1120 MB in 3.00 seconds = 373.00 MB/sec echo 128 > /sys/block/sda/queue/max_sectors_kb echo 512 > /sys/block/sda/queue/nr_requests blockdev --setra 16384 /dev/sda deb:/boot# hdparm -tT /dev/sda | tee -a /tmp/output /dev/sda: Timing cached reads: 6184 MB in 2.00 seconds = 3094.18 MB/sec Timing buffered disk reads: 1732 MB in 3.00 seconds = 576.94 MB/sec -------------------- Install web enabled monitoring software: *important* Newer binaries @ http://jonas.genannt.name/ wget http://ftp-master.debian-unofficial.org/other/openpgp/archive-key-2007.asc -O - | apt-key add - # For getting 3dm2-package for 3ware echo "deb http://ftp.debian-unofficial.org/debian etch main contrib non-free restricted" >> /etc/apt/sources.list apt-get update aptitude install 3ware-3dm2-binary #In /etc/3dm2/3dm2.conf, the following defaults are set: # * 3DM 2 is listening on . # * Default password for both the user and the administrator is '3ware'. # * Remote access is disabled for security reasons (change 'RemoteAccess 0' to # 'RemoteAcces 1' to enable it and restart the 3dm2 daemon). --------------------------- Insert new hotspare into array //beast> /c0 add disk=1 RaidType = spare Creating new unit on controller /c0 ... Done. The new unit is /c0/u1. WARNING: This Spare unit may replace failed drive of same interface type only //beast> show Ctl Model (V)Ports Drives Units NotOpt RRate VRate BBU ------------------------------------------------------------------------ c0 9650SE-8LPML 8 8 2 0 3 3 - -------------------------------- example for automagic rebuild with hot spare: Date: Sat, 16 Feb 2008 12:51:20 +0100 Subject: 3ware 3DM2 alert -- host: beast 20080216125114 - Controller 0 ERROR - Degraded unit: unit=0, port=1 20080216125114 - Controller 0 WARNING - Drive removed: port=1 Date: Sat, 16 Feb 2008 12:52:51 +0100 20080216125244 - Controller 0 INFORMATION - Rebuild started: unit=0 Date: Sat, 16 Feb 2008 16:29:08 +0100 20080216162907 - Controller 0 INFORMATION - Rebuild completed: unit=0 SO rebuild took 16:29-12:52= 3hrs37 minutes ------------------- update firmware //beast> update fw=/archive/software/3ware/fw3.08.03.016/prom0006.img Warning: Updating the firmware can render the device driver and/or management tools incompatible. Before you update the firmware, it is recommended that you: 1) Back up your data. 2) Make sure you have a copy of the current firmware image so that you can roll back, if necessary. 3) Close all applications. Examining compatibility data from firmware image and /c2 ... Done. New-Firmware Current-Firmware Current-Driver Current-API ---------------------------------------------------------------------- FE9X 4.08.00.006 FE9X 4.06.00.004 2.26.02.011 2.04.00.003 Do you want to continue ? Y|N [N]: y Downloading the firmware from file /archive/software/3ware/fw3.08.03.016/prom0006.img ... Done. The new image will take effect after reboot. ======================================================================= tw_cli /c0 show all|less ======================================================================= #------------------------------------3ware #miquels 3ware settings #for deadline # Limit queue depth somewhat #echo 128 > /sys/block/sda/device/queue_depth # Increase nr_requests #echo 256 > /sys/block/sda/queue/nr_requests # Don't use as for database-like loads #echo deadline > /sys/block/sda/queue/scheduler #CFQ seems to like larger nr_requests, so if you use CFQ, try 254 #(maximum hardware size) for queue_depth and 512 or 1024 for nr_requests. #for cfq # Limit queue depth somewhat echo 254 > /sys/block/sda/device/queue_depth # Increase nr_requests echo 1024 > /sys/block/sda/queue/nr_requests # Don't use as for database-like loads echo cfq > /sys/block/sda/queue/scheduler #CFQ seems to like larger nr_requests, so if you use CFQ, try 254 #(maximum hardware size) for queue_depth and 512 or 1024 for nr_requests. echo 128 > /sys/block/sda/queue/max_sectors_kb blockdev --setra 16384 /dev/sda #------------------------------------/3ware