Howdy yall, I need some help.
I’ve got a RAID5 array that doesn’t want to automount after rebooting.
I’m pretty familiar with linux, RAID, and mdadm, and up until now, I’ve had the RAID5 array working just fine. However, whenever I reboot, the array drops off and won’t remount until I manually assemble and then mount the thing.
I find this odd because I had everything automounting just fine back in 10.3, and even in 11.0 (I think - not sure on that). Currently, things are working, but I’d really like to not not have to type
mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
followed by
mount /dev/md0 /mnt/data
every time I reboot. Even including this in some sort of start-up script seems kludgey…
Surely there must be a more elegant way of automatically bringing up a RAID5 array after booting?
I’m not sure what information you’ll need, so I’m going to go ahead and include as much as I can anticipate…
So having already used the commands:
mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
mount /dev/md0 /mnt/data
Here is the output of fdisk -l:
mediaserver:~ # fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000bdcd2
Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760001 fd Linux raid autodetect
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000277cc
Device Boot Start End Blocks Id System
/dev/sdb1 1 121601 976760001 fd Linux raid autodetect
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0008df0e
Device Boot Start End Blocks Id System
/dev/sdc1 1 121601 976760001 fd Linux raid autodetect
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0004d61d
Device Boot Start End Blocks Id System
/dev/sdd1 1 121601 976760001 fd Linux raid autodetect
Disk /dev/sde: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xbd1fbd1f
Device Boot Start End Blocks Id System
/dev/sde1 * 2 14423 115844715 83 Linux
/dev/sde2 14424 14946 4200997+ 82 Linux swap / Solaris
Disk /dev/md0: 3000.6 GB, 3000606130176 bytes
2 heads, 4 sectors/track, 732569856 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk identifier: 0x00000000
Disk /dev/md0 doesn't contain a valid partition table
Here’s my fstab:
mediaserver:~ # cat /etc/fstab
/dev/disk/by-id/ata-Maxtor_6L120P0_L3DHH96H-part2 swap swap defaults 0 0
/dev/disk/by-id/ata-Maxtor_6L120P0_L3DHH96H-part1 / ext3 acl,user_xattr 1 1
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
/dev/md0 /mnt/data xfs auto 0 0
Here’s my /etc/mdadm/mdadm.conf:
mediaserver:~ # cat /etc/mdadm/mdadm.conf
DEVICE partitions
ARRAY /dev/md0 level=raid5 num-devices=4 metadata=0.90 UUID=be8cc62f:22ec219d:c109596b:d7e29b7e
Here’s my --detail of /dev/md0:
mediaserver:~ # mdadm --detail /dev/md0
/dev/md0:
Version : 0.90
Creation Time : Wed Apr 22 22:17:49 2009
Raid Level : raid5
Array Size : 2930279424 (2794.53 GiB 3000.61 GB)
Used Dev Size : 976759808 (931.51 GiB 1000.20 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Sun Apr 26 15:23:48 2009
State : clean
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Layout : left-symmetric
Chunk Size : 256K
UUID : be8cc62f:22ec219d:c109596b:d7e29b7e (local to host mediaserver)
Events : 0.4
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
2 8 33 2 active sync /dev/sdc1
3 8 49 3 active sync /dev/sdd1
I would appreciate any suggestions or pointers you might have… I feel like whatever I’m missing is something simple…
Thanks guys,
-Todd