[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensuse
Subject:    replacing RAID drive
From:       George from the tribe <tech () reachthetribes ! org>
Date:       2021-09-23 1:13:45
Message-ID: cadf9359-5fdb-9043-e267-7de2b782d93e () reachthetribes ! org
[Download RAW message or body]

So I have had these 2 drives in RAID 1 configuration for 5 separate 
partitions on each drive. It was a holdover to previous linux versions - 
one of the partitions was an installation of opensuse 13.2!

Well, one of the hard drives failed, putting all 5 RAIDed partitions 
into degraded status. So I thought, what the heck, these drives are 5 
years old, I am just going to replace both hard drives instead of only 
the one that failed, and at the same time upgrade them from 1TB size to 
2TB size since they are so cheap now.

The challenge was, one of the RAID partitions was also my root partition.

So I bought the 2 new drives, and took out the old failed drive, and 
started the process. My plan was to put in the new 2TB drive, partition 
it with 4 of the 5 partitions (I certainly don't need 13.2 anymore), 
hook them to the RAID arrays, wait until they sync, then reboot to check 
that it works. Reinstall grub on the new drive, then remove the 2nd old 
drive (the one that works), and reboot to check that I can boot up on 
the new drive, now with all 4 partitions running in degraded RAID 
configuration. Then, once that is verified to work, put in the 2nd new 
drive, partition it, add the new partitions to the RAID arrays, and then 
be back up and running.

I ran into a bit of a problem on the way, though everything is finally 
resolved, but it raised a question I hope someone can answer. After I 
had connected the 1st new drive to the RAID arrays, I did this:
- I went to a terminal and installed grub on the 1st new drive,
- modified fstab to make sure all the appropriate partitions would be 
loaded and removed the calls to the older drive,
- modified the mdadm.conf file to have it reflect only 4 RAID partitions 
instead of 5 which I had previously,
- ran mkinitrd to get the raid configuration into the intial ramdisk

So then I powered off, disconnected the 2nd older drive, and tried to 
boot up again. Once it got past grub, it ran into a problem and would 
only boot to emergency mode. In emergency mode, it only had a very small 
very basic system installed, so I couldn't do much of anything.

In order to get my system up and running again, I had to use an 
installation USB, go to the rescue system, and run through the procedure 
to reinstall grub, which includes running mkinitrd and the grub 
configuration. After I did that, my system booted up fine and I was able 
to get the new RAID partitions fully working on both of my new drives.

But I don't understand why I had to use the rescue system? Why wouldn't 
running mkinitrd from the operating system when the RAID configuration 
was half on the old drive and half on the new drive be good enough? I 
think I don't fully understand what I did here.



-- 
George
Box:       15.2 | Plasma 5 | AMD Phenom IIX4 | 64 | 32GB
Laptop #1: 15.2 | Plasma 5 | AMD FX 7TH GEN  | 64 | 32GB
Laptop #2: TW   | Plasma 5 | Core i7         | 64 | 16GB
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic