LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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.

Notices

Reply
 
Search this Thread
Old 05-29-2007, 10:49 AM   #1
nethbar
Member
 
Registered: Oct 2003
Location: Springfield, MO
Distribution: Ubuntu, IPCop
Posts: 33

Rep: Reputation: 15
Want to move LVM installation to RAID5 array - how do I get it to boot?


I tried to setup LVM on RAID during the Ubuntu 7.04 installation but I was never able to get it to work, kept giving me this error:

Code:
Error informing the kernel about modifications to partition /dev/md/0p1 
--Invalid argument.
This means Linux won't know about changes you made to /dev/md/0p1 until you reboot 
-- so you shouldn't use it in any way before rebooting
So I gave up (tried wiping the disks, setting up the RAID flags in advance...) and went ahead and instead using LVM, figuring it would be easier to move it on to an array afterwards.

I have 4 SCSI drives, all identical - 18 GB Quantums. / is on /dev/sdd1, sd[abc]1 are setup in an empty RAID5 array, /dev/md0.

I'd like to move everything over to /dev/md0 and put /dev/sdd1 and add as a hot spare.

I've read a lot of really helpful stuff for situations not much like mine. I've read a lot of howtos and would be happy with RTFM if I could just find the right manual. There's a LOT of dated stuff on raidtools and how to boot from RAID1. There are two points I'm really stuck on (the rest I believe I can muck through, it's all pretty new to me):

1. I can't seem to format the boot partition I need on /dev/md0. I can create a 256MB partition /dev/md0p1 in cfdisk and write the changes but when I go
Code:
mrmr@ettin:/$ sudo mke2fs -j /dev/md0p1
mke2fs 1.40-WIP (14-Nov-2006)
Could not stat /dev/md0p1 --- No such file or directory

The device apparently does not exist; did you specify it correctly?
that's what I get.

2. Once I do have a boot partition setup properly on my array, how do I copy over the boot information so it will properly boot? I know 'cp -r /boot /(destination)' will get the files over but how do get GRUB to look in the right spot on the LVM?

Here's some helpful? output:
sudo fdisk -l
Code:
Disk /dev/sda: 18.3 GB, 18373206016 bytes
255 heads, 63 sectors/track, 2233 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2233    17936541   fd  Linux raid autodetect

Disk /dev/sdb: 18.3 GB, 18373206016 bytes
255 heads, 63 sectors/track, 2233 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        2233    17936541   fd  Linux raid autodetect

Disk /dev/sdc: 18.3 GB, 18373206016 bytes
255 heads, 63 sectors/track, 2233 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1        2233    17936541   fd  Linux raid autodetect

Disk /dev/sdd: 18.3 GB, 18373206016 bytes
255 heads, 63 sectors/track, 2233 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *           1          31      248976   83  Linux
/dev/sdd2              32        2233    17687565    5  Extended
/dev/sdd5              32        2233    17687533+  8e  Linux LVM

Disk /dev/md0: 36.7 GB, 36733845504 bytes
2 heads, 4 sectors/track, 8968224 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

    Device Boot      Start         End      Blocks   Id  System
/dev/md0p1   *           1       62253      249010   83  Linux
cat /etc/fstab
Code:
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/mapper/ettin-root /               ext3    defaults,errors=remount-ro 0       1
# /dev/sdd1
UUID=1c481e0a-0622-4c41-a5e2-724f30ab554e /boot           ext3    defaults        0       2
/dev/mapper/ettin-swap_1 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
sudo mdadm --detail /dev/mdo
Code:
/dev/md0:
        Version : 00.90.03
  Creation Time : Mon May 28 15:15:58 2007
     Raid Level : raid5
     Array Size : 35872896 (34.21 GiB 36.73 GB)
    Device Size : 17936448 (17.11 GiB 18.37 GB)
   Raid Devices : 3
  Total Devices : 3
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Mon May 28 18:50:12 2007
          State : clean
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 64K

           UUID : 29827358:01a00be2:be10abfe:aadb887b (local to host ettin)
         Events : 0.8

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1
       2       8       33        2      active sync   /dev/sdc1
here's the default entry for GRUB
Code:
title           Ubuntu, kernel 2.6.20-15-generic
root            (hd3,0)
kernel          /vmlinuz-2.6.20-15-generic root=/dev/mapper/ettin-root ro quiet splash
initrd          /initrd.img-2.6.20-15-generic
quiet
savedefault
Thanks for looking!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
software raid5 + LVM and other questions slackman Linux - Server 0 05-08-2007 02:54 AM
RAID5 Array Recovery after OS upgrade hazmatt20 Linux - Server 25 04-19-2007 08:41 AM
cannot rebuild RAID5 array after two disks went offline waimea Linux - General 2 03-22-2007 03:40 AM
Resize lvm and move /boot? tgm4883 Fedora 1 08-22-2006 07:46 PM
Secure Deletion with RAID5 array neilschelly Linux - Security 2 12-05-2004 06:25 PM


All times are GMT -5. The time now is 12:19 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration