Devices and storage
From Alessandro's Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
devices in Linux
dmidecode
- gives you a lot of information about bus and bios
I/O analisys
- vmstat
- iostat
- vopstat
- sysstat (package)
- iotop
- kernel "unusual" options needed
- CONFIG_TASK_IO_ACCOUNTING: is not set when it should be.
- CONFIG_TASK_DELAY_ACCT: is not set when it should be.
- CONFIG_TASKSTATS: is not set when it should be.
udev
- udev manages the /dev filesystem interacting with the kernel and its modules
- disk conncted through udev
ls -lR /dev/disk
- udev information dump
udevinfo -a -p /sys/block/sdb/
lshal
- commang to list the whole Hardware Abstraction Layer
Processor DRAM Controller' (string) pci.product_id = 64 (0x40) (int) pci.subsys_product_id = 64 (0x40) (int) pci.subsys_vendor = 'Intel Corporation' (string) pci.subsys_vendor_id = 32902 (0x8086) (int) pci.vendor = 'Intel Corporation' (string) pci.vendor_id = 32902 (0x8086) (int) Dumped 165 device(s) from the Global Device List.
hdparm
- sets and gets information from a block device
- hdparm -I /dev/hda
/dev/hda:
ATA device, with non-removable media Model Number: WDC WD2500JB-00FUA0 Serial Number: WD-WCAEP1091941 Firmware Revision: 15.05R15 Standards: Supported: 6 5 4 Likely used: 6 Configuration: Logical max current cylinders 16383 65535 heads 16 1 sectors/track 63 63 -- CHS current addressable sectors: 4128705 LBA user addressable sectors: 268435455 LBA48 user addressable sectors: 488397168 device size with M = 1024*1024: 238475 MBytes device size with M = 1000*1000: 250059 MBytes (250 GB) Capabilities: LBA, IORDY(can be disabled) Standby timer values: spec'd by Standard, with device specific minimum R/W multiple sector transfer: Max = 16 Current = 16 Recommended acoustic management value: 128, current value: 128 DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5 Cycle time: min=120ns recommended=120ns PIO: pio0 pio1 pio2 pio3 pio4 Cycle time: no flow control=120ns IORDY flow control=120ns Commands/features: Enabled Supported: * SMART feature set Security Mode feature set * Power Management feature set * Write cache * Look-ahead * Host Protected Area feature set * WRITE_BUFFER command * READ_BUFFER command * DOWNLOAD_MICROCODE SET_MAX security extension * Automatic Acoustic Management feature set * 48-bit Address feature set * Device Configuration Overlay feature set * Mandatory FLUSH_CACHE * FLUSH_CACHE_EXT * SMART error logging * SMART self-test Security: supported not enabled not locked not frozen not expired: security count not supported: enhanced erase HW reset results: CBLID- above Vih Device num = 0 determined by the jumper Checksum: correct
Hard disk naming
- behind the hard disks naming, as WD3200JD, there's lot of info about the device:
http://forums.storagereview.net/index.php?showtopic=22131 Sample: WD3200JD-00KLB0 Formula: AAbbbbCD-eeFGHi
AA = WesternDigital
bbbb = Capacity in 100MB units (GBx10)
C = Cache(buffer) size and drive's purpose: * Desktop drives: B=2MB, J=8MB, K=16MB * Enterprise drives 7200rpm: S=8MB, Y=16MB * Enterprise drives 10000rpm: G=8MB, A=16MB
D = Interface and some other specs: * B=ATA, D=SATA150, S=SATA300, R=SATA150(RaidEdition2), H=SATA150(Window)
ee = Vendor code (probably): * 00=general consumers, 01=general enterprise, 22=promotional(?), * 07/08/11/14/23/32/40/41/50/55/56/57/58/60/75/88/98=unknown (of them 55 is pretty much used)
F = May be related to platters (needs more research)
G = ??? (needs more research)
H = Related to interface/firmware and something more (needs more research): * A=ATA(Caviar over 100GB)/ATAandSATA(Caviar below 100GB), B=SATA(Caviar over 100GB), C=ATAandSATA(Caviar, newer updates), A/C/R=Generation(RaptorSATA), T=LaptopDrive
i = Firmware version (probably): * 0/1/2=larger is newer (if the preceeding letter is same).
Disktype
disktype /dev/sda --- /dev/hda Block device, size 372.6 GiB (400088457216 bytes) DOS/MBR partition map Partition 1: 372.6 GiB (400085812224 bytes, 781417602 sectors from 63, bootable) Type 0x83 (Linux) ReiserFS file system (new 3.6 format, standard journal, starts at 64 KiB) Volume name "scratch" UUID E217E2D5-0410-479E-B4C7-60116C56761E (DCE, v4) Volume size 372.6 GiB (400085811200 bytes, 97677200 blocks of 4 KiB) [...]
Hddtemp
# hddtemp /dev/sd[abcd] WARNING: Drive /dev/sda doesn't appear in the database of supported drives WARNING: But using a common value, it reports something. WARNING: Note that the temperature shown could be wrong. WARNING: See --help, --debug and --drivebase options. WARNING: And don't forget you can add your drive to hddtemp.db /dev/sda: WDC WD3200KS-00PFB0: 42 C or F
extend hddtemp database
* file /usr/share/hddtemp/hddtemp.db "ST3320620AS" 194 C "Seagate ST3320620AS" "WDC WD3200KS-00PFB0" 194 C "Western Digital WD3200KS-00PFB0"
- risultato
# hddtemp /dev/sd[abcd] /dev/sda: WDC WD3200KS-00PFB0: 42 C /dev/sdb: ST3750330AS: 36 C /dev/sdc: WDC WD3200KS-00PFB0: 41 C /dev/sdd: ST3750330AS: 41 C
NCQ
megarais_sas
- controller SAS interno:
rpm -Uvh MegaCli-8.00.29-1.i386.rpm --nodeps rpm -Uvh Lib_Utils-1.00-08.noarch.rpm --nodeps
- come usarlo:
http://hwraid.le-vert.net/wiki/LSIMegaRAIDSAS
http://hwraid.le-vert.net/wiki/LSIMegaRAID
http://tools.rapidsoft.de/perc/perc-cheat-sheet.html
/opt/MegaRAID/MegaCli/MegaCli -PdInfo -PhysDrv \[\?:1\] -aAll
- current virtual disk:
femmes:~/megaraid# /opt/MegaRAID/MegaCli/MegaCli -LDInfo -LALL -aALL Adapter 0 -- Virtual Drive Information: Virtual Drive: 0 (Target Id: 0) Name :Virtual Disk 0 RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0 Size : 136.125 GB State : Optimal Strip Size : 64 KB Number Of Drives : 2 Span Depth : 1 Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU Access Policy : Read/Write Disk Cache Policy : Disk's Default Encryption Type : None
- physical disks
:~/megaraid# /opt/MegaRAID/MegaCli/MegaCli -PDList a0 Adapter #0 Enclosure Device ID: 32 Slot Number: 0 Device Id: 0 Sequence Number: 2 Media Error Count: 0 Other Error Count: 0 Predictive Failure Count: 0 Last Predictive Failure Event Seq Number: 0 PD Type: SAS Raw Size: 136.732 GB [0x11177328 Sectors] Non Coerced Size: 136.232 GB [0x11077328 Sectors] Coerced Size: 136.125 GB [0x11040000 Sectors] Firmware state: Online, Spun Up SAS Address(0): 0x5000cca00d047fd5 SAS Address(1): 0x0 Connected Port Number: 0(path0) Inquiry Data: HITACHI HUS153014VLS300 A4C2JFV2GPZC FDE Capable: Not Capable FDE Enable: Disable Secured: Unsecured Locked: Unlocked Needs EKM Attention: No Foreign State: None Device Speed: Unknown Link Speed: Unknown Media Type: Hard Disk Device Enclosure Device ID: 32 Slot Number: 1 Device Id: 1 Sequence Number: 2 Media Error Count: 0 Other Error Count: 0 Predictive Failure Count: 0 Last Predictive Failure Event Seq Number: 0 PD Type: SAS Raw Size: 136.732 GB [0x11177328 Sectors] Non Coerced Size: 136.232 GB [0x11077328 Sectors] Coerced Size: 136.125 GB [0x11040000 Sectors] Firmware state: Online, Spun Up SAS Address(0): 0x5000cca00d04908d SAS Address(1): 0x0 Connected Port Number: 1(path0) Inquiry Data: HITACHI HUS153014VLS300 A4C2JFV2HUHC FDE Capable: Not Capable FDE Enable: Disable Secured: Unsecured Locked: Unlocked Needs EKM Attention: No Foreign State: None Device Speed: Unknown Link Speed: Unknown Media Type: Hard Disk Device
- battery status
/opt/MegaRAID/MegaCli/MegaCli -AdpBbuCmd -aALL BBU status for Adapter: 0 BatteryType: BBU Voltage: 4040 mV Current: 0 mA Temperature: 25 C [...]
- Find unused disks
/opt/MegaRAID/MegaCli/MegaCli -PDList -a0 | grep -B14 Unconfigured | grep -e '^Enclosure Device ID:' -e '^Slot Number:' Enclosure Device ID: 32 Slot Number: 2 Enclosure Device ID: 32 Slot Number: 3
- Silence active alarm
MegaCli -AdpSetProp AlarmSilence -aALL
- Disable alarm
MegaCli -AdpSetProp AlarmDsbl -aALL
- Enable alarm
MegaCli -AdpSetProp AlarmEnbl -aALL
- Create Raid 1 Volume (in femmes, creato array secondario con 2 dischi da 2TB)
MegaCli -CfgLdAdd -r1 [32:2,32:3] -a1
- comando effettuato il 5 maggio 2011
# /opt/MegaRAID/MegaCli/MegaCli -CfgLdAdd -r1 [32:2,32:3] -a0 Adapter 0: Created VD 1 Adapter 0: Configured the Adapter!! Exit Code: 0x00
- Create RAID 0, 1, 5 drive
MegaCli -CfgLdAdd -r(0|1|5) [E:S, E:S, ...] -aN
- Create RAID 10 drive
MegaCli -CfgSpanAdd -r10 -Array0[E:S,E:S] -Array1[E:S,E:S] -aN
- Remove drive
MegaCli -CfgLdDel -Lx -aN
HP Smart Array
- checking arrays on the controller
$ cat /proc/driver/cciss/cciss*
cciss0: HP Smart Array P400i Controller
Board ID: 0x000000
Firmware Version: 5.26
IRQ: 1271
Logical drives: 2
Current Q depth: 0
Current # commands on controller: 0
Max Q depth since init: 31
Max # commands on controller since init: 51
Max SG entries since init: 31
Sequential access devices: 0
cciss/c0d0: 73.37GB RAID 1(1+0)
cciss/c0d1: 146.77GB RAID 1(1+0)