System check and harddisk/raid speed tests in a nutshell
A collection of useful commands for inventory and speed tests
Part I: Inventory
Oftenly people complain about low transfer speeds to their OMV box. This is not always a problem of network drivers, cabling or switching hardware, protocols or client OS versions. If the internal transfer speed of your box is slow then network transfer speed cannot be fast.
So I thought it would be a good idea to collect system check and testing commands to check what is going on inside your box as a point to start with if you are experiencing slow transfer speeds. This can help the users to gain information about her system and delivers information for the supporters.
There's a lot of information stored in this forum but they are widespread and sometimes hard to find.
Ok, let's start with a system inventory. I've tested all these commands on my home box with an Asus ITX board, look at my footer for more details.
If you know what the OMV system (Or to be more precise: The Linux kernel) detects in your system you can compare that to what your hardware should be capable of and find differences. And you can make sure that the correct kernel driver is loaded for the appropriate hardware.
1. Hardware oversight
For this we need the lspci command, a part of the pciutils suite. It is not installed by default, you can install it with apt-get install pciutils. The command without parameters deliver a first oversight, to go into detail we use one of the verbose levels. Because it delivers a lot of information you cannot see completely on the screen it is a good idea to send the output into a file with lspci -v > lspciout.txt and so you have all the information in one file.
The first one lspci -v of the verbose levels delivers much more details (To go deeper you can use -vv or -vvv). Of interest are the informations about the harddisk controllers:
00:11.0 SATA controller: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode] (rev 40 ) (prog-if 01 [AHCI 1.0])
Subsystem: ASUSTeK Computer Inc. Device 8496
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 19
I/O ports at f190 [size=8]
I/O ports at f180 [size=4]
I/O ports at f170 [size=8]
I/O ports at f160 [size=4]
I/O ports at f150 [size=16]
Memory at feb4b000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [70] SATA HBA v1.0
Capabilities: [a4] PCI Advanced Features
Kernel driver in use: ahci
Alles anzeigen
Ok, this board has five SATA ports, they are completely detected and running in AHCI mode and the ahci kernel driver is loaded.
For compatibility purposes the PATA drivers are loaded as well:
00:14.1 IDE interface: Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0 IDE Controller (rev 40) (prog-if 8a [Master SecP PriP])
Subsystem: ASUSTeK Computer Inc. Device 8496
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 17
I/O ports at 01f0 [size=8]
I/O ports at 03f4 [size=1]
I/O ports at 0170 [size=8]
I/O ports at 0374 [size=1]
I/O ports at f100 [size=16]
Kernel driver in use: pata_atiixp
If your board has SATA ports and is AHCI-capable but the ahci kernel driver is not loaded than the onboard controller was probably not detected correctly due to sometimes exotic hardware. Try to install the backport kernels.
2. Detect the SATA levels
Allright, let's do the next check: Detect the SATA level for every single harddisk and it's port. You need the "system names" like sda, sdb and so on to do this, they can be found in the web-gui under storage/physical disks.
We use the command hdparm -I /dev/sda | grep -i speed and get that:
root@DATENKNECHT:~# hdparm -I /dev/sdc | grep -i speed
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Gen3 signaling speed (6.0Gb/s)
The output shows that this harddisk is capable of SATA-III from the board port up to the disk.
The same for sdb in my system shows that:
root@DATENKNECHT:~# hdparm -I /dev/sdb | grep -i speed
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
Aha - a difference, the maximum is only SATA-II even it is connected to an eSATA port which is SATA-III capable as well. But the disk (2,5" notebook disk for the OS) is only SATA-II capable so this is correct.
If your system can deliver Gen3 signaling (Aka SATA-III) and your harddisks are SATA-III ones but the output does not spit out Gen3 signaling, check if your controller is detected correctly and check your SATA cabling. Old SATA cables are sometimes not SATA-III ready or they become scrappy over the years.
3. Harddisk details and SATA connections
Next we check if the harddisks are detected correctly with egrep 'ata[0-9]\.|SATA link up' /var/log/dmesg:
root@DATENKNECHT:~# egrep 'ata[0-6]\.|SATA link up' /var/log/dmesg
[ 2.507922] ata1.00: ATA-8: HGST HDS724040ALE640, MJAOA580, max UDMA/133
[ 2.507930] ata1.00: 7814037168 sectors, multi 16: LBA48 NCQ (depth 0/32)
[ 2.547057] ata1.01: ATA-8: WDC WD1600BEVT-75ZCT2, 11.01A11, max UDMA/133
[ 2.547069] ata1.01: 312581808 sectors, multi 16: LBA48 NCQ (depth 0/32)
[ 2.547081] ata1.00: limited to UDMA/33 due to 40-wire cable
[ 2.547086] ata1.01: limited to UDMA/33 due to 40-wire cable
[ 2.561231] ata1.00: configured for UDMA/33
[ 2.577216] ata1.01: configured for UDMA/33
[ 2.848317] ata4: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 2.848365] ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 2.848400] ata6: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 2.848425] ata5: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[ 2.850552] ata3.00: ATA-8: HGST HDS724040ALE640, MJAOA580, max UDMA/133
[ 2.850560] ata3.00: 7814037168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[ 2.850601] ata6.00: ATA-8: HGST HDS724040ALE640, MJAOA580, max UDMA/133
[ 2.850608] ata6.00: 7814037168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[ 2.850640] ata5.00: ATA-8: HGST HDS724040ALE640, MJAOA580, max UDMA/133
[ 2.850645] ata5.00: 7814037168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[ 2.850661] ata4.00: ATA-8: HGST HDS724040ALE640, MJAOA580, max UDMA/133
[ 2.850666] ata4.00: 7814037168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[ 2.852309] ata3.00: configured for UDMA/133
[ 2.852347] ata5.00: configured for UDMA/133
[ 2.852377] ata6.00: configured for UDMA/133
[ 2.852512] ata4.00: configured for UDMA/133
Alles anzeigen
Oh, that showed a possible cabling problem in my system. Ata1.00 is connected to the same SATA ports on the board like ata3.00 to ata6.00, but the output says that it is limited to UDMA/33 due to a bad cable. In fact I use a different cable for this disk because it is mounted in a 5,25" bay on top of the front and the brand new yellow SATA-III cables I used for the other data disks are too short, so I used an old cable laying around. Hm.
But Ata1.01 (The OS disk connected to an eSATA port) shows the same and due to the fact that these two disks are obviously connected to the same port group on the board (both ata1. and there was no ata2. found) I came to the conclusion that the board maker has used a port multiplier with different capabilities as the other four SATA ports and they seem to run on PATA-mode (A 40-wire cable is an old style flat cable). Another difference shows that: The two disks (ata1.00 and ata1.01) do not use the AA mode.
This can be a problem if the speed differs a lot from the other disks, but in my case it doesn't. This disk delivers the same transfer speeds as the other ones.
Also important is to look if all the disks are using NCQ (Native command queuing) - if one does not, all the other disks would slow down to the speed of that one. AA is the SATA auto activate mode. I haven't encountered any problems yet, but found some postings on the web reading that missing AA mode can lead to failures in sleep mode (Actually I do not use sleep mode).
That's a first oversight of the system.