Given a single raid1 drive in degraded/rebuilding state, can it be force mounted? I'd like to recover all the files before undertaking the dangerous operation of pairing it and rebuilding. As far as I can tell the drive is in perfectly good shape, fully intact. The pair drive is partly failed.
If the drive was not in rebuilding state I'd know exactly what to do. Here is what I have tried:
# mdadm --verbose --assemble /dev/md8 /dev/sdb1 --force mdadm: looking for devices for /dev/md8 mdadm: /dev/sdb1 is identified as a member of /dev/md8, slot 1. mdadm: no uptodate device for slot 0 of /dev/md8 mdadm: added /dev/sdb1 to /dev/md8 as 1 mdadm: /dev/md8 assembled from 0 drives and 1 rebuilding - not enough to start the array. # cat /proc/mdstat md8 : inactive sdb1(S) 976759808 blocks super 1.2 md0 : active raid1 sdc1 976759672 blocks super 1.2 [2/1] [U_] # mdadm --stop /dev/md8 mdadm: stopped /dev/md8 # mount /dev/sdb1 /mnt/temp2 mount: unknown filesystem type 'linux_raid_member' # mount -o ro -t ext3 -b 2048 /dev/sdb1 /mnt/temp1 mount: wrong fs type, bad option, bad superblock on /dev/sdb1. # foremost -i /dev/sdb -o /tmp/foo (this results in perfectly good files)
In this particular case the
foremost command recovers files, so something is definitely on the drive, if I could only get the superblock offset correct.
And in this particular case assembling both halves of the array crashes the kernel(!), so that's not a real option anyway (aside from the safety issues).
UPDATE: added output of mdadm
# mdadm --examine /dev/sdb1 /dev/sdb1: Magic : a92b4efc Version : 1.2 Feature Map : 0x2 Array UUID : e00a291e:016bbe47:09526c90:3be48df3 Name : ubuntu:0 Creation Time : Wed May 11 12:26:39 2011 Raid Level : raid1 Raid Devices : 2 Avail Dev Size : 1953519616 (931.51 GiB 1000.20 GB) Array Size : 1953519344 (931.51 GiB 1000.20 GB) Used Dev Size : 1953519344 (931.51 GiB 1000.20 GB) Data Offset : 2048 sectors Super Offset : 8 sectors Recovery Offset : 0 sectors State : clean Device UUID : 41346f44:ccacbbf7:0c17c133:eb7b341f Update Time : Sat Apr 13 00:02:08 2013 Checksum : 483a0a44 - correct Events : 402833 Device Role : Active device 1 Array State : AA ('A' == active, '.' == missing)