[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian + LVM + RAID1



Damon L. Chesser wrote:
> SNIP
>>
>> I have this line in /boot/grub/menu.lst
>>
>> I tried in the following sequence to:
>>
>> 0. boot resque
>> 1. mount /boot from raid1 and the other directories from the lvm volumes
>>
>> 1. enter lvm into /etc/modules,
>> 2. rebuild initrd with:
>>
>>  mkinitramfs -o /boot/grub/initrd.img-2.6.24-1-amd64
>>
>> 3. install grub into the MBR of both disk with
>>
>> grub-install /dev/sdc
>> grub-install /dev/sdd
>>
>> but still the same message appears when I try to boot :(
>>
>> How can I check if the lvm support is really seen by grub?
>> I find this (http://grub.enbug.org/LVMandRAID) article claiming that I
>> have to enter "insmod lvm" in a file named grub.cfg. But I don't have a
>> file like this in my system?!
>>
>>  
>>   
> Ivan,
> 
> As for LVM support for grub:  the MBR has files pointing to your "root"
> which in this term means place where the grub files are which is NOT in
> an LVM.  In your case this should be /dev/md0 or however GRUB reads that
> (I confess, I don't know).  I just installed, in a vm, debian using this
> image:
> http://ftp.nl.debian.org/debian/dists/etch/main/installer-amd64/current/images/netboot/mini.iso
> which should be current snapshot of testing, net install mini.iso.  I
> did that to make sure we had the same OS.
> 
> I partitioned two 8G drives thusly:  1 120MB primary, 1 6.5GB extended. 
> I made the 1st partition into a raid1 (md0) and made the 2nd into a
> raid1 (md1)
> 
> I put an a swap file on each drive (1.5G each, why run raid on a swap?
> double your swap file space and you can ping between the two if you need
> them)
> 
> I put LVM (System) on top of md1 and divided that into two logical
> volumes (root 4.5G and home 2G or so)
> 
> I then was asked to install Grub into MBR of (hd0,0) which I agreed to.
> 
> rebooted.  works just fine.
> 
> Cut your losses, if you have a network install, just do it again (unless
> you are metered) and this time install grub on the physical HD.  Then
> use the grub command to mirror it to the raid1 member.
> 
> HTH.
> 

To make the long story - short, it works!
There are a few things which are not set/clear and I would like to clear
out, like for example:

1. Why the installation offered me lilo, not grub? I guess when I switch
to grub, I would still have the same problems as before..
2. Why the drive letter assignment changed before and after the
reboot(comparing the partition table list and the fdisk log)
3. What do the entries from fdisk -l like "Disk /dev/md1 doesn't contain
a valid partition table" mean?
4. What are devices /dev/md-0 and /dev/md-1?

All of those I'll try to solve. For details see below.

	Thanks again,
	Ivan

========================

Log of the installation (only the relevant entries):

01. I downloaded the image from the address you point me to:

http://ftp.nl.debian.org/debian/dists/etch/main/installer-amd64/current/images/netboot/mini.iso

03. Booted from it.
04. Hit enter in the boot screen.
21. Partition disks - Manual.
22. Partition disks (before partitioning)

IDE1 master (hda) - 122.9 GB Maxtor 6Y120P0
	#1 primary 122.9 GB	ntfs
IDE5 master (hde) - 120.0 GB ST3120026A
	#5 logical 120.0 GB	ntfs
IDE5 slave (hdf) - 160.0 GB ST3160021A
	#5 logical 160.0 GB	fat32
SCSI2 (0,0,0) (sda) - 500.1 GB ATA WDC WD5000AAJS-0
	#1 primary 500.1 GB	ntfs
SCSI4 (0,0,0) (sdb) - 320.1 GB ATA ST3320620AS
	#5 logical 320.1 GB	ntfs
SCSI5 (0,0,0) (sdc) - 250.1 GB ATA WDC WD2500JS-55M
	#1 primary 509 MB B K	raid
	#2 primary 244.5 GB K	raid
	   pri/log   5.1 GB	FREE SPACE
SCSI6 (0,0,0) (sdd) - 250.1 GB ATA WDC WD2500JS-55M
	#1 primary 509 MB B K	raid
	#2 primary 244.5 GB K	raid
	   pri/log   5.1 GB	FREE SPACE


23. Partition disks (after partitioning)

IDE1 master (hda) - 122.9 GB Maxtor 6Y120P0
	#1 primary 122.9 GB	ntfs
IDE5 master (hde) - 120.0 GB ST3120026A
	#5 logical 120.0 GB	ntfs
IDE5 slave (hdf) - 160.0 GB ST3160021A
	#5 logical 160.0 GB	fat32
LVM VG vg00, LV home - 86.5 GB Linux device-mapper
	#1 86.5 GB f ext3	/home
LVM VG vg00, LV root - 161.1 GB Linux device-mapper
	#1 161.1 GB f ext3	/
RAID1 device #0 - 509.8 MB Software RAID device
	#1 509.8 MB			       <<< Not formatted/mounted
RAID1 device #1 - 247.5 GB Software RAID device
	#1 247.5 GB K lvm
SCSI2 (0,0,0) (sda) - 500.1 GB ATA WDC WD5000AAJS-0
	#1 primary 500.1 GB	ntfs
SCSI4 (0,0,0) (sdb) - 320.1 GB ATA ST3320620AS
	#5 logical 320.1 GB	ntfs
SCSI5 (0,0,0) (sdc) - 250.1 GB ATA WDC WD2500JS-55M
	#1 primary 509.9 MB B K	raid
	#5 logical 2.0 GB     F	swap	swap
	#3 primary 247.5 GB   K	raid
SCSI6 (0,0,0) (sdd) - 250.1 GB ATA WDC WD2500JS-55M
	#1 primary 509.9 MB B K	raid
	#5 logical 2.0 GB     F	swap	swap
	#3 primary 247.5 GB   K	raid

24. Partition disks - Finish partitioning and write changes to disk
25. Partition disks - Write the changes to disks? - Yes
31. Software selection - "Standard system" & "Desktop System"
33. Install the LILO boot loader on a hard disk - Other choice (the
default is /dev/md1) <<< why LILO?!
34. Install the LILO boot loader on a hard disk - /dev/md0
35. Reboot - working!!!


I attach the output of fdisk -l and lvdisplay

lili2:/home/glushkov# fdisk -l

Disk /dev/hda: 122.9 GB, 122942324736 bytes
226 heads, 62 sectors/track, 17136 cylinders
Units = cylinders of 14012 * 512 = 7174144 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1       17137   120060832    7  HPFS/NTFS

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               2       38913   312560640    f  W95 Ext'd 
(LBA)
/dev/sda5               2       38913   312560608+   7  HPFS/NTFS

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          62      497983+  fd  Linux raid 
autodetect
/dev/sdb2              63         305     1951897+   5  Extended
/dev/sdb3             306       30401   241746120   fd  Linux raid 
autodetect
/dev/sdb5              63         305     1951866   82  Linux swap 
/ Solaris

Disk /dev/sdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1          62      497983+  fd  Linux raid 
autodetect
/dev/sdc2              63         305     1951897+   5  Extended
/dev/sdc3             306       30401   241746120   fd  Linux raid 
autodetect
/dev/sdc5              63         305     1951866   82  Linux swap / 
Solaris

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
16 heads, 63 sectors/track, 969021 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1      969021   488386552+   7  HPFS/NTFS

Disk /dev/hde: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hde1               2       14593   117210240    f  W95 Ext'd (LBA)
/dev/hde5               2       14593   117210208+   7  HPFS/NTFS

Disk /dev/hdf: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdf1               2       19457   156280320    f  W95 Ext'd (LBA)
/dev/hdf5               2       19457   156280288+   b  W95 FAT32

Disk /dev/md0: 509 MB, 509804544 bytes
2 heads, 4 sectors/track, 124464 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

    Device Boot      Start         End      Blocks   Id  System

Disk /dev/md1: 247.5 GB, 247547953152 bytes
2 heads, 4 sectors/track, 60436512 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/dm-0: 161.0 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 86.4 GB, 86482354176 bytes
255 heads, 63 sectors/track, 10514 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-1 doesn't contain a valid partition table


  --- Logical volume ---
  LV Name                /dev/vg00/root
  VG Name                vg00
  LV UUID                ce5CKB-yQU9-4FWl-TzuY-m2aN-bylG-7s37Ka
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                150.00 GB
  Current LE             38400
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

  --- Logical volume ---
  LV Name                /dev/vg00/home
  VG Name                vg00
  LV UUID                xfe8zL-cKZj-kAEM-p16X-ifT6-McM3-Omi1lm
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                80.54 GB
  Current LE             20619
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:1



Reply to: