LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   detailed information about mdadm output (https://www.linuxquestions.org/questions/linux-general-1/detailed-information-about-mdadm-output-781033/)

bertl1982 01-09-2010 07:30 AM

detailed information about mdadm output
 
Hi!

I'm using mdadm for managing raid arrays in one of our debian server. There you can look for detailed raid informations with mdadm --detail <raidarray>. When you look at the output, there are 2 things where I don't know what they mean exactly. So, I thought that maybe anyone in this forum can help me with them.

In the server I have 2 raid1 arrays with 2 discs active which I use as root and as swap.

In the output of one array I get the Output "Preferred Minor : 2" and in the other "Preferred Minor : 1". So what is "Preferred Minor" in details?

And the 2nd question I have is the detailed difference between state "clean" and "active". I think both states mean no problem. Is this correct? Does "Clean" mean that there is actualy no disc activity and the array is stateful? And "Active" that the array is OK but there is disc actiity? The state is only "Active". Not "Active, degraded".

I hope that anyone can give me an answer to my questions.
Thanx.

PS: Sorry for my bad english. ;-)

Kind regards,
bertl1982

Elemecca 01-10-2010 11:39 AM

Linux device nodes are identified by a major number and a minor number. The major number usually corresponds to a subsystem (i.e. the MD RAID system) and the minor number usually indexes devices provided by that subsystem. In the case of MD the minor number is the same as the number in the device name (so /dev/md0 is minor number zero). The preferred minor field in the array superblock allows you to configure what minor number (and thus name) the array will receive. I can't find this info anywhere in the MD docs, but I'm pretty sure it's correct.

Your guesses as to the meaning of the array states are essentially correct. An array in state "active" is operating and IO and resync can be happening. An array in state "clean" is like "active" but has no pending writes. See the definition of array_state in kernel doc md.txt at line 256.

Useful Documentation:
man page md(4)
man page mdadm(8)
kernel document md.txt

bertl1982 01-11-2010 03:07 AM

Thank you very much for your answers.

I think because of your reply to know the true meaning of "Preferred minor".

For Example the output of >mdadm --detail /dev/md1<

Version : 00.90.03
Creation Time : Thu Jan 1 17:49:48 2009
Raid Level : raid1
Array Size : 11420992 (10.89 GiB 11.70 GB)
Device Size : 11420992 (10.89 GiB 11.70 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 1
Persistence : Superblock is persistent

Update Time : Mon Jan 11 00:28:01 2010
State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

UUID : 0d5b3219:3ad1b9e2:d6537494:1c75e871 (local to host assp)
Events : 0.1465

Number Major Minor RaidDevice State
0 3 1 0 active sync /dev/hda1
1 3 65 1 active sync /dev/hdb1

There you can see the Major and the Minor Numbers of the devices in the array. I think that the "Preferred Minor" is the disc, where the array writes the data in the IO process first (because it is preferred) and than it syncs. I think that is the correct answer. :-)

Thank you for the information about the "State"

Kind regards
bertl1982

bertl1982 01-11-2010 05:00 AM

Hy!

I checked my theory on another system and it's not as I have described. I think that you were right in your theory.

I've a last question.

Can anybody explain me the point "Events:"? Is that an indicator for raid acitivity?

Regards,
Bernd


All times are GMT -5. The time now is 04:17 PM.