Software RAID1 On A Running CentOS 5.4

Discussion in 'HOWTO-Related Questions' started by wminside, Feb 22, 2010.

  1. wminside

    wminside New Member

    Hi, I'm having some trouble setting up a RAID1 on CentOS 5.4.

    I'm using this guide:
    http://www.howtoforge.org/how-to-se...ing-system-incl-grub-configuration-centos-5.3

    After installing Grub on the sencond hard drive (hdb in my case) and rebooting the system I get the login screen but right after filling my user/psswd the message "last connected from blablah" disppapears and it keeps asking for my login details. If I boot from the second kernel (root=LABEL=/) this doesn't happen.

    This was my third try. Any ideas?
     
    Last edited: Feb 22, 2010
  2. falko

    falko Super Moderator Howtoforge Staff

    What's in /boot/grub/menu.lst and /etc/fstab?
     
  3. wminside

    wminside New Member

    Hi Falko, I have both of them just like in the howto

    fstab
    Code:
    /dev/md2                 /                       ext3    defaults        1 1
    /dev/md0             /boot                   ext3    defaults        1 2
    tmpfs                   /dev/shm                tmpfs   defaults        0 0
    devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
    sysfs                   /sys                    sysfs   defaults        0 0
    proc                    /proc                   proc    defaults        0 0
    /dev/md1         swap                    swap    defaults        0 0

    boot/grub.conf
    Code:
    ..
    fallback=1
    title CentOS (2.6.18-164.11.1.el5)
            root (hd1,0)
            kernel /vmlinuz-2.6.18-164.11.1.el5 ro root=/dev/md2
            initrd /initrd-2.6.18-164.11.1.el5.img
    
    title CentOS (2.6.18-164.11.1.el5)
            root (hd0,0)
            kernel /vmlinuz-2.6.18-164.11.1.el5 ro root=LABEL=/
            initrd /initrd-2.6.18-164.11.1.el5.img
    ..
     
  4. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    fdisk -l
    ? Is this an LVM system?
     
  5. wminside

    wminside New Member

    I gave it another shot so here it is everything you asked for

    /etc/fstab
    Code:
    /dev/md2                 /                       ext3    defaults        1 1
    /dev/md0            /boot                   ext3    defaults        1 2
    tmpfs                   /dev/shm                tmpfs   defaults        0 0
    devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
    sysfs                   /sys                    sysfs   defaults        0 0
    proc                    /proc                   proc    defaults        0 0
    /dev/md1         swap                    swap    defaults        0 0
    
    /boot/grub/menu.lst
    Code:
    default=0
    fallback=1
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title CentOS (2.6.18-164.el5)
            root (hd1,0)
            kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/md2
            initrd /initrd-2.6.18-164.el5.img
    title CentOS (2.6.18-164.el5)
            root (hd0,0)
            kernel /vmlinuz-2.6.18-164.el5 ro root=LABEL=/
            initrd /initrd-2.6.18-164.el5.img
    
    It's not LVM

    so here it is the problem...
    Code:
    [root@centoso ~]# fdisk -l
    
    Disk /dev/hda: 8589 MB, 8589934592 bytes
    255 heads, 63 sectors/track, 1044 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hda1   *           1          13      104391   83  Linux
    /dev/hda2              14         144     1052257+  82  Linux swap / Solaris
    /dev/hda3             145        1044     7229250   83  Linux
    
    Disk /dev/hdd: 8696 MB, 8696889344 bytes
    16 heads, 63 sectors/track, 16851 cylinders
    Units = cylinders of 1008 * 512 = 516096 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hdd1   *           1         208      104391   fd  Linux raid autodetect
    Partition 1 does not end on cylinder boundary.
    /dev/hdd2             208        2295     1052257+  fd  Linux raid autodetect
    /dev/hdd3            2296       16639     7229250   fd  Linux raid autodetect
    
    Disk /dev/md2: 7402 MB, 7402684416 bytes
    2 heads, 4 sectors/track, 1807296 cylinders
    Units = cylinders of 8 * 512 = 4096 bytes
    
    Disk /dev/md2 doesn't contain a valid partition table
    
    Disk /dev/md1: 1077 MB, 1077411840 bytes
    2 heads, 4 sectors/track, 263040 cylinders
    Units = cylinders of 8 * 512 = 4096 bytes
    
    Disk /dev/md1 doesn't contain a valid partition table
    
    Disk /dev/md0: 106 MB, 106823680 bytes
    2 heads, 4 sectors/track, 26080 cylinders
    Units = cylinders of 8 * 512 = 4096 bytes
    
    Disk /dev/md0 doesn't contain a valid partition table
    
    I'm using VirtualBox for this. I googled the fact that partition 1 does not end on a cylinder boundary but apparently it isn't that big of a deal. Well it seems I didn't google enough.

    I hadn't noticed that the raid arrays don't have a valid table though. Any suggestions at this point?
     
  6. falko

    falko Super Moderator Howtoforge Staff

    That is normal and nothing to worry about.

    Is it possible to log in using SSH?
     
  7. wminside

    wminside New Member

    It doesn't make any difference if I log in through SSH. Actually Putty will close right after I try to log in just as if I was logging out.
     
    Last edited: Feb 25, 2010

Share This Page