Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 15th June 2011, 15:42
lucho115 lucho115 is offline
Junior Member
 
Join Date: Sep 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
Sponsored Links
  #2  
Old 15th June 2011, 18:50
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

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.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 15th June 2011, 20:31
lucho115 lucho115 is offline
Junior Member
 
Join Date: Sep 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
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
Reply With Quote
  #4  
Old 16th June 2011, 08:27
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Which distribution do you use?

What's in /etc/fstab and /boot/grub/grub.cfg?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 16th June 2011, 13:35
lucho115 lucho115 is offline
Junior Member
 
Join Date: Sep 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
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.
Reply With Quote
  #6  
Old 16th June 2011, 16:58
lucho115 lucho115 is offline
Junior Member
 
Join Date: Sep 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please, any help is welcome.
Reply With Quote
  #7  
Old 16th June 2011, 20:53
lucho115 lucho115 is offline
Junior Member
 
Join Date: Sep 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by lucho115 View Post
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
Reply With Quote
  #8  
Old 17th June 2011, 11:19
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Is there a reference to 8f67c746-fcb9-4735-a3c3-deb113204ae7 anywhere in a file in the /boot/grub/ or /etc/grub.d/ directories?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 17th June 2011, 13:55
lucho115 lucho115 is offline
Junior Member
 
Join Date: Sep 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
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.
Reply With Quote
  #10  
Old 18th June 2011, 11:50
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
 
Default

Can you run
Code:
update-grub
and
Code:
update-initramfs -u
again?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Proftpd + MySQL virtual users, can't connect geekman HOWTO-Related Questions 28 27th September 2010 18:03
How to install OpenOficeOrg 3.0.0 in Ubuntu 8.04 ernesthagger HOWTO-Related Questions 43 23rd December 2008 14:42
Ubuntu 8.10 on DELL PowerEdge SC440 cannot boot karotu Installation/Configuration 2 8th December 2008 22:00
problem with boot from raid - How To Set Up Software RAID1 on a running system (etch) Marsbar HOWTO-Related Questions 5 6th September 2008 23:32
SP-Server Setup - Ubuntu 5.10 "Breezy Badger" - Page 6 (changes) LuisC-SM HOWTO-Related Questions 0 21st April 2006 15:16


All times are GMT +2. The time now is 19:01.


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