mdadm - moving raid 1 from one machine to another

If none of the more specific forums is the right place to ask
Post Reply
Message
Author
PlunderingPirate9000
Posts: 31
Joined: 2017-11-30 15:17

mdadm - moving raid 1 from one machine to another

#1 Post by PlunderingPirate9000 »

Hi, I'm wondering if you can help me with an issue I'm having with a raid 1 mdadm array.

I attempted to move this array to another (also debian machine) - plugged the SSD pair into a controller, and booted the system.

After the system had booted the drives would not assemble with mdadm --assemble --scan. I opened gparted to take a look at the drives and they appeared as "blank" (unallocated) drives.

I then put them back in the original system to see if they would boot up as normal there - no luck.

Tried mdadm --misc --examine, the two relevant disks sdg/sdh state that there is 1 partition[0] but no raid superblock / magic number.

Not 100 % sure what to do next and I really do not want to lose the data on these disks - so I'm hoping to get some expert advice so I don't break something irreversibly. Cheers

p.H
Posts: 1891
Joined: 2017-09-17 07:12

Re: mdadm - moving raid 1 from one machine to another

#2 Post by p.H »

Is this related with your previous topic RAID superblocks being wiped on reboot ?
You know how to print the partition tables and metadata signatures on drives and partitions with commands such as

Code: Select all

fdisk -l <drive>
file -skL <drive or partition>
blkid <drive or partition>
wipefs <drive or partition>
mdadm --examine <drive or partition>
PS: you should not reply to spam but only report it so that a moderator can delete it. Now the spam is in your reply.

PlunderingPirate9000
Posts: 31
Joined: 2017-11-30 15:17

Re: mdadm - moving raid 1 from one machine to another

#3 Post by PlunderingPirate9000 »

Solution: (may only work under certain circumstances)

Code: Select all

sudo mdadm --create --verbose --force /dev/md0 --level=1 --raid-devices=1 /dev/sdg

p.H
Posts: 1891
Joined: 2017-09-17 07:12

Re: mdadm - moving raid 1 from one machine to another

#4 Post by p.H »

How is that a solution ?
It creates a new array using only one drive, i.e. without any redundancy.

Post Reply