Hi,
I have an Ubuntu system which I have an faulted mirror.
I trying to replace the disk, but I'm stuck on that it boots and only showing GRUB
GRUB
Code :
## ## End Default Options ##
title Ubuntu 8.04.4 LTS, kernel 2.6.24-26-server
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-26-server root=/dev/md0 ro quiet splash
initrd /boot/initrd.img-2.6.24-26-server
### To boot if sda fails ###
title Ubuntu 8.04.4 LTS, kernel 2.6.24-26-server /dev/sda fail
root (hd1,0)
kernel /boot/vmlinuz-2.6.24-26-server root=/dev/md0 ro quiet splash
initrd /boot/initrd.img-2.6.24-26-server
### End mod ###
title Ubuntu 8.04.4 LTS, kernel 2.6.24-26-server (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-26-server root=/dev/md0 ro single
initrd /boot/initrd.img-2.6.24-26-server
title Ubuntu 8.04.4 LTS, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
### END DEBIAN AUTOMAGIC KERNELS LIST
Actions done
Code :
root@**-ms01:~# mdadm --query --detail /dev/md0
/dev/md0:
Version : 00.90.03
Creation Time : Tue May 18 21:30:23 2010
Raid Level : raid1
Array Size : 281193600 (268.17 GiB 287.94 GB)
Used Dev Size : 281193600 (268.17 GiB 287.94 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Sun Sep 4 13:43:59 2011
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
UUID : 61e45672:f1e925ad:6f48dceb:15b0fa1c
Events : 0.3979314
Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
1 8 1 1 active sync /dev/sda1
root@**-ms01:~# mdadm --query --detail /dev/md1
/dev/md1:
Version : 00.90.03
Creation Time : Tue May 18 21:30:52 2010
Raid Level : raid1
Array Size : 11839808 (11.29 GiB 12.12 GB)
Used Dev Size : 11839808 (11.29 GiB 12.12 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 1
Persistence : Superblock is persistent
Update Time : Sun Sep 4 13:36:23 2011
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
UUID : d0b542f0:ff47479c:a40f8bcb:9a1e385f
Events : 0.62
Number Major Minor RaidDevice State
0 8 21 0 active sync /dev/sdb5
1 8 5 1 active sync /dev/sda5
root@**-ms01:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [rai
md1 : active raid1 sdb5[0] sda5[1]
11839808 blocks [2/2] [UU]
md0 : active raid1 sdb1[0] sda1[1]
281193600 blocks [2/2] [UU]
unused devices: <none>
root@**-ms01:~# mdadm --manage /dev/md1 --fail /dev/sda5
mdadm: set /dev/sda5 faulty in /dev/md1
root@**-ms01:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [rai
md1 : active raid1 sdb5[0] sda5[2](F)
11839808 blocks [2/1] [U_]
md0 : active raid1 sdb1[0] sda1[1]
281193600 blocks [2/2] [UU]
unused devices: <none>
root@**-ms01:~# mdadm --manage /dev/md1 --remove /dev/sda5
mdadm: hot removed /dev/sda5
root@**-ms01:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sdb5[0]
11839808 blocks [2/1] [U_]
md0 : active raid1 sdb1[0] sda1[1]
281193600 blocks [2/2] [UU]
unused devices: <none>
root@**-ms01:~# mdadm --manage /dev/md0 --fail /dev/sda1
mdadm: set /dev/sda1 faulty in /dev/md0
root@**-ms01:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sdb5[0]
11839808 blocks [2/1] [U_]
md0 : active raid1 sdb1[0] sda1[2](F)
281193600 blocks [2/1] [U_]
unused devices: <none>
root@**-ms01:~# mdadm --manage /dev/md0 --remove /dev/sda1
mdadm: hot removed /dev/sda1
root@**-ms01:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sdb5[0]
11839808 blocks [2/1] [U_]
md0 : active raid1 sdb1[0]
281193600 blocks [2/1] [U_]
unused devices: <none>
root@**-ms01:~# shutdown -h now
Broadcast message from root@**-ms01.**.nl
(/dev/pts/0) at 13:53 ...
The system is going down for halt NOW!
Then I replaced the disk and booted up again, but stuck at GRUB rest of the screen blank.
---------- Post updated at 03:01 PM ---------- Previous update was at 02:26 PM ----------
Update
Booted from cd
I'm able to get the array working.
Code :
root@ubuntu:~# mdadm --assemble --scan
mdadm: /dev/md0 has been started with 1 drive (out of 2).
mdadm: no devices found for /dev/md1
root@ubuntu:~# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sda1[1]
281193600 blocks [2/1] [_U]
Code :
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu
# Pretty colours
#color cyan/blue white/blue
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/md0 ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false
## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash
## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false
## Xen hypervisor options to use with the default Xen boot option
# xenhopt=
## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true
## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false
## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false
## ## End Default Options ##
title Ubuntu 8.04.4 LTS, kernel 2.6.24-26-server
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-26-server root=/dev/md0 ro quiet splash
initrd /boot/initrd.img-2.6.24-26-server
### To boot if sda fails ###
title Ubuntu 8.04.4 LTS, kernel 2.6.24-26-server /dev/sda fail
root (hd1,0)
kernel /boot/vmlinuz-2.6.24-26-server root=/dev/md0 ro quiet splash
initrd /boot/initrd.img-2.6.24-26-server
### End mod ###
title Ubuntu 8.04.4 LTS, kernel 2.6.24-26-server (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-26-server root=/dev/md0 ro single
initrd /boot/initrd.img-2.6.24-26-server
title Ubuntu 8.04.4 LTS, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
### END DEBIAN AUTOMAGIC KERNELS LIST
Code :
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions
# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes
# automatically tag new arrays as belonging to the local system
HOMEHOST <system>
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
# definitions of existing MD arrays
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=61e45672:f1e925ad:6f48dceb:15b0fa1c
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=d0b542f0:ff47479c:a40f8bcb:9a1e385f
# This file was auto-generated on Tue, 18 May 2010 19:36:46 +0000
# by mkconf $Id$
---------- Post updated at 03:13 PM ---------- Previous update was at 03:01 PM ----------
Update
After I got the array active again I decided to add the new disk to it.
Code :
root@ubuntu:~# mdadm --add /dev/md0 /dev/sdb1
mdadm: added /dev/sdb1
root@ubuntu:~# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdb1[2] sda1[1]
281193600 blocks [2/1] [_U]
[>....................] recovery = 0.0% (74816/281193600) finish=125.2min speed=37408K/sec
unused devices: <none>
root@ubuntu:~# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sdb1[2] sda1[1]
281193600 blocks [2/1] [_U]
[>....................] recovery = 0.1% (454144/281193600) finish=92.7min speed=50460K/sec
---------- Post updated at 03:14 PM ---------- Previous update was at 03:13 PM ----------
Don't know iff I can remove the booting problems with how I'm going about it. Iff anyone have some pointers form me please post.