• November 01, 2024, 07:43:58 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: RAID data recovery procedure on Linux  (Read 5889 times)

ironcyborg

  • Level 1 Member
  • *
  • Posts: 3
RAID data recovery procedure on Linux
« on: June 23, 2013, 09:43:26 AM »

I'd like to share the procedure I used on Ubuntu 12.04 and ArchLinux to access data from a disk of a degraded RAID 1 created with a D-Link DNS-320L NAS.

The graphical way is really simple: you just need to
- install the mdadm package
   (sudo apt-get install mdadm on Ubuntu and Debian, sudo pacman -S mdadm on Arch)
- restart the PC
- connect the disk via SATA or USB dock
- three partitions show up on the file manager: the biggest one is the partition that contains your data.

The command-line procedure is a little more complicated:
- install the mdadm package
   (sudo apt-get install mdadm on Ubuntu and Debian, sudo pacman -S mdadm on Arch)
- connect the disk via SATA or USB dock
- run lsblk to find the partition that contains your data and write it down (e.g. sde2)
- use mdadm to assemble the RAID: sudo mdadm --assemble --run /dev/md0 /dev/[YOUR PARTITION]
- create a new mount directory for you disk: sudo mkdir /media/raiddisk
- mount you disk: sudo mount /dev/md0 /mnt/raiddisk
- now your data is accessible and mounted in /mnt/raiddisk
before removing your disk, remember to:
- unmount the disk: sudo umount /mnt/raiddisk
- unmount the RAID: sudo umount /dev/sd0
- stop the RAID: sudo mdadm -S /dev/md0
« Last Edit: June 27, 2013, 07:09:09 AM by ironcyborg »
Logged