View previous topic :: View next topic |
Author |
Message |
Hotstuff Guru
Joined: 19 Sep 2004 Posts: 487 Location: Schweiz ( Zürich )
|
Posted: Sat Jan 19, 2008 6:17 am Post subject: Wie muss ich vorgehen beim Raid 5 |
|
|
Hallo
Ich habe ein bisschen im Internet herumgesurft und habe nach ein Howto Raid 5 erstellen mit Gentoo gesucht.
Leider ohne Erfolg
Meine frage an euch ist, wie und was verändert sich bei der Standart Installation.
Könnt ihr mich ein bisschen unter die Arme greifen.
Harddisk: /dev/hda /dev/hdb /dev/hdc
Wie muss die Partition ausschauen?
Danke,
Mit freundlichen Grüssen
Dave _________________ 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 |
|
Back to top |
|
|
schachti Advocate
Joined: 28 Jul 2003 Posts: 3765 Location: Gifhorn, Germany
|
|
Back to top |
|
|
Hotstuff Guru
Joined: 19 Sep 2004 Posts: 487 Location: Schweiz ( Zürich )
|
Posted: Sat Jan 19, 2008 3:15 pm Post subject: |
|
|
Hallo
Ich habe gesehen, das Motherboard Hardware Raid 5 unterstüzt.
Wie muss ich jetzt genau das Gentoo installieren wenn ich Hardware Raid machen will?
Auf eine Harddisk installieren?
Muss es die bestimmte Harddisk sein?
Muss bei Gentoo auch ein Raidverbund machen?
So sieht der Hardware Raid aus.
http://www.pc-arena.ch/Bildschirmphoto4.png
Vielen Dank
Gruss Dave _________________ 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 |
|
Back to top |
|
|
Polynomial-C Retired Dev
Joined: 01 Jun 2003 Posts: 1432 Location: Germany
|
Posted: Sat Jan 19, 2008 3:28 pm Post subject: |
|
|
Hi,
wenn das wirklich ein hardware RAID-Controller ist, dann brauchst du nur den passenden Treiber im Linuxkernel auswählen (sofern es denn einen Treiber im Kernel für den Controller gibt). lspci aus dem Paket sys-apps/pciutils könnte dir bei der Identifizierung des Controllers helfen.
Grüße
Poly-C _________________ The manual said "Requires Windows10 or better" so I installed GNU/Linux...
my portage overlay
Need a stage1 tarball? (Unofficial builds) |
|
Back to top |
|
|
think4urs11 Bodhisattva
Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Sat Jan 19, 2008 3:30 pm Post subject: |
|
|
wenn es ein 'echtes' HW-Raid ist solltest du eigentlich überhaupt nur eine Festplatte sehen; in deinem Fall eine mit einer Größe von 465.8GB. In dem Fall kümmert sich der Controller dann um alles und du kannst darauf installieren ohne großartig darüber nachzudenken, das gesamte Raidhandling erfolgt unterhalb/unabhängig vom OS.
Evtl. gibt es auch noch ein Tool um aus dem OS heraus den Status des Raid abzufragen (z.B. Überwachung damit du eine Meldung auf dem Bildschirm hast wenn eine HD stirbt usw.)
Falls das nicht der Fall ist hast du kein HW-Raid sondern nur ein sog. Fake-Raid. In dem Fall sind die Links von schachti genau das was du brauchst. _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
|
Hotstuff Guru
Joined: 19 Sep 2004 Posts: 487 Location: Schweiz ( Zürich )
|
Posted: Thu Jan 24, 2008 8:58 pm Post subject: |
|
|
Habe bis jetzt folgendes gemacht ( Raid 5 ) evtl. Verbesserungsvorschläge
Code: | livecd ~ # modprobe raid5 |
Code: | livecd ~ # fdisk -l /dev/sda /dev/sdb /dev/sdc |
Code: | 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 |
Code: | livecd ~ # mknod /dev/md1 b 9 1
livecd ~ # mknod /dev/md3 b 9 3
livecd ~ # mknod /dev/md4 b 9 4 |
Code: | 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: | 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: | (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: | 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: | livecd gentoo # wget ftp://gentoo.osuosl.org/pub/gentoo/releases/x86/current/stages/stage3-i686*tar.bz2 |
Code: | livecd gentoo # time tar xjpf stage3* |
Code: | livecd gentoo # cd /mnt/gentoo/usr |
Code: | livecd usr # wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2 |
Code: | livecd usr # time tar xjf portage-lat* |
Code: | 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: | 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: | 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: | livecd linux # time make -j8 |
Code: | livecd linux # make modules_install
livecd linux # cp arch/i386/boot/bzImage /boot/kernel |
Code: | 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: | livecd etc # cd conf.d
livecd conf.d # rc-update add net.eth0 default
livecd conf.d # rc-update add sshd default |
Code: | livecd conf.d # emerge mdadm lvm2 |
Code: | 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: | livecd conf.d # time emerge grub |
Code: | livecd conf.d # nano -w /boot/grub/grub.conf |
Code: | default 0
timeout 10
title=Gentoo
root (hd0,0)
kernel /boot/kernel root=/dev/md3 |
Das hier fuktioniert nicht!!!!
Code: | 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: | 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 |
|
Back to top |
|
|
a.forlorn Guru
Joined: 12 Aug 2005 Posts: 412 Location: Ulm, Germany
|
Posted: Thu Jan 24, 2008 9:19 pm Post subject: |
|
|
Code: | livecd linux # cp arch/i386/boot/bzImage /boot/kernel |
i386 auf einem Kentsfield? _________________ Gentoo update is sometimes harder than it should. |
|
Back to top |
|
|
firefly Watchman
Joined: 31 Oct 2002 Posts: 5232
|
Posted: Thu Jan 24, 2008 9:52 pm Post subject: |
|
|
a.forlorn wrote: | Code: | livecd linux # cp arch/i386/boot/bzImage /boot/kernel |
i386 auf einem Kentsfield? |
öhm für x86 heist da verzeichniss, in dem der übersetzte kernel liegt arch/i386 _________________ Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn. |
|
Back to top |
|
|
Marlo Veteran
Joined: 26 Jul 2003 Posts: 1591
|
|
Back to top |
|
|
Hotstuff Guru
Joined: 19 Sep 2004 Posts: 487 Location: Schweiz ( Zürich )
|
Posted: Sat Feb 02, 2008 8:37 pm Post subject: |
|
|
Hallo
Es funktioniert soweit mit booten.
Aber während dem Booten kommt:
Code: |
Operational error, continuing
Mounting local filesystems ...
mount: special device /dev/vg/usr does not exist
mount: mount point /usr/portage does not exist
.....
|
Was mache ich faltsch!!
Gruss Dave _________________ 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 |
|
Back to top |
|
|
dertobi123 Retired Dev
Joined: 19 Nov 2002 Posts: 2679 Location: Oberhausen, Germany
|
|
Back to top |
|
|
Hotstuff Guru
Joined: 19 Sep 2004 Posts: 487 Location: Schweiz ( Zürich )
|
Posted: Sat Feb 02, 2008 10:27 pm Post subject: |
|
|
Hallo
Ne, das ist es nicht!
Gruss Dave _________________ 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 |
|
Back to top |
|
|
dertobi123 Retired Dev
Joined: 19 Nov 2002 Posts: 2679 Location: Oberhausen, Germany
|
|
Back to top |
|
|
Hotstuff Guru
Joined: 19 Sep 2004 Posts: 487 Location: Schweiz ( Zürich )
|
Posted: Sat Feb 02, 2008 10:47 pm Post subject: |
|
|
dertobi123 wrote: | Die RAID-Arrays sind aber bereits gestartet? RC_VOLUME_ORDER in /etc/conf.d/rc ist entsprechend gesetzt?
Code: | RC_VOLUME_ORDER="lvm raid" |
|
/etc/conf.d/rc
Code: | RC_VOLUME_ORDER="raid evms lvm dm" |
Was meinst du mit gestartet?
Gruss Dave[/i] _________________ 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 |
|
Back to top |
|
|
ScytheMan l33t
Joined: 30 Nov 2005 Posts: 605
|
Posted: Sat Feb 02, 2008 11:06 pm Post subject: |
|
|
Hotstuff wrote: | dertobi123 wrote: | Die RAID-Arrays sind aber bereits gestartet? RC_VOLUME_ORDER in /etc/conf.d/rc ist entsprechend gesetzt?
Code: | RC_VOLUME_ORDER="lvm raid" |
|
/etc/conf.d/rc
Code: | RC_VOLUME_ORDER="raid evms lvm dm" |
[/i] |
Ich weiß nicht ob es Erfolg bringt, bei der Option ist allerdings die Reihenfolge nicht unentscheidend.
Evtl. hilft ein umstellen, so wie es dertobi123 vorgeschlagen hat. |
|
Back to top |
|
|
dertobi123 Retired Dev
Joined: 19 Nov 2002 Posts: 2679 Location: Oberhausen, Germany
|
Posted: Sat Feb 02, 2008 11:26 pm Post subject: |
|
|
ScytheMan wrote: | Ich weiß nicht ob es Erfolg bringt, bei der Option ist allerdings die Reihenfolge nicht unentscheidend. |
Bei RC_VOLUME_ORDER="lvm raid" wird zunächst raid, dann lvm gestartet (Angabe in umgekehrter Reihenfolge) -
RC_VOLUME_ORDER="raid evms lvm dm" wäre dann ein raid auf lvm Devices. _________________ Ganz frisch: Praxisbuch Nagios
Gentoo Linux - Die Metadistribution (2. Auflage) |
|
Back to top |
|
|
Hotstuff Guru
Joined: 19 Sep 2004 Posts: 487 Location: Schweiz ( Zürich )
|
Posted: Sun Feb 03, 2008 7:29 am Post subject: |
|
|
Hallo
Es liegt nicht an dieser Zeile, beim zweiten Rootserver ist das auch so und funktioniert.
Folgende Fehler zeigt es an.
www.pc-arena.ch/fehler.png
www.pc-arena.ch/fehler2.png
www.pc-arena.ch/fehler3.png
Gruss Dave _________________ 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 |
|
Back to top |
|
|
dertobi123 Retired Dev
Joined: 19 Nov 2002 Posts: 2679 Location: Oberhausen, Germany
|
|
Back to top |
|
|
Hotstuff Guru
Joined: 19 Sep 2004 Posts: 487 Location: Schweiz ( Zürich )
|
Posted: Sun Feb 03, 2008 11:05 am Post subject: |
|
|
Hallo
Es hatte mal wärend der Installation ein konflikt gegeben mit udev.
Dann habe ich emerge -u udev gemacht.
Sonst habe ich alles nach der Installation gemacht.
Mit freundlichen Grüssen
Dave _________________ 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 |
|
Back to top |
|
|
dertobi123 Retired Dev
Joined: 19 Nov 2002 Posts: 2679 Location: Oberhausen, Germany
|
|
Back to top |
|
|
Hotstuff Guru
Joined: 19 Sep 2004 Posts: 487 Location: Schweiz ( Zürich )
|
Posted: Sun Feb 03, 2008 11:23 am Post subject: |
|
|
Hallo
Ich habe ein Stable System.
Gruss Dave _________________ 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 |
|
Back to top |
|
|
|