-   Debian (
-   -   LVM + (

carve81 08-24-2006 05:34 AM

Hi I'm "playing" with my home server and his disks...
I want to set them with LVM + RAID (mdadm).

I've got 5 disks (SCSI disk)
During the installation I set only del first disk (non in LVM cause i'd like to set him later and not during the installation)
First disk: sda1 --> /
sda2 --> swap area

Finished the installation I configure LVM + RAID.

I want 3 disks in raid5 and 2 disks in raid1.

mdadm --create /dev/md1 --level=5 --raid-devices=3 /dev/sdc /dev/sdd /dev/sde
pvcreate /dev/md1
vgcreate VGarray5 /dev/md1
lvcreate -l4339 -nLVarray5 VGarray5
mke2fs -T vfat /dev/md1
mkdir /Database
mount /dev/md1 /Database
cp /etc/mdadm/mdadm.conf /etc/mdadm/mdadm.conf.old
mdadm --brief --detail --verbose /dev/md1 >> /etc/mdadm/mdadm.conf

sfdisk -d /dev/sda | sfdisk --force /dev/sdb
mdadm --create /dev/md0 --level 1 --raid-devices=2 missing /dev/sdb1
pvcreate /dev/md0
vgcreate VGboot /dev/md0
lvcreate -l2108 -nLVboot VGboot
mkfs.ext3 /dev/md0
mount /dev/md0 /mnt
cp -dpRx / /mnt
mdadm --brief --detail --verbose /dev/md0 >> /etc/mdadm/mdadm.conf

Then I modify /mnt/etc/fstab (remove /dev/sda1 /, add /dev/md0 /, add /dev/md1 /Database)
I've modified /mnt/etc/lilo.conf (boot=/dev/md0;root=/dev/VGboot/LVboot;raid-extra-boot="/dev/sda, /dev/sdb")
I've launched : lilo -v

I've copied /mnt/etc/fstab and /mnt/etc/lilo.conf on /etc/fstab and /etc/lilo.conf

1 - If i launch vgdisplay and lvdiplay and I don't see any vg and lv. Why???
2 - When I restart the server, it do the boot only from sda1 and not from sdb1. If I remove sda1 the server don't start. Why?

WhatsHisName 08-25-2006 12:45 AM

1) Because you formatted the raid, not the logical volume.

2) Because you didnít make additional grub entries to boot using sdb.

Raid HowTo:

LVM HowTo:

carve81 08-25-2006 04:17 AM

OK really thanks for info.
A quickly question: I use lilo (and not grub). I didn't understand what i have to do to make possible booting from sdb1.

I've configured the lilo.conf file in this manner:
raid-extra-boot="/dev/sda, /dev/sdb"

And I've launched the command : lilo -v

But what other operations I need to do?
Thanks a lot

All times are GMT -5. The time now is 11:56 PM.