Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sync Gentoo systems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 877

PostPosted: Mon Oct 19, 2020 1:57 pm    Post subject: sync Gentoo systems Reply with quote

Hi,

I have a running Gentoo system I want to clone to another machine.
Everything works as expected except for Linux software RAID.

The source system has a RAID1 set (2 disks):

Code:
# mdadm --detail --scan
ARRAY /dev/md/1 metadata=0.90 UUID=ed72e609:09ba520c:cb201669:f728008a
ARRAY /dev/md/3 metadata=0.90 UUID=d27fc13c:fe9062e2:cb201669:f728008a
ARRAY /dev/md/4 metadata=0.90 UUID=fcc1edda:d3cb9c48:cb201669:f728008a
ARRAY /dev/md/5 metadata=0.90 UUID=ee737a47:704b1e7b:cb201669:f728008a


When I build the target system (clone) I rewrite /etc/mdadm.conf with the new UUIDs.

However, when I boot the cloned system, I get an error at boot time because /dev/md/5 is not available for "root". So I manually enter /dev/sda5 and I can log into the system.
I can then view /proc/mdstat: md1, md3, md4 are OK (UU), but md5 is inactive.
If I run mdadm --detail --scan I get the right UUIDs but /dev/md5 also shows up here as INACTIVE-ARRAY (note /dev/md5, not /dev/md/5 but I guess it's the same).

The content of /etc/mdadm.conf in the cloned system is "as expected":

Code:
ARRAY /dev/md/1 metadata=0.90 UUID=fea19eb3:118d10b6:cb201669:f728008a
ARRAY /dev/md/3 metadata=0.90 UUID=43fcf4b6:9d58d073:cb201669:f728008a
ARRAY /dev/md/4 metadata=0.90 UUID=276d1471:bc4e99f8:cb201669:f728008a
ARRAY /dev/md/5 metadata=0.90 UUID=a06e8b58:f358735d:cb201669:f728008a


I tried to stop and reassemble /dev/md/5 from within the cloned system, but I could not add /dev/sda5 as it was "busy", of course. The second partition /dev/sdb5 was added though.

Unfortunately, rebooting the ssystem led me back to the same initial situation (md5 inactive).

So I then booted the live CD on the cloned system:

Code:
livecd ~ # mdadm --detail --scan
ARRAY /dev/md/4_0 metadata=0.90 UUID=fea19eb3:118d10b6:cb201669:f728008a
ARRAY /dev/md/3_0 metadata=0.90 UUID=43fcf4b6:9d58d073:cb201669:f728008a
ARRAY /dev/md/1_0 metadata=0.90 UUID=276d1471:bc4e99f8:cb201669:f728008a
ARRAY /dev/md/5_0 metadata=0.90 UUID=a06e8b58:f358735d:cb201669:f728008a

livecd ~ # cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid0] [raid1] [raid10] [linear] [multipath]
md124 : active (auto-read-only) raid1 sda5[0] sdb5[1]
      196270592 blocks [2/2] [UU]
      bitmap: 0/2 pages [0KB], 65536KB chunk

md125 : active (auto-read-only) raid1 sdb1[1] sda1[0]
      1984 blocks [2/2] [UU]

md126 : active (auto-read-only) raid1 sda3[0] sdb3[1]
      524224 blocks [2/2] [UU]

md127 : active (auto-read-only) raid1 sda4[0] sdb4[1]
      37005248 blocks [2/2] [UU]

unused devices: <none>


I can see that md124 is "root" (my md5) and I can mount it fine. I can also mount /dev/md/5_0 (root).

So, what can I try now to fix the cloned system so that it can mount the root fs at /dev/md/5 at boot time?

Vieri
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum