HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   setup-swraid1-on-a-running-lvm-system-ubuntu-10.04 - SDB dont boot but SDA yes (http://www.howtoforge.com/forums/showthread.php?t=53084)

lucho115 15th June 2011 15:42

setup-swraid1-on-a-running-lvm-system-ubuntu-10.04 - SDB dont boot but SDA yes
 
Hi, iam try to do a setup thats descripted in this how to:
http://www.howtoforge.com/how-to-set...n-ubuntu-10.04

All was ok, but when iam trying to tested a get boot from sda if remove sdb, but if remove sda, sdb dont boot, and say these: cant find the device 8f67c746-fcb9-4735-a3c3-deb113204ae7 and give me a grub console.
So, i reconect sda, boot ok, and run grub-install sda and grub-install sdb again, and then try again to remove sda, now i get that the system reboot when charging grub, so waht happening?
to reference the 2 disk are tested and smart mark like ok without problems.
I put sda ok, and boot ok, but why i cant boot from sdb?
thks and sorry about my english.
bye

falko 15th June 2011 18:50

Did you do the following (I quote from the tutorial - page 4)?

Quote:

Then put in a new /dev/sdb drive (if you simulate a failure of /dev/sda, you should now put /dev/sdb in /dev/sda's place and connect the new HDD as /dev/sdb!) and boot the system. It should still start without problems.

lucho115 15th June 2011 20:31

Quote:

Originally Posted by falko (Post 258401)
Did you do the following (I quote from the tutorial - page 4)?

Yes falko, i do that, but anyway the system reboot when load grub.
I also build the raid again doing this:

Code:

mdadm --manage /dev/md0 --fail /dev/sdb1
mdadm --manage /dev/md1 --fail /dev/sdb5
mdadm --manage /dev/md0 --remove /dev/sdb1
mdadm --manage /dev/md1 --remove /dev/sdb5
shutdown -h now
sfdisk -d /dev/sda | sfdisk --force /dev/sdb
mdadm --zero-superblock /dev/sdb1
mdadm --zero-superblock /dev/sdb5
mdadm -a /dev/md0 /dev/sdb1
mdadm -a /dev/md1 /dev/sdb5
grub-install /dev/sda
grub-install /dev/sdb

Then reboot, all ok, so remove again sda, put sdb in sda place, and get the same, the system reboot loading grub, but if i insert sda its boot ok, also try sda in sdb place and boot ok.
Any other idea?
thks

falko 16th June 2011 08:27

Which distribution do you use?

What's in /etc/fstab and /boot/grub/grub.cfg?

lucho115 16th June 2011 13:35

Quote:

Originally Posted by falko (Post 258424)
Which distribution do you use?

What's in /etc/fstab and /boot/grub/grub.cfg?

Falko thanks for post here, iam using ubuntu 10.04.2 server, and the files:

/etc/fstab
Code:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>  <type>  <options>      <dump>  <pass>
proc            /proc          proc    nodev,noexec,nosuid 0      0
/dev/mapper/mysql-root /              ext4    errors=remount-ro 0      1
# /boot was on /dev/sda1 during installation
#UUID=8f67c746-fcb9-4735-a3c3-deb113204ae7 /boot          ext2    defaults        0      2
/dev/md0 /boot          ext2    defaults        0      2
/dev/mapper/mysql-swap_1 none            swap    sw              0      0

/boot/grub/grub.cfg
Code:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod raid
insmod mdraid
insmod lvm
insmod ext2
set root='(mysql-root)'
search --no-floppy --fs-uuid --set 20055c28-f960-44bc-80d4-1a0bd714ab5a
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod raid
insmod mdraid
insmod ext2
set root='(md0)'
search --no-floppy --fs-uuid --set 6348ca9c-7027-4d2b-9452-05745c0f2acb
set locale_dir=($root)/grub/locale
set lang=es
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, con Linux 2.6.32-32-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        insmod raid
        insmod mdraid
        insmod ext2
        set root='(md0)'
        search --no-floppy --fs-uuid --set 6348ca9c-7027-4d2b-9452-05745c0f2acb
        linux        /vmlinuz-2.6.32-32-generic-pae root=/dev/mapper/mysql-root ro  quiet
        initrd        /initrd.img-2.6.32-32-generic-pae
}
menuentry 'Ubuntu, con Linux 2.6.32-32-generic-pae (modo recuperaciĆ³n)' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        insmod raid
        insmod mdraid
        insmod ext2
        set root='(md0)'
        search --no-floppy --fs-uuid --set 6348ca9c-7027-4d2b-9452-05745c0f2acb
        echo        'Cargando Linux 2.6.32-32-generic-pae ...'
        linux        /vmlinuz-2.6.32-32-generic-pae root=/dev/mapper/mysql-root ro single
        echo        'Cargando el disco RAM inicial...'
        initrd        /initrd.img-2.6.32-32-generic-pae
}
menuentry 'Ubuntu, con Linux 2.6.32-28-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        insmod raid
        insmod mdraid
        insmod ext2
        set root='(md0)'
        search --no-floppy --fs-uuid --set 6348ca9c-7027-4d2b-9452-05745c0f2acb
        linux        /vmlinuz-2.6.32-28-generic-pae root=/dev/mapper/mysql-root ro  quiet
        initrd        /initrd.img-2.6.32-28-generic-pae
}
menuentry 'Ubuntu, con Linux 2.6.32-28-generic-pae (modo recuperaciĆ³n)' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        insmod raid
        insmod mdraid
        insmod ext2
        set root='(md0)'
        search --no-floppy --fs-uuid --set 6348ca9c-7027-4d2b-9452-05745c0f2acb
        echo        'Cargando Linux 2.6.32-28-generic-pae ...'
        linux        /vmlinuz-2.6.32-28-generic-pae root=/dev/mapper/mysql-root ro single
        echo        'Cargando el disco RAM inicial...'
        initrd        /initrd.img-2.6.32-28-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
        insmod raid
        insmod mdraid
        insmod ext2
        set root='(md0)'
        search --no-floppy --fs-uuid --set 6348ca9c-7027-4d2b-9452-05745c0f2acb
        linux16        /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
        insmod raid
        insmod mdraid
        insmod ext2
        set root='(md0)'
        search --no-floppy --fs-uuid --set 6348ca9c-7027-4d2b-9452-05745c0f2acb
        linux16        /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

