Raid-1 help needed, please

Getting your soundcard to work, using Debian on non-i386 hardware, etc

Raid-1 help needed, please

Postby phoenix_art » 2019-01-08 10:04

Hi everyone!

I've got a server computer with Debian 9 X64 and 3 physical hard drives. Two of them were installed with Raid-1 and worked perfectly until one of the drives stopped working. So I change this drive and put a new drive inside the computer. What should I do if I wish continue the same Raid-1 with the new drive? How to reinstall/rebuild Raid-1 on my Debian?

/etc/fstab:

https://i.imgur.com/wW9owIU.png

Regards,

Gabor
phoenix_art
 
Posts: 65
Joined: 2013-12-08 17:47

Re: Raid-1 help needed, please

Postby llivv » 2019-01-08 11:01

a bit sketchy today (not enough coffee)

post
Code: Select all
# fdisk -l
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
User avatar
llivv
 
Posts: 5488
Joined: 2007-02-14 18:10
Location: cold storage

Re: Raid-1 help needed, please

Postby phoenix_art » 2019-01-08 11:14

Disk /dev/sda: 465,8 GiB, 500106780160 bytes, 976771055 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0a0376e9

Eszköz Indítható Start Vége Szektorok Size Id Típus
/dev/sda1 * 2048 195508223 195506176 93,2G 83 Linux
/dev/sda2 195510270 976769023 781258754 372,5G 5 Kiterjesztett
/dev/sda5 195510272 968945663 773435392 368,8G 83 Linux
/dev/sda6 968947712 976769023 7821312 3,7G 82 Linux lapozó / Solaris


Disk /dev/sdb: 465,8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x418684ea

Eszköz Indítható Start Vége Szektorok Size Id Típus
/dev/sdb1 2048 976769023 976766976 465,8G 7 HPFS/NTFS/exFAT


Disk /dev/sdc: 465,8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xb580fc93

Eszköz Indítható Start Vége Szektorok Size Id Típus
/dev/sdc1 2048 976771071 976769024 465,8G fd Linux raid automatikus felismeréssel
phoenix_art
 
Posts: 65
Joined: 2013-12-08 17:47

Re: Raid-1 help needed, please

Postby llivv » 2019-01-08 12:05

Read the mdadm man page to make sure you understand what these commands do

Unless you have already run
Code: Select all
mdadm --fail
shutdown and unplug the new disk
this is where fdisk -l was needed before you broke the raid array - becasue adding new disks usually changes the disk order ie: disk name sd(x)

with the new disk unplugged from the system now you should be able to get the old disks designation / device name ie: /dev/sd(x)
Code: Select all
mdadm --scan

Code: Select all
fdisk -l
to verify disk names
[important] not sure this will get the correct disk name or just the disk name of the name of the disk you just unplugged. (If by chance they are different)

If you are confident that you have the correct disk names of the old raid 1 array and /dev/sdc is correct for the old disk name
Code: Select all
mdadm --fail
leave out the --path argument [as shown below] unless you are absolutely sure of the device name you are removing
Code: Select all
mdadm --fail --path=/dev/sd(x)
putting trust in mdadms' automation to guess properly (usually the guesses are right, but that depends on a lot of different possibilities.

Shutdown and plug the new disk in again
Code: Select all
mdadm --run --scan

again read the man page so you understand what each command is doing bef9re you run that command
and check
Code: Select all
fdisk -l
it's a good friend to mdadm
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
User avatar
llivv
 
Posts: 5488
Joined: 2007-02-14 18:10
Location: cold storage

Re: Raid-1 help needed, please

Postby phoenix_art » 2019-01-09 12:13

Many thanks for this great helping! I will read all the needed informations you mentioned and give it a try.
phoenix_art
 
Posts: 65
Joined: 2013-12-08 17:47


Return to Hardware

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable