
15th June 2011, 15:42
|
|
Junior Member
|
|
Join Date: Sep 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|

15th June 2011, 18:50
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
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.
|
|

15th June 2011, 20:31
|
|
Junior Member
|
|
Join Date: Sep 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by falko
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
|

16th June 2011, 08:27
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Which distribution do you use?
What's in /etc/fstab and /boot/grub/grub.cfg?
|

16th June 2011, 13:35
|
|
Junior Member
|
|
Join Date: Sep 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by falko
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.
|

16th June 2011, 16:58
|
|
Junior Member
|
|
Join Date: Sep 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Please, any help is welcome.
|

16th June 2011, 20:53
|
|
Junior Member
|
|
Join Date: Sep 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by lucho115
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 : 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 :
And i do again: , 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
|

17th June 2011, 11:19
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Is there a reference to 8f67c746-fcb9-4735-a3c3-deb113204ae7 anywhere in a file in the /boot/grub/ or /etc/grub.d/ directories?
|

17th June 2011, 13:55
|
|
Junior Member
|
|
Join Date: Sep 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by falko
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.
|

18th June 2011, 11:50
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Can you run
and
Code:
update-initramfs -u
again?
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 05:18.
|
Recent comments
1 day 20 hours ago
2 days 5 hours ago
2 days 7 hours ago
2 days 9 hours ago
2 days 10 hours ago
2 days 12 hours ago
2 days 13 hours ago
2 days 14 hours ago
3 days 6 hours ago
3 days 7 hours ago