LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 10-10-2007, 01:00 PM   #1
Schneckl
LQ Newbie
 
Registered: Aug 2007
Posts: 13

Rep: Reputation: 0
Unhappy continuing problems with software raid


As i described in another thread, i work with a software stripeset on a dual boot system (debian based / windows). Still no real solution to the problem from the other thread. Instead i just entered my manual workaround in rc.local. Worked - so far.

Now there is a new problem. Yesterday, i did a normal linux shutdown and today a normal linux boot - no windows boot in between. And suddenly the array is inaccessible from linux. Works normal with windows, though.

Code:
64studio:/# mdadm --examine /dev/sda
/dev/sda:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : a0df0536:f49004bc:8c93f055:ea17d31b
  Creation Time : Tue Aug 28 16:09:32 2007
     Raid Level : raid0
    Device Size : 0
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0

    Update Time : Tue Aug 28 16:09:32 2007
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 42ef7639 - correct
         Events : 0.1

     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State
this     0       8        0        0      active sync   /dev/sda

   0     0       8        0        0      active sync   /dev/sda
   1     1       8       16        1      active sync   /dev/sdb



64studio:/# mdadm --examine /dev/sdb
/dev/sdb:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : a0df0536:f49004bc:8c93f055:ea17d31b
  Creation Time : Tue Aug 28 16:09:32 2007
     Raid Level : raid0
    Device Size : 0
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0

    Update Time : Tue Aug 28 16:09:32 2007
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 42ef764b - correct
         Events : 0.1

     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State
this     1       8       16        1      active sync   /dev/sdb

   0     0       8        0        0      active sync   /dev/sda
   1     1       8       16        1      active sync   /dev/sdb
Code:
64studio:/# mdadm --examine --scan
ARRAY /dev/md0 level=raid0 num-devices=2 UUID=a0df0536:f49004bc:8c93f055:ea17d31b
^-- **** see other thread why this happened ****

64studio:/# mdadm --stop /dev/md0
mdadm: error opening /dev/md0: No such file or directory
^-- HUH?!

64studio:/# mdadm --stop /dev/md_d0p1
mdadm: error opening /dev/md_d0p1: No such file or directory

64studio:/# mdadm --assemble --verbose --auto=mdp10 /dev/md_d0 /dev/sda /dev/sdb
mdadm: failed to create /dev/md_d0

64studio:/# mount /dev/md_d0p1
mount: special device /dev/md_d0p1 does not exist
Now i'm totally in the dark. Where do i get details about the error? What does it mean when mdadm --examine says, the devices are "active" - does it mean, they are used somewhere else? Apparently, there is still the /dev/md0 which is created at boot time and which i can't get rid of (see other thread). I used to be able to stop /dev/md0 but now i can't.
If anyone here can tell me how to start to tackle this problem, please reply.

edit: added --examine --scan info

Last edited by Schneckl; 10-10-2007 at 01:18 PM.
 
Old 10-10-2007, 01:18 PM   #2
ghostdancer
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 266

Rep: Reputation: 30
I suggest you should spend sometime read the following link:

http://www.linuxhomenetworking.com/w..._Software_RAID

You also read the mdadm manpage (man mdadm).
 
Old 10-10-2007, 04:19 PM   #3
Schneckl
LQ Newbie
 
Registered: Aug 2007
Posts: 13

Original Poster
Rep: Reputation: 0
With this link, are you suggesting i should better create the array from scratch instead of trying to fix what used to work until today? I have no problem with moving data, doing it new, moving data (besides the time spent, if i can be sure it works as expected afterwards!), because it's really the first software array i made and it is possible that i did something wrong. But in that case i don't understand why the array worked in the first place.

The whole story why i use it in this particular way:
Initially i wanted to have a two-disk SATA RAID0 because i was low on disk space and wanted a faster working space at the same time. It has to work in a linux/windows dual boot environment. I expected this to be no problem because i know how to use ext2 in windows (ext2 IFS for windows) and the SATA RAID is already on my mainboard. Later i learned the hard way that the mainboard really has BIOS software raid and that the relevant software (dmraid) did not recognise it. So i found a website (similar to the one you gave me) on how to create software RAID. So i did and to my surprise the array also worked with the BIOS and therefore is accessible from windows. Then i switched to a different distribution (from UbuntuStudio to 64Studio i think). And now the array is being auto-assembled as "md0" although i have auto off and the name should be "md_d0".

