Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am a newbie. And have absolutely done a terrible newbie thing. When installing Ubuntu on our servers I set up a RAID 1 on all partitions on two SATA disk drives. Logically, I made all sda partitions devices and all sdb partitions spares. You can image the horror when we disconnected the sda drive to test the sdb drive on boot.
For those of you who don't quite understand my configuration here is the result of the following commands:
$ sudo mdadm --query --detail /dev/md0
Version : 00.90.03
Creation Time : Thu May 11 06:34:52 2006
Raid Level : raid1
Array Size : 48064 (46.95 MiB 49.22 MB)
Device Size : 48064 (46.95 MiB 49.22 MB)
Raid Devices : 1
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Sat Jun 24 13:39:18 2006
State : clean
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 1
UUID : efbff26c:f7e:)f3a3:cd:)cb948:61506d6:)
Events : 0.1016
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 17 - spare /dev/sdb1
md1, md2, md3 are similar to md0. So what I want to do is promote my spare to a working device. I want to change the /etc/mdadm/mdadm.conf file for all Arrays and make the following changes:
Of course there is more to the file I just homed in on the blood and guts of the dilemma. Before actually trying this is there something I have to do in order to assure that I don't completely break the servers? Also I haven't adjusted grub but I think I know how to do that to boot on backup if necessary. See you all at the Portland OSCON on the 24th of July. Thanks in advanced.
Thank you so much for the advice, although on the test server the procedure worked fine, but on the production server when I tried to install grub so that the server could boot from either hardrive on startup for fault-tollerance, I get the following error:
# grub-install /dev/sda
grub> device (hd0) /dev/sdb
grub> root (hd0,0)
Filesystem type is fat, partition type 0x6
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no
Error 15: File not found
How can Ubuntu run on fat? File /boot/grub/stage1 exists but grub cannot find it. With no success I even tried:
grub> find /boot/grub/stage1
Something is not right, and I am afraid to reboot the server since we need it functioning at 8:00 am PST today. I thank you in advance.
Stayed up all night trying to configure grub to boot from either disk on start up in case of disk failure
So I disconnected sda primary hardrive and tried to boot from the second hardrive sdb and it won't boot. A message comes up as
I booted with knoppix to make sure that the RAID 1 replication was working and sdb seems to have all the files duplicated for all partitions as sda. Even the boot partition is duplicated. I have a feeling grub may not be configured correctly, which is the problem I had originally. I though maybe if I connected sdb to the sda connection it would boot, but it still comes up as "no loader". If sdb is a mirror of sda why won't it boot on its own? I cannot afford to lose all the data on sda or to destroy the boot loader, grub, on the system. And I can't seem to get past the find command previously noted to place sdb on the grub boot loader to boot. Thanks in advance, as any help would be greatly appreciated.
We disconnected the good drive and the one with the bad loader wouldn't boot weather it was plugged into SATA-0 or SATA-1 (on the motherboard) as if it was a good drive. It has a mirror images of all four partitions of the "good" drive (this was accomplished after your great advice to Grow the RAID Devices) By default, shouldn't it boot as well? Or as you are saying the BIOS recognizes drives other than by where they are connected? Because the BIOS is configured to boot from CDROM first, and then to any available hard-drive. We don't think that is the problem. What do you reccommend? We appreciate all you help, and we thank you for all your good advice.
It appears that grub is not communicating with the filesystem. When I reinstall grub and add device /dev/sdb it will not allow me to
grub> setup (hd0)
It says that file stage1 could not be found and doesnot exist. So the find command does not connect to filesystem, although on the bash shell prompt the find command works fine and can find /boot/grub/stage1 everytime.
Our system boots fine with sda, although not with sdb. We believe that during duplication something may have gone wrong.
So we would like to remove,reformat sdb and reinstall it to duplicate all over again then maybe grub will be able to communicate with the file system on disk sdb. Do we need to partition the newly formated drive or not? Does Ubuntu software RAID1 take care of it?
We are very grateful for you help, and apprecitate all the time and effort you have given us. Hope to hear from you soon.
Starting back at the beginning sounds like a plan.
There should be no problem in reusing the existing disk partition structure, but as you already know, be sure to have the Debian installer reformat the filesystems so that you start with a clean slate.