4x2TB drives in software RAID5 in Debian Lenny
Hi,
I'm about to hang myself... :-( My goal is the following: Software RAID 5 on 4 2TB caviar green disks. Then 12 partitions or about 500GB, and finally LVM to use the partitions as pv, and create some vg for my needs. My disks are /dev/sda to /dev/sdd I boot on /dev/sde which is an sd card My doing (and at the end, my issue): Code:
(parted) select /dev/sda Code:
mdadm --create /dev/md0 --verbose --chunk=256 --level=5 --raid-devices=4 /dev/sda /dev/sdb /dev/sdc /dev/sdd Code:
mdadm: layout defaults to left-symmetric anyhow, mdadm --detail /dev/md0 returns: Code:
/dev/md0: Therefore, I try now to partition /dev/md0: 1st thing's 1st, when I go into parted /dev/md0 I get the following question: Code:
GNU Parted 1.8.8 Code:
Warning: Not all of the space available to /dev/md0 appears to be used, you can fix the Now a print gives me: Code:
Model: Unknown (unknown) Code:
mkpart part1 0 500GB Code:
Error: Error informing the kernel about modifications to partition /dev/md0p1 -- Invalid For the example, I just made one. After reboot, cat /proc/partitions returns: Code:
cat /proc/partitions |
Dont you have to create partitions on your disk and give them "fd" as type?
Just try to create a partition on each disk (I always use fdisk for this). Then use the same mdadm command with /dev/sda1 , ... (or whatever they are called) |
Tx for your reply.
I tried this as well. No success. I tried to make label as GPT on the disks (then you need parted), and I tried to make label as msdos. I tried to make RAID type partitions, I tried everything I can think of... What is surprising is that it seems that you cannot create partition over an md drive. I have installed ubuntu 10.4 for now, and tried to make the same configuration from the graphic interface from ubuntu. And it just doesn't let me partition the md device. Googleling a bit more today, I found that indeed you cannot partition a software RAID device... You can only create a single volume, use it as pv for LVM, and then make a vg and create volumes over it. Which in fact leads to the same result as I wanted. But I didn't realized :-) I wished I had found this info about the fact you can't partition an md volume. I would not have wasted so much time trying ... The bad side is that neither parted nor fdisk nor cfdisk tells you you can't ! They make you believe it's working... But the device nodes are not created, and when you reboot it's all crappy ^^ |
create the mdadm RAID array as partitionable
add this to your mdadm create line:
--auto=p7 that will get you a partitionable raid array with 7 partitions. see the mdadm man page for more detail on this option |
All times are GMT -5. The time now is 03:33 AM. |