Jump to content

passthrough unmounted linux_raid_member to Ubuntu VM


Go to solution Solved by ghost82,

Recommended Posts

Hi,

My parents IX4-300d NAS died and I'm trying to recover data from it through my unraid NAS. I only have a macbook so I can't really connect it to something else. The drive is recognized but unmountable due to linux_raid_member. Now I've read the forums and a VM with Ubuntu. So I installed Ubuntu on a VM but I can't seem to figure out how to passthrough the unmounted disk to the VM. I read something about using the ata-id method and tried to find a spaceinvaderone video containing this method but I can't seem to find it. I've attached a screenshot of the unassigned disks. Can someone help me out?Screenshot-2023-04-29-at-11-48-53.png

Link to comment

I would suggest to not do things directly on that hd, because you can do things wrong and damage it more as far as data recovery.

I would suggest to clone 1:1 that disk to an img file, then use that img to do what you want. In real I would backup also the img file, so to be able to start over again if something goes wrong with the original img.

You can use 'dd' command for cloning; obviously if you are cloning a 2TB hd you need at least 2TB of free space in the target disk.

--

Look also at this:
https://serverfault.com/questions/383362/mount-unknown-filesystem-type-linux-raid-member

 

and see if with the solution you are able to directly mount the hd on md0 without any need of a vm.

Edited by ghost82
Link to comment
15 hours ago, ghost82 said:

see if with the solution you are able to directly mount the hd on md0 without any need of a vm.

I could be wrong, but I think since Unraid changes the md driver you have to use a VM.

 

Other than that, I agree 100%, make a raw image, and play with that rather than the real drive.

  • Like 1
Link to comment
  • Solution

In unassigned device set the 'Pass Through' switch to on for that drive.

Navigate with the terminal to /dev/disk/by-id/

List the content with ls command and identify the drive:

1908702554_Senzanome.png.67388845d68492ef98ecd5a933b4d423.png

 

You can see I have 3 disks starting with ata-; first disk has 2 partitions, the other 2 have one partition.

The id of interest is that without -partX suffix, for example:
ata-Hitachi_HTS542525K9SA00_080713BB2F10WDETGEEA

ata-WDC_WD20EZRX-00DC0B0_WD-WCC300035617

ata-WDC_WD60EZRX-00MVLB1_WD-WX21D74532LF

 

It could be that when you list the content the ids could have '@' at the end of the file name, ignore it.

 

Go to your linux vm xml and add a new block for the drive, inside <devices></devices> for example:

    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source dev='/dev/disk/by-id/XXXXXXXXXXX'/>
      <backingStore/>
      <target dev='hdd' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>

 

Replace XXXXXXXX with the correct id, i.e. ata-Hitachi_HTS542525K9SA00_080713BB2F10WDETGEEA

This will attach the disk to the default emulated sata controller of the linux vm.

Edited by ghost82
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...