Tripwire Posted April 29, 2023 Share Posted April 29, 2023 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? Quote Link to comment
ghost82 Posted April 29, 2023 Share Posted April 29, 2023 (edited) 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 April 29, 2023 by ghost82 Quote Link to comment
JonathanM Posted April 30, 2023 Share Posted April 30, 2023 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. 1 Quote Link to comment
Tripwire Posted April 30, 2023 Author Share Posted April 30, 2023 (edited) I don’t have the space for an image unfortunately, so how do I passthrough the drive to my Ubuntu VM? Edited April 30, 2023 by Tripwire Quote Link to comment
Solution ghost82 Posted April 30, 2023 Solution Share Posted April 30, 2023 (edited) 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: 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 April 30, 2023 by ghost82 Quote Link to comment
Tripwire Posted May 1, 2023 Author Share Posted May 1, 2023 @ghost82 Thanks for the reply! In the end I ended up running Ubuntu from a USB drive and got the data from the drive through that but this works awesome as well. 1 Quote Link to comment
Recommended Posts
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.