Ubunutu 8.04.4 RAID 1 mirror replace disk


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu Ubunutu 8.04.4 RAID 1 mirror replace disk
# 1  
Old 09-04-2011
Ubunutu 8.04.4 RAID 1 mirror replace disk

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.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Linux

Centos 7.2 Convert single LVM to RAID Mirror Reinstall BootLoader

Hello, I am trying to convert a single-drive Centos 7.2 installation with LVM into a two-disk mdadm mirror with mrrored LVM. I was able to follow the excellent instructions at: http://www.dgoradia.com/creating-a-raid1-mirrored-on-an-existing-centos-on-lvm/and did create a two-disk mirror... (1 Reply)
Discussion started by: Clovis_Sangrail
1 Replies

2. HP-UX

Patch PHKL_31216 and PHCO_30698 HP-UX 11.11 for replace a LVM mirror boot disk

Hi, I have old server hp rp 3440 hp-ux 11.11. One mirrored disk is faulty. I need spesial patch PHKL_31216 and PHCO_30698, which give to correctly remove disk. Unfortunately I don't have access to hp support site. Please help me find it patch. regards,Andre (0 Replies)
Discussion started by: andre9
0 Replies

3. Solaris

How do I replace a "good" RAID 1+0 disk?

Hi, I have a Solaris Volume Manager (aka Disksuite) RAID 1+0 device consisting of 12 devices. One of these is failing (it has logged several mechanical positioning errors), and I have a replacement disk. Normally, when a disk fails, volume manager marks it as failed, and replacing it is... (1 Reply)
Discussion started by: Twirlip
1 Replies

4. HP-UX

What is the difference between DRD and Root Mirror Disk using LVM mirror ?

what is the difference between DRD and Root Mirror Disk using LVM mirror ? (3 Replies)
Discussion started by: maxim42
3 Replies

5. AIX

Clone or mirror your AIX OS larger disk to smaller disk ?

hello folks, I have a 300GB ROOTVG volume groups with one filesystem /backup having 200GB allocated space Now, I cannot alt disk clone or mirrorvg this hdisk with another smaller disk. The disk size has to be 300GB; I tried alt disk clone and mirrorvg , it doesn't work. you cannot copy LVs as... (9 Replies)
Discussion started by: filosophizer
9 Replies

6. Solaris

What is mirror and sub mirror in RAID -1 SVM

Hi , I am new to SVM .when i try to learn RAID 1 , first they are creating two RAID 0 strips through metainit d51 1 1 c0t0d0s2 metainit d52 1 1 c1t0d0s2 In the next step metainit d50 -m d51 d50: Mirror is setup next step is metaattach d50 d52 d50 : submirror d52 is... (7 Replies)
Discussion started by: vr_mari
7 Replies

7. Filesystems, Disks and Memory

Problem replace disk with RAID-5 volumes

Good morning, I have a problem replacing a disk with raid-5 volumes. An hardware error was occurred from a disk c9t3 so all slices were in maintenace. Every slice is part of a raid-5 volume. Any replica is present. Following Volume manager manual for replacing a disk, I have: - phisically... (0 Replies)
Discussion started by: bonovox
0 Replies

8. HP-UX

HP UX Disk Mirror

Being somewhat extremely new to Unix, I have just had a system crash One of my Volume Groups has crashed However, this Volume Group is actually mirrored How do I switch to use the mirrored copy? Any assistance greatly appreciated Thanks (1 Reply)
Discussion started by: cobdeng
1 Replies

9. Filesystems, Disks and Memory

Creating a Mirror RAID With Existing Disk

Hi there, I'm not sure if this is possible, but here is what I'd like to do.. I have an existing 160GB drive in my Redhat 9.0 server that I would like to add an additional 160GB drive to and create a mirrored RAID of the first disk to the new disk. I would like to do this without having to... (2 Replies)
Discussion started by: sysera
2 Replies
Login or Register to Ask a Question