I just changed /sda system disk in SW RAID using following steps, simply put:
sfdisk -d /dev/sdb | sfdisk /dev/sda mdadm --manage /dev/md0 --add /dev/sda2
Now disk is initializing chcked by:
All looks fine
md0 : active raid1 sda2 sdb2 244056192 blocks super 1.2 [2/2] [UU] bitmap: 2/2 pages [8KB], 65536KB chunk
sda 8:0 0 232.9G 0 disk |-sda1 8:1 0 9M 0 part `-sda2 8:2 0 232.9G 0 part `-md0 9:0 0 232.8G 0 raid1 |-vg.system-lv.root 253:0 0 40G 0 lvm / `-vg.system-lv.cache 253:1 0 160G 0 lvm /mnt/cdn-cache sdb 8:16 0 232.9G 0 disk |-sdb1 8:17 0 9M 0 part `-sdb2 8:18 0 232.9G 0 part `-md0 9:0 0 232.8G 0 raid1 |-vg.system-lv.root 253:0 0 40G 0 lvm / `-vg.system-lv.cache 253:1 0 160G 0 lvm /mnt/cdn-cache
What iam worried about is: Is there GRUB installed on sda1? I checked cfdisk /dev/sda and sda1 is set as type BIOS boot. When i try to do
i get error
grub-install: error: unable to identify a filesystem in hostdisk//dev/sda; safety check can't be performed.
Iam not really sure that way i am doing it is the right path, but iam sure that i need to make sure the server boots in case any of the 2 disks fails, it boots. So what would be the correct way to check/install grub on the new disk? I just updated initramfs, but i dont think thats all i need to do. The topic around grub is bit convoluted and all over the place and i cant pinpoint the "sure" way, as iam not facing any bug or unforeseen issue, just lack of exact knowledge.