Habe bis jetzt folgendes gemacht ( Raid 5 )
evtl. Verbesserungsvorschläge
Code: Select all
livecd ~ # fdisk -l /dev/sda /dev/sdb /dev/sdc
Code: Select all
Device Boot Start End Blocks Id System
/dev/sda1 1 11 88326 fd Linux raid autodetect
/dev/sda2 12 61 401625 82 Linux swap / Solaris
/dev/sda3 62 311 2008125 fd Linux raid autodetect
/dev/sda4 312 36471 290455200 fd Linux raid autodetect
[/i]
Code: Select all
livecd ~ # mknod /dev/md1 b 9 1
livecd ~ # mknod /dev/md3 b 9 3
livecd ~ # mknod /dev/md4 b 9 4
Code: Select all
livecd ~ # mdadm --create /dev/md1 --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1
mdadm: array /dev/md1 started.
livecd ~ # mdadm --create /dev/md3 --level=5 --raid-devices=3 /dev/sda3 /dev/sdb3 /dev/sdc3
mdadm: array /dev/md3 started.
livecd ~ # mdadm --create /dev/md4 --level=5 --raid-devices=3 /dev/sda4 /dev/sdb4 /dev/sdc4
mdadm: array /dev/md4 started.
Code: Select all
livecd ~ # vgscan
Reading all physical volumes. This may take a while...
No volume groups found
livecd ~ # vgchange -a y
No volume groups found
(Erstellen der physikalischen Volumes, in unserem Beispiel nur
eines)
livecd ~ # pvcreate /dev/md4
Physical volume "/dev/md4" successfully created
(Erstellen der Volume-Gruppen, in unserem Beispiel auch nur
eine)
livecd ~ # vgcreate vg /dev/md4
Volume group "vg" successfully created
(erstellen der logischen Volumes)
livecd ~ # lvcreate -L8G -nusr vg
/dev/cdrom: open failed: Read-only file system
Logical volume "usr" created (Weitere ähnlich lautende Meldungen
werden nicht aufgeführt)
livecd ~ # lvcreate -L2G -nportage vg
livecd ~ # lvcreate -L4G -ndistfiles vg
livecd ~ # lvcreate -L10G -nhome vg
livecd ~ # lvcreate -L4G -nopt vg
livecd ~ # lvcreate -L4G -nvar vg
livecd ~ # lvcreate -L6G -nvartmp vg
livecd ~ # lvcreate -L2G -ntmp vg
(Anzeigen der Volume-Gruppen und logischen Volumes)
livecd ~ # vgs
VG #PV #LV #SN Attr VSize VFree
vg 1 8 0 wz--n 554.09G 514.09G
livecd ~ # lvs
LV VG Attr LSize Origin Snap% Move Copy%
distfiles vg -wi-a- 4.00G
home vg -wi-a- 10.00G
opt vg -wi-a- 4.00G
portage vg -wi-a- 2.00G
tmp vg -wi-a- 2.00G
usr vg -wi-a- 8.00G
var vg -wi-a- 4.00G
vartmp vg -wi-a- 6.00G
Code: Select all
(Sie benötigen nur ext2 auf der /boot Partition)
livecd ~ # mke2fs /dev/md1
(Wir verwenden ext3 auf der root Partition)
livecd ~ # mke2fs -j /dev/md3
(Erstellen der Dateisysteme auf den logischen Volumes)
livecd ~ # mke2fs -b 4096 -T largefile /dev/vg/distfiles
livecd ~ # mke2fs -j /dev/vg/home
livecd ~ # mke2fs -j /dev/vg/opt
livecd ~ # mke2fs -b 1024 -N 200000 /dev/vg/portage
livecd ~ # mke2fs /dev/vg/tmp
livecd ~ # mke2fs -j /dev/vg/usr
livecd ~ # mke2fs -j /dev/vg/var
livecd ~ # mke2fs /dev/vg/vartmp
(Erstellen und aktivieren des Swap)
livecd ~ # mkswap /dev/sda2 && mkswap /dev/sdb2 && mkswap /dev/sdc2
livecd ~ # swapon -p 1 /dev/sda2 && swapon -p 1 /dev/sdb2 && swapon -p 1 /dev/sdc2
(Überprüfen Sie, daß alle Swap-Partitionen die gleiche Priorität
verwenden)
livecd ~ # swapon -v -s
Filename Type Size Used Priority
/dev/sda2 partition 401616 0 1
/dev/sdb2 partition 401616 0 1
/dev/sdc2 partition 401616 0 1
Code: Select all
livecd ~ # mount /dev/md3 /mnt/gentoo
livecd ~ # cd /mnt/gentoo
livecd gentoo # mkdir boot home usr opt var tmp
livecd gentoo # mount /dev/md1 /mnt/gentoo/boot
livecd gentoo # mount /dev/vg/usr /mnt/gentoo/usr
livecd gentoo # mount /dev/vg/home /mnt/gentoo/home
livecd gentoo # mount /dev/vg/opt /mnt/gentoo/opt
livecd gentoo # mount /dev/vg/tmp /mnt/gentoo/tmp
livecd gentoo # mount /dev/vg/var /mnt/gentoo/var
livecd gentoo # mkdir usr/portage var/tmp
livecd gentoo # mount /dev/vg/vartmp /mnt/gentoo/var/tmp
livecd gentoo # mount /dev/vg/portage /mnt/gentoo/usr/portage
livecd gentoo # mkdir usr/portage/distfiles
livecd gentoo # mount /dev/vg/distfiles /mnt/gentoo/usr/portage/distfiles
(Setzen Sie die richtigen Berechtigungen auf den
tmp-Verzeichnissen)
livecd gentoo # chmod 1777 /mnt/gentoo/tmp /mnt/gentoo/var/tmp
Code: Select all
livecd gentoo # wget ftp://gentoo.osuosl.org/pub/gentoo/releases/x86/current/stages/stage3-i686*tar.bz2
Code: Select all
livecd gentoo # time tar xjpf stage3*
Code: Select all
livecd gentoo # cd /mnt/gentoo/usr
Code: Select all
livecd usr # wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2
Code: Select all
livecd usr # time tar xjf portage-lat*
Code: Select all
livecd usr # cd /
livecd / # mount -t proc proc /mnt/gentoo/proc
livecd / # cp -L /etc/resolv.conf /mnt/gentoo/etc/
livecd / # chroot /mnt/gentoo /bin/bash
livecd / # env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...
Code: Select all
livecd etc # time emerge gentoo-sources
real 3m3.110s
user 1m2.320s
sys 0m34.990s
livecd etc # cd /usr/src/linux
livecd linux # make menuconfig
Code: Select all
Multi-device support (RAID and LVM) --->
[*] Multiple devices driver support (RAID and LVM)
<*> RAID support
< > Linear (append) mode (NEW)
< > RAID-0 (striping) mode
< > RAID-1 (mirroring) mode
< > RAID-10 (mirrored striping) mode (EXPERIMENTAL) (NEW)
<*> RAID-4/RAID-5 mode (NEW)
< > RAID-6 mode (NEW)
< > Multipath I/O support (NEW)
< > Faulty test module for MD (NEW)
<*> Device mapper support
< > Crypt target support (NEW)
< > Snapshot target (EXPERIMENTAL) (NEW)
< > Mirror target (EXPERIMENTAL) (NEW)
< > Zero target (EXPERIMENTAL) (NEW)
< > Multipath target (EXPERIMENTAL) (NEW)
< > Bad Block Relocation Device Target (EXPERIMENTAL) (NEW)
Code: Select all
livecd linux # make modules_install
livecd linux # cp arch/i386/boot/bzImage /boot/kernel
Code: Select all
livecd linux # cd /etc
livecd etc # nano -w fstab
/dev/md1 /boot ext2 noauto,noatime 1 2
/dev/md3 / ext3 noatime 0 1
/dev/sda2 none swap sw,pri=1 0 0
/dev/sdb2 none swap sw,pri=1 0 0
/dev/vg/usr /usr ext3 noatime 1 2
/dev/vg/portage /usr/portage ext2 noatime 1 2
/dev/vg/distfiles /usr/portage/distfiles ext2 noatime 1 2
/dev/vg/home /home ext3 noatime 1 2
/dev/vg/opt /opt ext3 noatime 1 2
/dev/vg/tmp /tmp ext2 noatime 1 2
/dev/vg/var /var ext3 noatime 1 2
/dev/vg/vartmp /var/tmp ext2 noatime 1 2
Code: Select all
livecd etc # cd conf.d
livecd conf.d # rc-update add net.eth0 default
livecd conf.d # rc-update add sshd default
Code: Select all
livecd conf.d # time emerge syslog-ng vixie-cron
livecd conf.d # rc-update add syslog-ng default
livecd conf.d # rc-update add vixie-cron default
Code: Select all
livecd conf.d # nano -w /boot/grub/grub.conf
Code: Select all
default 0
timeout 10
title=Gentoo
root (hd0,0)
kernel /boot/kernel root=/dev/md3
Das hier fuktioniert nicht!!!!
Code: Select all
livecd conf.d # grub
Probing devices to guess BIOS drives. This may take a long time.
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0xfd
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/
grub/menu.lst"... succeeded
Done.
grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd1)
grub> quit
Code: Select all
livecd conf.d # exit
livecd / # umount /mnt/gentoo/usr/portage/distfiles /mnt/gentoo/usr/portage /mnt/gentoo/usr
livecd / # umount /mnt/gentoo/var/tmp /mnt/gentoo/tmp /mnt/gentoo/var /mnt/gentoo/opt
livecd / # umount /mnt/gentoo/proc /mnt/gentoo/home /mnt/gentoo/boot /mnt/gentoo
livecd / # reboot
Hat es bis hier her ein Fehler drin wo nicht funktioniert?
Besten Dank
Root Server 1: INTEL Core 2 Quad Q6600 "Kentsfield", 4x 2.40GHz, 4GB DDR2 Ram, Gentoo 2007.0 32Bit
Root Server 2: INTEL Core 2 Quad Q6600 "Kentsfield", 4x 2.40GHz, 4GB DDR2 Ram, Gentoo 2007.0 64Bit