i will wait for help. tks.

lucho115 16th June 2011 16:58

Please, any help is welcome.

lucho115 16th June 2011 20:53

Quote:

Originally Posted by lucho115 (Post 258408)
Yes falko, i do that, but anyway the system reboot when load grub.
I also build the raid again doing this:

Code:

mdadm --manage /dev/md0 --fail /dev/sdb1
mdadm --manage /dev/md1 --fail /dev/sdb5
mdadm --manage /dev/md0 --remove /dev/sdb1
mdadm --manage /dev/md1 --remove /dev/sdb5
shutdown -h now
sfdisk -d /dev/sda | sfdisk --force /dev/sdb
mdadm --zero-superblock /dev/sdb1
mdadm --zero-superblock /dev/sdb5
mdadm -a /dev/md0 /dev/sdb1
mdadm -a /dev/md1 /dev/sdb5
grub-install /dev/sda
grub-install /dev/sdb

Then reboot, all ok, so remove again sda, put sdb in sda place, and get the same, the system reboot loading grub, but if i insert sda its boot ok, also try sda in sdb place and boot ok.
Any other idea?
thks

OK, i forget to say that wheni rebuild the raid again this happen:

Code:

mdadm --manage /dev/md0 --fail /dev/sdb1
mdadm --manage /dev/md1 --fail /dev/sdb5
mdadm --manage /dev/md0 --remove /dev/sdb1
mdadm --manage /dev/md1 --remove /dev/sdb5

I run :
Code:

cat /proc/mdstat
and i get:

Code:

root@mysql:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda1[0]
      248768 blocks [2/1] [U_]

md1 : active raid1 sda5[0]
      79792064 blocks [2/1] [U_]

unused devices: <none>
root@mysql:~#

So, i reboot :

Code:

shutdown -h now
And i do again:
Code:

cat /proc/mdstat
, and i get :

Code:

root@mysql:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda1[0] sdb1[0]
      248768 blocks [2/1] [UU]

md1 : active raid1 sda5[0]
      79792064 blocks [2/1] [U_]

unused devices: <none>
root@mysql:~#

Why md0 is again build?
I removed again :

Code:

mdadm --manage /dev/md0 --fail /dev/sdb1
mdadm --manage /dev/md0 --remove /dev/sdb1

Now the sdb1 is removed, but i dont reboot because md0 will be rebuild again, so follow with this:

Code:

sfdisk -d /dev/sda | sfdisk --force /dev/sdb
mdadm --zero-superblock /dev/sdb1
mdadm --zero-superblock /dev/sdb5
mdadm -a /dev/md0 /dev/sdb1
mdadm -a /dev/md1 /dev/sdb5
grub-install /dev/sda
grub-install /dev/sdb

This can explain the booting problem? or give you a kind of track?
thks

falko 17th June 2011 11:19

Is there a reference to 8f67c746-fcb9-4735-a3c3-deb113204ae7 anywhere in a file in the /boot/grub/ or /etc/grub.d/ directories?

lucho115 17th June 2011 13:55

Quote:

Originally Posted by falko (Post 258481)
Is there a reference to 8f67c746-fcb9-4735-a3c3-deb113204ae7 anywhere in a file in the /boot/grub/ or /etc/grub.d/ directories?

Nop, nothing, only in /etc/fstab this line:

Code:

#UUID=8f67c746-fcb9-4735-a3c3-deb113204ae7 /boot          ext2    defaults        0      2
but, is commented, so doesnt used.

falko 18th June 2011 11:50

Can you run
Code:

update-grub
and
Code:

update-initramfs -u
again?


All times are GMT +2. The time now is 18:52.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.