|
Problem Assembling RAID 0 arrays during bootup
Raid 0 arrays are not assembled after reboot.
INITIAL SETUP
_______________________________
#fdisk -l
----------
Disk /dev/sda: 73.5 GB, 73543163904 bytes
255 heads, 63 sectors/track, 8941 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 33 265041 83 Linux
/dev/sda2 8805 8941 1100452+ 82 Linux swap / Solaris
/dev/sda3 34 8804 70453057+ 83 Linux
Partition table entries are not in disk order
Disk /dev/sdb: 73.4 GB, 73407868928 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
****** NOT USING /dev/sdb AT ALL ******
Created two 16 GB files on devices /dev/sda and made them iSCSI devices.
After setting up iSCSI devices
#fdisk -l
Disk /dev/sda: 73.5 GB, 73543163904 bytes
255 heads, 63 sectors/track, 8941 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 33 265041 83 Linux
/dev/sda2 8805 8941 1100452+ 82 Linux swap / Solaris
/dev/sda3 34 8804 70453057+ 83 Linux
Partition table entries are not in disk order
Disk /dev/sdb: 73.4 GB, 73407868928 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdc: 17.1 GB, 17179869184 bytes
64 heads, 32 sectors/track, 16384 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 16384 16777200 fd Linux raid autodetect
Disk /dev/sdd: 17.1 GB, 17179869184 bytes
64 heads, 32 sectors/track, 16384 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 16384 16777200 fd Linux raid autodetect
/dev/sdc and /dev/sdd are the new iSCSI devices which i created. I have one partition in each with fd option.
NOW, i am building a RAID 0 across these devices,
I used mdadm
mdadm --create /dev/md0 --level=0 --raid-devices=2 /dev/sdc1 /dev/sdd1
mkfs.ext3 /dev/md0
I partitioned it using fdisk /dev/md0
fdisk -l shows
( in addition to the previous output)
Disk /dev/md0: 34.3 GB, 34359476224 bytes
2 heads, 4 sectors/track, 8388544 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Device Boot Start End Blocks Id System
/dev/md0p1 1 62501 250002 83 Linux
/dev/md0p2 62502 8312502 33000004 83 Linux
/dev/md0p3 8312503 8388544 304168 83 Linux
______________________
NOTE: just FYI
when i try to do
#mkfs.ext3 /dev/md0p1
mke2fs 1.39 (29-May-2006)
Could not stat /dev/md0p1 --- No such file or directory
The device apparently does not exist; did you specify it correctly?
_________
I updated /etc/mdadm.conf
mdadm -E -s
mdadm: metadata format 00.90 unknown, ignored.
ARRAY /dev/md0 level=raid0 num-devices=2 UUID=85fc3c30:a57a2999:39b3f74a:bbe7a877
mdadm --detail /dev/md0
mdadm: metadata format 00.90 unknown, ignored.
/dev/md0:
Version : 00.90
Creation Time : Fri Oct 31 10:06:51 2008
Raid Level : raid0
Array Size : 33554176 (32.00 GiB 34.36 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Fri Oct 31 10:06:51 2008
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Chunk Size : 64K
UUID : 85fc3c30:a57a2999:39b3f74a:bbe7a877
Events : 0.1
Number Major Minor RaidDevice State
0 8 33 0 active sync /dev/sdc1
1 8 49 1 active sync /dev/sdd1
HOWEVER,
After i reboot the machine,
the arrays are not assembled, and when i do fdisk -l, i cannot see disk /dev/md0
I tried putting command mdadm -A -s in /etc/rc.local but of no use.
Can someone please explain me how /dev/md0 shows up when i reboot the machine ?
Thanks
|