Software RAID replace failed disk . mdadm , grub and lvm ??
Hello Admins,
one of the SuSE SLES 12 LinuxServers has reported disk failure. Fortunately the Database Server has Software Raid hence the system is still up and running. But as recommended, we would like to replace the failed disk with a new one and rebuild the software raid on it. System Information is : Total 4 Internal Disks. sda, sdb , sdc and sdd The fdisk partitions are : Quote:
Software RAID --> sda + sdb (sda is failed disk) Software RAID --> sdb + sdc Quote:
Please note that it also has 2 VGs defined as shown below, 1 VG - system (/dev/md2) 2 VG - ora_db (/dev/md3) Quote:
The grub.conf shows : (Relevant part) Quote:
Quote:
Please let me know if I have missed something. 2 important points I guess would be, how should I take care of lvm and grub in this case. 1. Do I have to do something extra to take care of it or the command sfdisk -d /dev/sdb | sfdisk /dev/sda , should take care of LVM as well. 2. How should I take care of grub in this case? As grun.conf shows entries pertaining to LVM as well as MDADM. Do I have to change anything here before I shutdown the system? I understand the system has 2 pointers to take care of mdadm+lvm. Which have complicated things. Else would it be easier to setup completely new system?? Kindly guide me to the relevant information. Thanks. Regards, Admin |
After rebooting the names of the disks can change depending on the order they are found by the system. Make sure you copy the correct disk. The rest looks good.
|
Typically mdadm is pretty robust - the initrd can be a different matter; the (re-)boot may fail if the initrd hasn't been built to handle RAID in degraded mode. Only a boot will tell in all likelihood.
As for LVM, it won't care. |
Thanks smallpond.
Quote:
Quote:
Quote:
------------------------------------------ Thanks syg00. Quote:
LVM is missing now 1 sda disk altogether so why do you think that would not create a problem? Quote:
|
Your LVM is built on top of mdadm - LVM neither knows nor cares of the physical devices; it cares about /dev/md[012]. Those messages are from layers below mdadm.
The pv size (of RAID1) is unchanged by losing 1 device, so LVM carries on regardless. Likewise filesystem UUIDs are not dependent on adding new device(s) to the array. |
fstab having UUIDs is the right way to do it. The device names can change but the UUID won't.
|
Quote:
I have one more query. Is it required to install grub on the non-failed disk? One of the Instructions states: Quote:
Is it required in our case or not? Thanks in advance. |
One more update,
I did run the command (# dd bs=512 count=1 if=/dev/sda 2>/dev/null| strings) for /dev/sdb to check if grub is installed on the disk /dev/sdb. But it did not give any results. So looks like grub is not installed on sdb. Or am I missing something. If it is really not installed , as per your recommendations , before rebooting this host I should run grub-install /dev/sdb .. is this a safe command? I mean now the system is up and running and I do not wish to disturb it until I have a disk or system replacement plan. |
You should have grub installed on both, but you may have to manually change the boot order if sda fails.
|
All times are GMT -5. The time now is 11:57 AM. |