about RAID
hi i was trying to create RAID but i got some problem.
i have created /dev/md0 sucessfuly but when i m going to config th /dev/md1 i got error i have marked as RED color. pls tell me what sould i do i have write the all procedure which i have done. thanku [root@priyank ~]# fdisk -l Disk /dev/sda: 10.4 GB, 10415295488 bytes 255 heads, 63 sectors/track, 1266 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 1135 9116856 83 Linux /dev/sda2 1136 1260 1004062+ 5 Extended [root@priyank ~]# fdisk /dev/sda The number of cylinders for this disk is set to 1266. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): n Command action l logical (5 or over) p primary partition (1-4) l First cylinder (1136-1260, default 1136): Using default value 1136 Last cylinder or +size or +sizeM or +sizeK (1136-1260, default 1260): +100M Command (m for help): n Command action l logical (5 or over) p primary partition (1-4) l First cylinder (1149-1260, default 1149): Using default value 1149 Last cylinder or +size or +sizeM or +sizeK (1149-1260, default 1260): +100M Command (m for help): n Command action l logical (5 or over) p primary partition (1-4) l First cylinder (1162-1260, default 1162): Using default value 1162 Last cylinder or +size or +sizeM or +sizeK (1162-1260, default 1260): +100M Command (m for help): p Disk /dev/sda: 10.4 GB, 10415295488 bytes 255 heads, 63 sectors/track, 1266 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 1135 9116856 83 Linux /dev/sda2 1136 1260 1004062+ 5 Extended /dev/sda5 1136 1148 104391 83 Linux /dev/sda6 1149 1161 104391 83 Linux /dev/sda7 1162 1174 104391 83 Linux Command (m for help): n Command action l logical (5 or over) p primary partition (1-4) l First cylinder (1175-1260, default 1175): Using default value 1175 Last cylinder or +size or +sizeM or +sizeK (1175-1260, default 1260): +100M Command (m for help): p Disk /dev/sda: 10.4 GB, 10415295488 bytes 255 heads, 63 sectors/track, 1266 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 1135 9116856 83 Linux /dev/sda2 1136 1260 1004062+ 5 Extended /dev/sda5 1136 1148 104391 83 Linux /dev/sda6 1149 1161 104391 83 Linux /dev/sda7 1162 1174 104391 83 Linux /dev/sda8 1175 1187 104391 83 Linux Command (m for help): t Partition number (1-8): 8 Hex code (type L to list codes): fd Changed system type of partition 8 to fd (Linux raid autodetect) Command (m for help): t Partition number (1-8): 7 Hex code (type L to list codes): fd Changed system type of partition 7 to fd (Linux raid autodetect) Command (m for help): t Partition number (1-8): 6 Hex code (type L to list codes): fd Changed system type of partition 6 to fd (Linux raid autodetect) Command (m for help): t Partition number (1-8): 5 Hex code (type L to list codes): fd Changed system type of partition 5 to fd (Linux raid autodetect) Command (m for help): wq The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks. [root@priyank ~]# partprobe [root@priyank ~]# mdadm -C /dev/md0 -l 1 -n 2 /dev/sda5 /dev/sda6 mdadm: array /dev/md0 started. [root@priyank ~]# mdadm -C /dev/md1 -l 1 -n 2 /dev/sda7 /dev/sda8 mdadm: error opening /dev/md1: No such file or directory [root@priyank ~]# fdisk -l Disk /dev/sda: 10.4 GB, 10415295488 bytes 255 heads, 63 sectors/track, 1266 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 1135 9116856 83 Linux /dev/sda2 1136 1260 1004062+ 5 Extended /dev/sda5 1136 1148 104391 fd Linux raid autodetect /dev/sda6 1149 1161 104391 fd Linux raid autodetect /dev/sda7 1162 1174 104391 fd Linux raid autodetect /dev/sda8 1175 1187 104391 fd Linux raid autodetect Disk /dev/md0: 106 MB, 106823680 bytes 2 heads, 4 sectors/track, 26080 cylinders Units = cylinders of 8 * 512 = 4096 bytes Disk /dev/md0 doesn't contain a valid partition table [root@priyank ~]# |
Can I start with Why?
RAIDing two partitions on the same device is a really, really bad idea. It certainly won't make your disk faster because the same physical heads have to seek back and forth across the surface for the two partitions. True, if you mirror the partitions then you get your data in two places, but on the same physical disk. Nearly all disk failures wipe out the entire drive however, so your gain in data security is negligible. I suspect that the increased hard drive wear and tear from all the seeks will shorten it's life and increase the risk of failure a by a lot more than the gain in data integrity. The actual problem is I suspect with the message: Quote:
|
raid errors
I'll second the remarks about the overall concept of RAID on one disk with multiple partitions. But I'll assume you're doing it for education and experience and have only one disk.
Having said that, you didn't say what distro you were using; some don't have /dev/md1 already made as a device, only /dev/md0. Your first error: Quote:
The second error Quote:
|
i ll try this guys and let u know.
i m using RHEL5. thanks for ur reply |
hi
sorry for long time
mostlyharmless can u write full CMD for me pls thank you |
hi
i don't know whether this is beneficial for u. but for my clarification i would like to ask some questions. for /dev/md0 --> have u formatted /dev/md0 with ext3 file system. if not format with mkfs command and then mount it. for /dev/md1 --> if driver is not present , then create with mknod comand. for mknod command following link is useful. check it. http://www.faqs.org/docs/linux_admin/x797.html |
Richardash is correct. Just reboot and repeat the create process.
mdadm should create /dev/md1 for you when you create it again after the reboot. The error: Disk /dev/md0 doesn't contain a valid partition table Is normal. You can't partition RAID devices directly. If you have a need to, pass it through LVM. Hope this helps. |
mknod /dev/md1 XXX 1 b
where XXX is the major associated with md devices; use the same one you get with ls -l /dev/md0 |
All times are GMT -5. The time now is 10:15 PM. |