Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

So I formatted both disks sd[cd], each as a big ext4 partition, and then used mdadm to create a raid0 array sd[cd]1. This worked fine, and I mounted the device and started storing data on it. Prior to this I tried to use sd[cd] without first partitioning them in a raid array, but I could not get this to work and deleted the array - or so I thought.)

When I rebooted the raid array failed check disk and won't mount (but the disks (ssds) are brand new and I ran badblocks over them and found no physical errors.)

The array also seems configured wrong, like it wants to use sd[cd] devices themselves and not the sd[cd]1 partitions that I set it up with. When I check mdstat I have no idea what md127 is, maybe it's the "real" raid configuration that was working before?

I would like to recover the data on the disks, I'm sure it's all still there. And I'd like to raid0 them again but without running into this problem again.

cat /proc/mdstat

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md127 : inactive md0[0](S)
      117218776 blocks super 1.2

md0 : active raid0 sdc[0] sdd[1]
      234438656 blocks super 1.2 512k chunks

unused devices: <none>

dmsg

[   18.347571] md: bind<sdd>
[   18.349296] md: bind<sdc>
[   18.350345] bio: create slab <bio-1> at 1
[   18.350350] md/raid0:md0: md_size is 468877312 sectors.
[   18.350351] md: RAID0 configuration for md0 - 1 zone
[   18.350352] md: zone0=[sdc/sdd]
[   18.350354]       zone-offset=         0KB, device-offset=         0KB, size= 234438656KB
[   18.350354] 
[   18.350359] md0: detected capacity change from 0 to 240065183744
[   18.351480]  md0: unknown partition table
[   18.358626] md: bind<md0>

fdisk -l

Disk /dev/sdc: 120.0 GB, 120034123776 bytes
30 heads, 16 sectors/track, 488420 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa57656d5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048   234441647   117219800   83  Linux

Disk /dev/sdd: 120.0 GB, 120034123776 bytes
30 heads, 16 sectors/track, 488420 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe34daa29

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1            2048   234441647   117219800   83  Linux

Disk /dev/md0: 240.1 GB, 240065183744 bytes
2 heads, 4 sectors/track, 58609664 cylinders, total 468877312 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table
share|improve this question
    
Wait. You used striping (raid0) and formatted both drives individually but didn't format them after creating the multi-disk device? Your steps sound more like you wanted mirroring (raid1) but set it up for striping. I think recovery will be difficult at best. –  0xC0000022L May 19 '12 at 16:02
    
I think I must have formatted the actual raid device after striping them (I seem to recall doing that.) At any rate the raided device worked great and was the right size (both disks added together) until I rebooted, so I'm sure the drives are formatted right and the data is still on there. –  Eloff May 19 '12 at 17:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.