On Sep 6, 2005, at 3:30 PM, Dovber Shapiro wrote:
This might be kind of a newbie question, but I don't have lots or
RAID experience.
I am trying to catalog our servers, and want to figure out the RAID
version (ie 0,1,5 or 10), and the sizes of the Hard Drives etc.
Ideally I'd like to figure this out remotely via ssh, but at the
least without having to reboot and go into the controller utility.
If it matters they are running Red Hat mainly 7.3 a couple of ES3,
Some Dell's and some no name.
Dovber Shapiro
If you're talking Linux software RAID, this is relatively easy:
$ cat /proc/mdstat
In there you should see all RAID volumes and their types, size in
blocks, and devices that are used.
If you're talking hardware RAID, it's a little more difficult because
you're dependent on what the hardware driver is willing to expose.
You could use 'dmesg' (or check /var/log/boot.log if further kernel
events have caused the dmesg buffer to scroll past initial boot data)
to check the boot output and see if the driver reports controller
data on initialization. For example, the SmartArray 6i controller on
one of my HP DL360's prints this at boot:
cciss: Device 0x46 has been found at bus 2 dev 1 func 0
cciss: not using DAC cycles
blocks= 142253280 block_size= 512
heads= 255, sectors= 32, cylinders= 17433 RAID 1(0+1)
But that output is likely going to vary between your hardware unless
you've used a consistent type of RAID controller.
If dmesg isn't helpful, another place to check for hardware RAID data
is the /proc file system. On that same machine I used for the above
example, I find the following:
$ cat /proc/driver/cciss/cciss0
-----
cciss0: HP Smart Array 6i Controller
Board ID: 0x40910e11
Firmware Version: 2.26
IRQ: 24
Logical drives: 1
Current Q depth: 0
Current # commands on controller: 0
Max Q depth since init: 128
Max # commands on controller since init: 128
Max SG entries since init: 31
Sequential access devices: 0
cciss/c0d0: 69.45GB RAID 1(0+1)
-----
That's actually more useful than what dmesg told me, but that isn't
always the case - I've run across other hardware RAID that isn't nice
enough to expose data to /proc.
Hope that helps, enjoy the investigation!
--
Joshua Penix http://www.binarytribe.com
Binary Tribe Linux Integration Services & Network Consulting
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list