Linux Software RAID nightmare, help please.

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Personally, I use Webmin to do all my Raid configuration, if it's not the install drive.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Usually you don't partition software RAID devices, just format /dev/md0 and use that directly.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
I donno. Something goofy is going on.

go:

ls -l /dev/sd*
ls -l /dev/md0*


What is the contents of /etc/mdadm/mdadm.conf ?

What do you have in /proc/mdstat

(and nocs right. Generally you want to use md0 directly. If you want volumes it's better to use lvm usually.)
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I did not manually partition the RAID, when I did a fdisk -l right after the Ubuntu installation it already had a /dev/md0p1 partition. I tried to format that but it didn't work so I just formatted /dev/md0 instead.

Interesting, I thought you had to do something special to make md devices partitionable, either that's not true anymore or Ubuntu patches their kernel for that.

After the format the partition disappeared and it just said there wasn't a partition on the drive. Is that what's supposed to happen? I think I got confused by that and started messing with the partition.

Yea, you overwrote the device's partition table with a filesystem.

The mdadm --examine /dev/sda worried me because it listed /dev/sda as one of the drives. I think it's supposed to list the partition which should be /dev/sda1 as it did with the other drives.

You can do either, you don't have to use partitions if you don't want to as md will happily use the whole device (i.e. /dev/sda).
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
if you partition the drives your using in the array and use those partitions to build the raid array its suppose to offer slightly better performance then if you just use the entire drive without partitions. I don't understand why this is so, something to do with how sectors line up with file system stuff.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
if you partition the drives your using in the array and use those partitions to build the raid array its suppose to offer slightly better performance then if you just use the entire drive without partitions. I don't understand why this is so, something to do with how sectors line up with file system stuff.

That seems extremely unlikely, the data will only be off by 512b if you use the whole device and since hard disk sectors are 512b (in most cases) the alignment will be exactly the same.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Why is that the case? Does it work differently for Linux than Windows? I thought you had to partition a drive first and then format it?

Because /dev/sda is the entire device, including the partition table. Yes, unlike in Windows you can put a filesystem on the entire device without partitioning it.