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
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Raid-1 help needed, please
Re: Raid-1 help needed, please
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
-
- Posts: 134
- Joined: 2013-12-08 17:47
- Has thanked: 1 time
Re: Raid-1 help needed, please
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
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
Re: Raid-1 help needed, please
Read the mdadm man page to make sure you understand what these commands do
Unless you have already run 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)
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 leave out the --path argument [as shown below] unless you are absolutely sure of the device name you are removing
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
again read the man page so you understand what each command is doing bef9re you run that command
and check it's a good friend to mdadm
Unless you have already run
Code: Select all
mdadm --fail
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
[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
Code: Select all
mdadm --fail --path=/dev/sd(x)
Shutdown and plug the new disk in again
Code: Select all
mdadm --run --scan
and check
Code: Select all
fdisk -l
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
-
- Posts: 134
- Joined: 2013-12-08 17:47
- Has thanked: 1 time
Re: Raid-1 help needed, please
Many thanks for this great helping! I will read all the needed informations you mentioned and give it a try.