Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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.
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. :-)