PDA

View Full Version : RAID 5 - mdadm


jscheponik
2008-06-08, 06:30 PM CDT
I've created a RAID 5 array but am unable to mount the /dev/md0

Here is all the info i can think of that you would need. I made all 3 drives ext3.

[j@localhost ~]$ cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sdd[2] sdc[1] sda[0]
312581632 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]

unused devices: <none>

[root@localhost j]# /sbin/parted
GNU Parted 1.8.6
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print all
Model: ATA WDC WD1600AAJS-0 (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 160GB 160GB ext3


Model: ATA WDC WD800JD-75MS (scsi)
Disk /dev/sdb: 80.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 206MB 206MB primary ext3 boot
2 206MB 80.0GB 79.8GB primary lvm


Model: ATA WDC WD1600AAJS-0 (scsi)
Disk /dev/sdc: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 160GB 160GB ext3


Error: Unable to open /dev/sdd - unrecognised disk label.

Error: Error opening /dev/sde: No such file or directory
Retry/Cancel? c

Model: Unknown (unknown)
Disk /dev/md0: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 320GB 320GB ext3


Warning: Unable to open /dev/fd0 read-write (Read-only file system). /dev/fd0 has been opened read-only.

[root@localhost j]# mount -t ext3 /dev/md0 /mnt/Data
mount: wrong fs type, bad option, bad superblock on /dev/md0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

[root@localhost j]#

Any help would be greatly appreciated. This RAID drive will be data only drive and it has no data now so a wipe and stuff would be more than fine. I also have an Adaptec 1430SA RAID controller card that i was unable to get working which is why i'm trying with mdadm. Thank in advance for any help.

PilotJLR
2008-06-08, 07:07 PM CDT
How about the output of this?

mdadm --detail /dev/md0


Did you format /dev/md0, or the individual disks?? If the array itself is good (see previous command), then you only need to make a filesystem on the array itself, like so:

mke2fs -j /dev/md0

jscheponik
2008-06-08, 09:55 PM CDT
[root@localhost j]# /sbin/mdadm --detail /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Sun Jun 8 18:25:19 2008
Raid Level : raid5
Array Size : 312581632 (298.10 GiB 320.08 GB)
Used Dev Size : 156290816 (149.05 GiB 160.04 GB)
Raid Devices : 3
Total Devices : 3
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Sun Jun 8 23:52:15 2008
State : active
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 64K

UUID : b206cb76:6cb89f95:d51dfcf5:2633de95
Events : 0.5

Number Major Minor RaidDevice State
0 8 0 0 active sync /dev/sda
1 8 32 1 active sync /dev/sdc
2 8 48 2 active sync /dev/sdd
[root@localhost j]#

But the mkfs did the trick, thanks you very much! One question though is how do i rename the volume from 291.8 GB Volume ?

jscheponik
2008-06-12, 12:14 PM CDT
[root@localhost j]# /sbin/mdadm --detail /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Sun Jun 8 18:25:19 2008
Raid Level : raid5
Array Size : 312581632 (298.10 GiB 320.08 GB)
Used Dev Size : 156290816 (149.05 GiB 160.04 GB)
Raid Devices : 3
Total Devices : 3
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Sun Jun 8 23:52:15 2008
State : active
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 64K

UUID : b206cb76:6cb89f95:d51dfcf5:2633de95
Events : 0.5

Number Major Minor RaidDevice State
0 8 0 0 active sync /dev/sda
1 8 32 1 active sync /dev/sdc
2 8 48 2 active sync /dev/sdd
[root@localhost j]#

But the mkfs did the trick, thanks you very much! One question though is how do i rename the volume from 291.8 GB Volume ?
For some reason, my RAID drive doesnt come back online when the machine is rebooted. The drives show that the disks are part of the array but /dev/md0 doesnt exist. What might I be missing?