[Gslug-general] Linux 2.6.x SW RAID Recovery...
Jason Boerner
JasonB at Computer.Org
Mon Feb 18 10:22:40 PST 2008
Calling any file system experts and a posting for the archive when/if you
find yourself in a similar situation... I have managed to recover my RAID
1's in vitro which you may find very helpful (read down) and am back to
trying to recover the RAID 5.
1) Current situation of the RAID 5:
When attempting to mount the RAID 5 I get the following error message:
[I]# mount -s -t ext3 /dev/md1 /mnt/test
mount: wrong fs type, bad option, bad superblock on /dev/md1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so[/I]
I would like to disassemble the array (get the data back). Order three MUCH
larger drives and build a new server while keeping all my data safe.
2) Here are a couple of things that may help others in a similar situation.
First make images of your drive partitions:
dd if=/dev/<partition> of=file.img
Do the above for each partition...
After the images are made, you can mount the images through loopbacks...
losetup /dev/loop3 file.img
<Do this for each image>
mount /dev/loop3 /mnt/location
Location will now be your mounted file system from the image. The above
works GREAT on my RAID 1's... I can mount up the drive and edit/move stuff
around to my hearts content...
The RAID 5 is another issue... Any help would be greatly appreciated.
----------------------------------
# cat mdadm.conf
DEVICE /dev/hda0 /dev/hda1 /dev/hda2 /dev/hdb0 /dev/hdb1 /dev/hdb2 /dev/hdc0
/dev/hdc1 /dev/hdc2
ARRAY /dev/md0 devices=/dev/hdc1,/dev/hda1,/dev/hdb1
ARRAY /dev/md1 devices=/dev/hda3,/dev/hdc3,/dev/hdb3
ARRAY /dev/md2 devices=/dev/hdb2,/dev/hdc2,/dev/hda2
----------------------------------
# cat raidtab
# boot
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 1
persistent-superblock 1
parity-algorithm left-symmetric
chunk-size 32
device /dev/hda2
raid-disk 1
device /dev/hdc2
raid-disk 2
device /dev/hdb2
failed-disk 0
# root
raiddev /dev/md1
raid-level 5
nr-raid-disks 3
nr-spare-disks 0
persistent-superblock 1
chunk-size 32
device /dev/hda3
raid-disk 0
device /dev/hdb3
raid-disk 1
device /dev/hdc3
raid-disk 2
# swap
raiddev /dev/md2
raid-level 1
nr-raid-disks 2
nr-spare-disks 1
persistent-superblock 1
parity-algorithm left-symmetric
chunk-size 32
device /dev/hda1
raid-disk 1
device /dev/hdb1
raid-disk 2
device /dev/hdc1
failed-disk 0
Here is how the Orig. RAID arrays were built:
-------------------------------
# cat createRAID.txt
# build swap
mdadm --create /dev/md2 --chunk=32 --level=1 --raid-devices=2 /dev/hdc2
missing
mkswap /dev/md2
# build root
mdadm --create /dev/md0 --chunk=32 --level=1 --raid-devices=2 /dev/hdb1
missing
mkfs.ext3 /dev/md0
# build boot
mdadm --create /dev/md1 --chunk=32 --level=5 --raid-devices=3 /dev/hdb3
/dev/hdc3 missing
mkfs.ext3 /dev/md1
mkdir /mnt/newroot
mkdir /mnt/newboot
mount /dev/md0 /mnt/newboot
tar c /boot/* | tar xvC /mnt/newboot
mount /dev/md1 /mnt/newroot
mkdir /mnt/newroot/boot
mkdir /mnt/newroot/initrd
mkdir /mnt/newroot/mnt
mkdir /mnt/newroot/proc
tar c /dev /var /etc /bin /home /misc | tar xvC /mnt/newroot
tar c /net /sbin /srv /tmp /lib /media /opt /root /selinux /usr | tar xvC
/mnt/newroot
# Modify /mnt/newroot/etc/fstab
# Modify /mnt/newboot/grub/grub.conf
# Start grub
# root (hd0,0) setup(hd0)
# root (hd1,0) setup(hd1)
Orig. Posting
-----------------------------------
Anyone consider themselves a filesystem fanatic?
I have three 200G drives with three partitions each in a SW based RAID
(mixed RAID 1 and 5...) configuration which lost consistency during a series
of power outages in my area. Unfortunetly, my attempts to recover been
futile (so far)...
The boot sequence stops dead with a kernel panic when the "second stage" of
booting would normally begin...
Anyone willing/able to assist???
(Beer & Pizza...)
Here is how I orig. built the RAID arrays:
# cat createRAID.txt
# build swap
mdadm --create /dev/md2 --chunk=32 --level=1 --raid-devices=2 /dev/hdc2
missing
mkswap /dev/md2
# build root
mdadm --create /dev/md0 --chunk=32 --level=1 --raid-devices=2 /dev/hdb1
missing
mkfs.ext3 /dev/md0
# build boot
mdadm --create /dev/md1 --chunk=32 --level=5 --raid-devices=3 /dev/hdb3
/dev/hdc3 missing
mkfs.ext3 /dev/md1
mkdir /mnt/newroot
mkdir /mnt/newboot
mount /dev/md0 /mnt/newboot
tar c /boot/* | tar xvC /mnt/newboot
mount /dev/md1 /mnt/newroot
mkdir /mnt/newroot/boot
mkdir /mnt/newroot/initrd
mkdir /mnt/newroot/mnt
mkdir /mnt/newroot/proc
tar c /dev /var /etc /bin /home /misc | tar xvC /mnt/newroot
tar c /net /sbin /srv /tmp /lib /media /opt /root /selinux /usr | tar xvC
/mnt/newroot
# Modify /mnt/newroot/etc/fstab
# Modify /mnt/newboot/grub/grub.conf
# Start grub
# root (hd0,0) setup(hd0)
# root (hd1,0) setup(hd1)
----------------
Anyone consider themselves a filesystem fanatic?
I have three 200G drives with three partitions each in a SW based RAID
(mixed RAID 1 and 5...) configuration which lost consistency during a series
of power outages in my area. Unfortunetly, my attempts to recover been
futile (so far)...
The boot sequence stops dead with a kernel panic when the "second stage" of
booting would normally begin...
Anyone willing/able to assist???
(Beer & Pizza...)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ifokr.org/pipermail/gslug-general/attachments/20080218/b83a1ce6/attachment.html
More information about the Gslug-general
mailing list