I have a system with CentOS 7 running on software raid1 (with 2 disks - /dev/sda and /dev/sdb). One of the disks has recently showing warning about "unreadable sectors detected". Currently the warnings stopped, but I would like to add an additional disk (/dev/sdc) to the arrays so if in the future this disk will have problems I will simply remove it from the array.
I'm not an expert sysadmin and I will replace/add a disk to a software raid1 for the first time and I have a question that I can't find any answer. So I kindly ask here if anybody knows it
On the HowToForge I have found a how-to "How to replace a failed harddisk in Linux software RAID" https://www.howtoforge.com/tutorial/lin ... -harddisk/
The 2 disks (/dev/sda and /dev/sdb) are MBR formatted.
lsblk shows:
Code: Select all
sda 8:0 0 931,5G 0 disk
├─sda1 8:1 0 104,9G 0 part
│ └─md127 9:127 0 104,9G 0 raid1 /
├─sda2 8:2 0 4,2G 0 part
│ └─md126 9:126 0 4,2G 0 raid1 [SWAP]
└─sda3 8:3 0 822,4G 0 part
└─md122 9:122 0 822,3G 0 raid1
└─home 253:0 0 822,3G 0 dm /home
sdb 8:16 0 931,5G 0 disk
├─sdb1 8:17 0 104,9G 0 part
│ └─md127 9:127 0 104,9G 0 raid1 /
├─sdb2 8:18 0 4,2G 0 part
│ └─md126 9:126 0 4,2G 0 raid1 [SWAP]
└─sdb3 8:19 0 822,4G 0 part
└─md122 9:122 0 822,3G 0 raid1
└─home 253:0 0 822,3G 0 dm /home
Code: Select all
/dev/md127:
Version : 1.0
Creation Time : Thu Feb 19 10:36:09 2015
Raid Level : raid1
Array Size : 110016384 (104.92 GiB 112.66 GB)
Used Dev Size : 110016384 (104.92 GiB 112.66 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Sat Mar 27 15:33:06 2021
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Consistency Policy : bitmap
Name : localhost:root
UUID : 1367078e:180a0666:a35a921d:fe6ddbc2
Events : 48815
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
Code: Select all
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x0002bce4
Naprava Zagon Začetek Konec Bloki Id Sistem
/dev/sdb1 * 2048 220035071 110016512 fd Linux raid autodetect
/dev/sdb2 220035072 228837375 4401152 fd Linux raid autodetect
/dev/sdb3 228837376 1953523711 862343168 fd Linux raid autodetect
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x0001c30f
Naprava Zagon Začetek Konec Bloki Id Sistem
/dev/sda1 * 2048 220035071 110016512 fd Linux raid autodetect
/dev/sda2 220035072 228837375 4401152 fd Linux raid autodetect
/dev/sda3 228837376 1953523711 862343168 fd Linux raid autodetect
According to the How-To when I will put a new disk and start the system I should run:
Code: Select all
sgdisk -R /dev/sdc /dev/sda
sgdisk -G /dev/sdc
I would like to know it this will also make my new disk (/dev/sdc) bootable or should I run some addition commands to make it bootable (grub-install /dev/sdc)?
Best regards,
ommb