Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mounting RAID1 Disks and "recover" its data
#1
Last week our Thecus NAS N2200EVO decided tha it will be funny to lose its RAID. We didn't agree.

So I took one of the disks an connected to a PC to see what can I do.

I booted with an Ubuntu live, then opened a terminal.

Give yourself superpowers

Code:
sudo su

Install mdadm to manage software (!) RAIDs

Code:
apt-get install mdadm

Now, list your disks and see what's the RAID one

Code:
lsblk

When you see your disk, then you need to assemble the RAID. It will assemble as a degraded RAID. It's normal, since it has only one disk.

Code:
mdadm -A /dev/md0 /dev/sdxn
(x is a letter and n is a number, from the previous command)

If everything goes OK, we'll have a new device: /dev/vg0/lv0 because Thceus uses LVM over the RAID.

You can try mounting this, and if you're lucky, you're donde and can recover all your data.

Code:
mount /dev/vg0/lv0 /media/myfolder

But most commonly, you'll get an I/O error when trying to list its content. Unmount your disk

Code:
umount /media/myfolder

Now, check the partition

Code:
xfs_repair /dev/vg0/lv0

You probably will get an error message saying the log is dirty and can't continue unless you kill the log. Well, let's go. Kill (Zero) the log:

Code:
xfs_repair -L /dev/vg0/lv0

After a while, and if you're lucky enough, you'll get all your data back.

Now you can backup your data.

If the disk you took from your NAS is the masterone, you're done. If not, you'll need to repeat the process in the other disk and rebuild the RAID. I do not recommend interchanging disks in the RAID.

If your RAID 1 is composed of more than 2 disks, [url="http://linux.die.net/man/8/mdadm"]then you'll need assemble at least one "side" of the RAID[/url].

Hope this helps Smile
Reply
#2
Last week our Thecus NAS N2200EVO decided tha it will be funny to lose its RAID. We didn't agree.

So I took one of the disks an connected to a PC to see what can I do.

I booted with an Ubuntu live, then opened a terminal.

Give yourself superpowers

Code:
sudo su

Install mdadm to manage software (!) RAIDs

Code:
apt-get install mdadm

Now, list your disks and see what's the RAID one

Code:
lsblk

When you see your disk, then you need to assemble the RAID. It will assemble as a degraded RAID. It's normal, since it has only one disk.

Code:
mdadm -A /dev/md0 /dev/sdxn
(x is a letter and n is a number, from the previous command)

If everything goes OK, we'll have a new device: /dev/vg0/lv0 because Thceus uses LVM over the RAID.

You can try mounting this, and if you're lucky, you're donde and can recover all your data.

Code:
mount /dev/vg0/lv0 /media/myfolder

But most commonly, you'll get an I/O error when trying to list its content. Unmount your disk

Code:
umount /media/myfolder

Now, check the partition

Code:
xfs_repair /dev/vg0/lv0

You probably will get an error message saying the log is dirty and can't continue unless you kill the log. Well, let's go. Kill (Zero) the log:

Code:
xfs_repair -L /dev/vg0/lv0

After a while, and if you're lucky enough, you'll get all your data back.

Now you can backup your data.

If the disk you took from your NAS is the masterone, you're done. If not, you'll need to repeat the process in the other disk and rebuild the RAID. I do not recommend interchanging disks in the RAID.

If your RAID 1 is composed of more than 2 disks, [url="http://linux.die.net/man/8/mdadm"]then you'll need assemble at least one "side" of the RAID[/url].

Hope this helps Smile
Reply
#3
Hi Wardog,

Really appreciate the tip! Wink

Thanks a lot!
John, June 4 '14
Reply
#4
Hi Wardog,

Really appreciate the tip! Wink

Thanks a lot!
John, June 4 '14
Reply
#5
Thank you very much for the info! Helped alot! 8-)
Reply
#6
Thank you very much for the info! Helped alot! 8-)
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Mounting RAID1 Disks and "recover" its data 0 1,169 Less than 1 minute ago
Last Post:

Forum Jump:


Users browsing this thread: 1 Guest(s)