LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-29-2022, 10:50 PM   #1
rsterling
LQ Newbie
 
Registered: Dec 2022
Posts: 1

Rep: Reputation: 0
Recovering File Structure & Files From a Single Drive From a RAID 1 Array


Hi everyone,

I'm new here and would love some assistance on how I can data from a single drive that was forwarded to me which was once part of a hardware RAID 1 array in a Dell server running under a PERC H330. I have to recover data from this drive as quickly as possible.

The drive is a SATA SSD and I added it to my mobo SATA and attempted to mount it but I'm unable to do so.

What are my my best options for being able to be able to recover the data on the drive? Thanks in advance for your consideration and help.
 
Old 12-30-2022, 09:05 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,347

Rep: Reputation: Disabled
My first advice would be to create an image of the drive using dd, and not do any recovery work on the actual drive itself.

A RAID 1 volume is generally just a regular drive with a RAID metadata block somewhere, typically at the beginning of the drive. You should be able to access the partitions on the disk by skipping the metadata part.

The easiest way to do this is to create a loopback device with losetup, skipping the appropriate number of blocks/bytes to go past the RAID metadata:
Code:
losetup -o <bytes_to_skip> -P --show -f <device_or_image_file>
The newly created loopback device will then contain the entire structure of the drive, minus the RAID metadata.

The -P parameter makes losetup initiate a partition scan of the newly created loopback device, -f makes losetup use the first available loopback device, and --show prints the name of that device so you don't have to do any detective work afterwards.

That leaves the all-important -o <bytes_to_skip> parameter. You will need to know the exact size of the metadata block in order to skip past it. You could either try looking this up on the Internet (the PERC H330 appears to be a rebranded LSI/Broadcom/Avago 9340-8i), or you could try searching the device for a valid partition table.

On the other hand, if you don't mind destroying the metadata (which is fine as long as you're working on an image file), you could use testdisk to search for valid partitions and create a new partition table at the start of the drive/image. You could then run losetup without the -o parameter.

Last edited by Ser Olmy; 12-30-2022 at 09:10 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to unmount raid array or unable to stop raid array karthik-naren Linux - Newbie 3 07-09-2013 01:54 PM
copy single hard drive install to a raid 0 array pepsimachine15 Linux - Software 52 09-17-2008 03:46 PM
Recovering a Raid 5 array, mdadm mess-up somebox Linux - Server 4 10-17-2007 06:57 PM
recovering from a dead raid 5 array aaronj Linux - Software 2 06-03-2005 04:13 AM
Recovering RAID-5 array after OS crash IMNOboist Linux - Hardware 0 12-14-2004 12:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration