LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Why can't I create a RAID array? (http://www.linuxquestions.org/questions/linux-newbie-8/why-cant-i-create-a-raid-array-4175420389/)

fireball1974 08-04-2012 06:04 PM

Why can't I create a RAID array?
 
I am trying to create a Linux software RAID array on Debian Squeeze. First I created the following partitions:

/dev/sdc2
/dev/sdd2

Both are formatted as FD (Linux RAID autodetect).
Now I try using mdadm to create a level-1 RAID array:

# mdadm --verbose --create /dev/md2 --level=1 --raid-devices=2 /dev/sdc2 /dev/sdd2

I get the following error messages:

mdadm: super1.x cannot open /dev/sdc2: No such file or directory
mdadm: ddf: Cannot open /dev/sdc2: No such file or directory
mdadm: Cannot open /dev/sdc2: No such file or directory
mdadm: device /dev/sdc2 not suitable for any style of array

What am I doing wrong?

btmiller 08-04-2012 09:06 PM

The error message seems straightforward -- /dev/sdc2 doesn't seem to exist. Have you checked in /dev to see if it, in fact, there? Depending on the partitioning tool you used and your hardware, you may need to reboot the machine to see newly created partitions.

frankbell 08-04-2012 09:07 PM

I've never done this, but, judging by the Debian wiki, you might have missed a step in creating the partitions:

http://wiki.debian.org/SoftwareRAID

fireball1974 08-05-2012 09:09 PM

Solved
 
I am not sure why, but this problem disappeared after I rebooted. Thank you for your suggestions!

chrism01 08-06-2012 07:31 PM

If you go into eg fdisk & create partitions, even when using 'w' to write the new partition table, sometimes the kernel won't see it until after a reboot.
One trick is to run the cmd partprobe http://linux.die.net/man/8/partprobe after using 'w' & exiting fdisk

fireball1974 08-06-2012 11:54 PM

Thank you! That will help me in the future.

BTW, the tool I used to create the partitions was cfdisk.

chrism01 08-07-2012 12:01 AM

Never used it, but after 'saving changes' however cfdisk does it, exit and try partprobe anyway, then list the partitions however you want, or
Code:

cat /proc/partitions


All times are GMT -5. The time now is 01:25 PM.