Forums

Resolved
0 votes
Hello all,
I've a system with 2 Hdds (Raid 1) and onte of the HDD failed last friday. As the disks are relative old, I could fine one to replace the deffective hd so I decided to buy 2 bigger disks and replace both.
So I started to remove the defective from my raid system and replaced it with the new one (much bigger). It seems it works because ClearOS tell me that my raid is clean ...

here's what I did to add my new disk into my RAID system : sudo -i mdadm --add /dev/md127 /dev/sdb

Now, I'd like to add my second new disk but I'm a liite bit afraid having made something wrong because... when looking for my hdds, here's the situation :

my /sda is the old disk I'd like to remove. As I can see, it has 3 partitions : sda1 /sda2 /sda3 and only sda3 is part of my raid system
my new disk /sdb is the new disk I added to my raid system

my new disk/sdc is the new disk I'd like to replace with the /sda one ...


Disque /dev/sda : 250.1 Go, 250059350016 octets, 488397168 secteurs
Unités = secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x0007fa39

Périphérique Amorçage Début Fin Blocs Id. Système
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 3942399 921600 8e Linux LVM
/dev/sda3 3942400 488396799 242227200 fd Linux raid autodetect

Disque /dev/sdb : 2000.4 Go, 2000398934016 octets, 3907029168 secteurs
Unités = secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 4096 octets
taille d'E/S (minimale / optimale) : 4096 octets / 4096 octets


Disque /dev/sdc : 2000.4 Go, 2000398934016 octets, 3907029168 secteurs
Unités = secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 4096 octets
taille d'E/S (minimale / optimale) : 4096 octets / 4096 octets


Disque /dev/md127 : 247.9 Go, 247906435072 octets, 484192256 secteurs
Unités = secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 4096 octets
taille d'E/S (minimale / optimale) : 4096 octets / 4096 octets


Disque /dev/mapper/clearos-swap : 1879 Mo, 1879048192 octets, 3670016 secteurs
Unités = secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets


I cannot imagine just removing my sda from my raid and adding my new /sdc will work because what's going on with /sda1 and sda2 ? and what about my boot ..

Unfortunatly I've no experience on that.. so could someone tell me what I should do ?
Thanks to all for your help :)
Sunday, January 23 2022, 06:32 PM
Share this post:
Responses (6)
  • Accepted Answer

    Tuesday, January 25 2022, 08:57 PM - #Permalink
    Resolved
    0 votes
    Hello Nick,
    So, I removed my drive and connected it to another system to make a clone using dd.
    After more than 3 hours, the clone was done and I connecte the new drive to my system and it started fine ! :D
    So, thanks very much for your advices Nick, it was perfect :)
    Arnaud
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, January 25 2022, 08:50 PM - #Permalink
    Resolved
    0 votes
    Hello Nick,
    So, I removed my drive and connected it to another system to make a clone using dd.
    After more than 3 hours, the clone was done and I connecte the new drive to my system and it started fine ! :D
    So, thanks very much for your advices Nick, it was perfect :)
    Arnaud
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, January 23 2022, 08:27 PM - #Permalink
    Resolved
    0 votes
    oh yes, thanks Nick ; I didn't think about that !
    So i'll have to go onsite to make the clone ;)
    I'll go next tuesday I think and I'll post the result of the operation ...
    Thanks again for your great help and have a nice evening .:)
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, January 23 2022, 07:50 PM - #Permalink
    Resolved
    0 votes
    But your /dev/sda is online and is changing all the time. I would guess it would also lose sync with the RAID on sdb if you cloned it live.
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, January 23 2022, 07:31 PM - #Permalink
    Resolved
    0 votes
    Thanks very much Nick , I'll try to to do that. In the meantime, I read about cloning a disk using sfdisk.
    According to the fact that my /dev/sdc is not in use.. I'll try to do it online (I'v goog backups)

    I'll post the result ...
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, January 23 2022, 07:27 PM - #Permalink
    Resolved
    0 votes
    I don't know the right answer, but I think your sda has the boot partition and potentially the swap partition loaded into the LVM. What I'd do is clone sda onto sdc. I'd do it offline with dd or using something like clonedisk. Then I'd pull /dev/sda and put the new 2TB disk in its place. If it does not work, you can always swap the disks back.
    Like
    1
    The reply is currently minimized Show
Your Reply