I needed a long frustrating time to get it to work (two times). Now the question is, will it work in windows if i re-do it exactly as described in the various how-tos?
 
Old 10-16-2007, 10:33 AM   #4
Schneckl
LQ Newbie
 
Registered: Aug 2007
Posts: 13

Original Poster
Rep: Reputation: 0
...i should have said:
Please be more specific with your answers. Otherwise you're not being helpful. I could RTFM again and again and it wouldn't help because the specific problem is not adressed there. And besides that, most manpages are hardly to be called manuals at all (as is the case with mdadm, where hundreds of websites have to be written to explain the use of it).
I'm now out to re-do the array. Will post the outcome.
 
Old 10-16-2007, 01:12 PM   #5
ghostdancer
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 266

Rep: Reputation: 30
Well, when I first read your post, I thought you did something completely wrong, since I never use md in such manner. However, after I spend a bit of time reading the man page, I realised, what you did is something I never done before, and since I never done such setup before, I should keep my mouth shut and let other more experience users to give suggestions (I am hoping to read others input so I can learn something new). Surprisingly, none came forward...

Anyway, perhaps a little background on how I usually setup my software raid. What I will be talking here will be just a simple raid1 configuration.

1) Use fdisk or cfdisk to partition the disk into the structure that I like. For example, 4 partitions: sda1 sda2 <sda5 sda6 sda7> (where sda2 is an extended partition and sda5 to sda7 is logical partition. sda1 is primary partition).

2) Do the same for sdb with same partition size. So, now sda1+sdb1 will be md0 and mount as /. sda5+sdb5 is /var/ will be md1. sda6+sdb6 is /home/ will be md2. The last group will be used for swap, md3 (sda7+sdb7).

From here, I run mdadm to create the md devices and make sure my fstab is correctly setup (usually is done by the installer, there should not be much for me to work on it).

For your case, you are creating a partitionable software array, as I quote man page:

Quote:
If the option to "auto" is "mdp" or "part" or (on the command line only) "p", then mdadm will create a partitionable array, using the first free one that is not in use, and does not already have an entry in /dev (apart from numeric /dev/md* entries).

If the option to "auto" is "yes" or "md" or (on the command line) nothing, then mdadm will create a traditional, non-partitionable md array.
So, basically, I have been setting up my raid as a traditional method. Yours to me is new, as I never try such setup. I am not even sure about what does partitionable means. Does this mean, I am suppose to run fdisk to /dev/mdp0 (if I name it such) before I can really use it?

However, computer do not lie, if it said as not found, it means, it really not found. Have you check the /dev/ directory and verify md devices are there? Could it be, for your setup, all your devices are in /dev/md/ folder?

Anyway, good luck, hope someone else able to provide a better suggestion than me.

Last edited by ghostdancer; 10-17-2007 at 02:49 AM.
 
Old 10-17-2007, 02:50 AM   #6
ghostdancer
Member
 
Registered: Apr 2002
Distribution: Slackware
Posts: 266

Rep: Reputation: 30
Just curious, where did you learn about partitionable array? Any reason why you decided to go for such setup?

Last edited by ghostdancer; 10-17-2007 at 02:55 AM.
 
  


Reply

Tags
mdadm, raid, raid0


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Continuing problems with Mandriva LE2007 install Clived Mandriva 2 03-13-2007 04:00 AM
Grub software raid problems syamajala Linux - Distributions 7 01-07-2005 08:10 PM
Gentoo software raid boot problems MaDDeePee Linux From Scratch 1 08-28-2004 11:57 AM
Software RAID with mdadm problems... robbow52 Debian 2 04-19-2004 08:06 PM
Software RAID & Installation Problems Dr_Cooke Linux - General 1 09-19-2003 12:35 PM


All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration