We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

Boot problem after HDD fail - sw raid 1


Xander
2016-06-21, 06:51 AM
Thank you for your response

WebHostingNeeds
2016-06-19, 12:11 AM
No data lose, you partition new HDD, then add it to existing raid array, data will be synced to this newly added HDD, it take some time for data to be synced,.

Xander
2016-06-15, 09:14 PM
Got a question if you don't mind. So you are using soft raid 1 and one of your hdd crashed, did you loose any data or they remained intact?
If the raid is on windows do I need to do any changes in case one of my hdd crashes (also using raid1 soft) and ovh replaces it? Asking because I see so much stuff here looking complicated but probably because its linux and I do windows.

Thanks

scarfacedude
2016-06-15, 01:45 PM
same with me..now my server goes to rescue mode and I do not have any ideas how to get back online..

24x7servermanagement
2016-06-15, 05:14 AM
If grub.conf is not showing any kernel , Install a new kernel file.

Bigstack
2016-06-10, 10:58 PM
Edit the grub file /etc/grub.conf and either select what kernel to boot or reorder things as needed. This is assuming you have the kernel files.

WebHostingNeeds
2016-03-09, 11:55 PM
partitions on the disks

Code:
[root@ks4009133 ~]# parted /dev/sda print
Model: ATA HGST HUS726020AL (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      2097kB  10.7GB  10.7GB  primary  ext4         boot, raid
 2      10.7GB  1000GB  989GB   primary  ext4         raid
 3      1000GB  1000GB  538MB   primary

[root@ks4009133 ~]# parted /dev/sdb print
Model: ATA ST1000DM003-9YN1 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number  Start   End     Size    Type     File system     Flags
 1      2097kB  10.7GB  10.7GB  primary  ext4            boot, raid
 2      10.7GB  1000GB  989GB   primary  ext4            raid
 3      1000GB  1000GB  538MB   primary  linux-swap(v1)

[root@ks4009133 ~]#

EDIT Got it fixed by running


Code:
[root@ks4009133 ~]# grub
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename.]
grub> device (hd0) /dev/sda
device (hd0) /dev/sda
grub> device (hd1) /dev/sdb
device (hd1) /dev/sdb
grub> root (hd0,0)
root (hd0,0)
 Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  27 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+27 p (hd0,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.
grub> root (hd1,0)
root (hd1,0)
 Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd1)
setup (hd1)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd1)"...  27 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd1) (hd1)1+27 p (hd1,0)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.
grub> quit
quit
[root@ks4009133 ~]#
Now server boot from OVH kernel, i need it boot from CentOS 6 stock kernel. Any tips on getting server boot from default centos Kernel ?

I can't find the command grub-mkconfig

Code:
[root@ks4009133 ~]# cat /etc/*release
CentOS release 6.7 (Final)
CentOS release 6.7 (Final)
CentOS release 6.7 (Final)
[root@ks4009133 ~]# grub-mkconfig
-bash: grub-mkconfig: command not found
[root@ks4009133 ~]#

WebHostingNeeds
2016-03-09, 11:51 PM
Hi,

I have a server with software RAID 1.

Recently one of the HDD failed (/dev/sda). OVH replaced it. But server did not boot, so they boot in rescue.

I logged in server, added the new HDD in raid array. But it still fail to boot.

I got server up by booting from OVH netboot kernel.

Code:
[root@ks4009133 ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       9.8G  2.5G  6.8G  27% /
devtmpfs        3.9G  408K  3.9G   1% /dev
/dev/md2        907G   29G  833G   4% /home
tmpfs           3.9G     0  3.9G   0% /dev/shm
[root@ks4009133 ~]#
I try install grub, but it is not working

Code:
[root@ks4009133 ~]# grub-install /dev/md1
mdadm: Unknown keyword MAILADDR=root@localhost
Could not find device for /dev/root
Could not find device for /dev/root
Could not find device for /dev/root
/dev/root: Not found or not a block device.
[root@ks4009133 ~]#
Here is raid stat

Code:
[root@ks4009133 ~]# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty] 
md1 : active raid1 sda1[0] sdb1[1]
      10485696 blocks [2/2] [UU]
      
md2 : active raid1 sda2[0] sdb2[1]
      965746624 blocks [2/2] [UU]
      
unused devices: 
[root@ks4009133 ~]#
How i get it boot from HDD as normal ? Should i install grub on /dev/sda instead of /dev/md1

Thanks,

Boby