Assemble RAID on new machine but with missing devices
Hello,
I red some stuff about assembling mode for mdadm. But two points are unclear for me.
1. Missing devices
I have two HDDs in a RAID1 - only data, no OS, on them. I want to physical remove one HDD and plug it into a new server machine. Then I want to bring the RAID1 online again on the new machine but with one existing and one missing drive.
Background: When finished I will plug in a new fresh HDD as the second one to the new server.
2. mdadm.conf
On the web I read sometimes about modifying mdadm.conf on the new machine. But I do not understand why. If so. Why and what do I have to modify in the mdadm.conf?
Kind
Christian
Quoted 5 lines · On 27/11/2020 23:10, [email protected] wrote:
Hello,
I red some stuff about assembling mode for mdadm. But two points are unclear for me.
Quoted 7 lines
1. Missing devices
I have two HDDs in a RAID1 - only data, no OS, on them. I want to physical remove one HDD and plug it into a new server machine. Then I want to bring the RAID1 online again on the new machine but with one existing and one missing drive.
Background: When finished I will plug in a new fresh HDD as the second one to the new server.
It's fairly certain that the array will - initially - refuse to run. That's a safety feature - if an array is damaged while shut down, it won't come back without intervention.
Put the single disk in your new system. As I say, it's unlikely it'll start straight away. "cat /proc/mdstat" and if the array is there in a failed state, stop it. Then you can re-assemble it and it should come up degraded. All you have to do after that is replace the non-existent drive with your new replacement, and you'll have a functioning array.
Quoted 6 lines
2. mdadm.conf
On the web I read sometimes about modifying mdadm.conf on the new machine. But I do not understand why. If so. Why and what do I have to modify in the mdadm.conf?
If you've even got one ...
I don't know the history of it, but the early arrays did not have superblocks, so mdadm.conf - an ACCURATE - mdadm.conf was essential. Now they've got superblocks, it's optional and - to the best of my knowledge - none of my systems have mdadm.conf's.
Do you have a superblock? Preferably v1 (1.0, 1.1 or 1.2). If you do, don't worry about it, it's old advice, and while it's good to have an up-to-date mdadm.conf to tell *you* what's what, the system doesn't need it.
Cheers,
Wol
Quoted 2 lines · c.buhtz
Then I want to bring the RAID1 online again on the new machine but with one existing and one missing drive.
As example, after creating and then stopping md8 I restarted it with only one of the members. Mdadm told me how to force it...
[root@wombat looptesting]# mdadm --assemble /dev/md8 /dev/loop1
mdadm: /dev/md8 assembled from 1 drive - need all 2 to start it (use -- run to insist).
[root@wombat looptesting]# mdadm --assemble /dev/md8 /dev/loop1 --run
mdadm: /dev/md8 has been started with 1 drive (out of 2).
Signature · 8 lines
Doug Herr -- Doug Herr