tiri technology blog

im web oder während unserer arbeit gefunden

8. März 2008

debian 4.0 mit xen on drbd on 3ware 9650SE-LP

Abgelegt unter: Wissen — Tags:, , , — tirili @ 09:11

Resources:

http://wiki.xensource.com/xenwiki/XenFaq
http://www.option-c.com/xwiki/XenLvmDrbd
http://www.debian-administration.org/articles/578
http://www.howtoforge.de/howto/xen-cluster-management-mit-ganeti-auf-debian-etch/6/

Debian 4.0 mit der von 3ware bereitgestellten CD installieren

* /etc/apt/sources.list

deb http://ftp.freenet.de/debian/ etch main non-free contrib
deb-src http://ftp.freenet.de/debian/ etch main non-free contrib
 
deb http://security.debian.org/ etch/updates main contrib non-free
deb-src http://security.debian.org/ etch/updates main contrib non-free
 
deb http://www.backports.org/debian/ etch-backports main non-free contrib
aptitude update
wget -O - http://backports.org/debian/archive.key | apt-key add -
 
aptitude install ssh
aptitude install lynx

XEN 3.2 installieren

aptitude install -t etch-backports xen-hypervisor-3.2-1-amd64 xen-utils-3.2-1 xen-tools libxenstore3.0
aptitude install -t etch-backports linux-image-2.6.18-6-xen-amd64 linux-modules-2.6.18-6-xen-amd64

/boot/grub/menu.lst
(http://www.cl.cam.ac.uk/research/srg/netos/xen/readmes/user/)

title           Xen 3.2-1-amd64 / Debian GNU/Linux, kernel 2.6.18-6-xen-amd64
root            (hd0,0)
kernel          /boot/xen-3.2-1-amd64.gz dom0_mem=512M vga=text-80x50,keep
module          /boot/vmlinuz-2.6.18-6-xen-amd64 root=/dev/sda1 ro console=tty0
module          /boot/initrd.img-2.6.18-6-xen-amd64
savedefault

Quelle: http://www.debian-administration.org/articles/578

dbxen11:~# aptitude install -t etch-backports drbd8-utils drbd8-source build-essential linux-headers-2.6-xen-amd64
Die folgenden NEUEN Pakete werden zusätzlich automatisch installiert:
  bzip2 cpp cpp-4.1 debconf-utils debhelper dpatch dpkg-dev fakeroot g++ g++-4.1 gcc gcc-4.1 gettext gettext-base
  html2text intltool-debian kernel-package libc6-dev libcompress-zlib-perl libmail-sendmail-perl libmudflap0
  libmudflap0-dev libssp0 libstdc++6-4.1-dev linux-headers-2.6.18-6-xen linux-headers-2.6.18-6-xen-amd64
  linux-kbuild-2.6.18 linux-kernel-headers make module-assistant patch patchutils po-debconf
Die folgenden Pakete werden zurückgehalten:
  base-files bsdutils cpio debconf debconf-i18n e2fslibs e2fsprogs findutils initscripts klibc-utils libblkid1
  libcomerr2 libklibc libpam-modules libpam-runtime libpam0g libss2 libssl0.9.8 libuuid1 linux-image-2.6.18-5-amd64
  locales lvm2 mount sysv-rc sysvinit sysvinit-utils tar tzdata util-linux vim-common vim-tiny
Die folgenden NEUEN Pakete werden zusätzlich installiert:
  build-essential bzip2 cpp cpp-4.1 debconf-utils debhelper dpatch dpkg-dev drbd8-source drbd8-utils fakeroot g++
  g++-4.1 gcc gcc-4.1 gettext gettext-base html2text intltool-debian kernel-package libc6-dev libcompress-zlib-perl
  libmail-sendmail-perl libmudflap0 libmudflap0-dev libssp0 libstdc++6-4.1-dev linux-headers-2.6-xen-amd64
  linux-headers-2.6.18-6-xen linux-headers-2.6.18-6-xen-amd64 linux-kbuild-2.6.18 linux-kernel-headers make
  module-assistant patch patchutils po-debconf
Die folgenden Pakete werden aktualisiert:
  libc6
1 Pakete aktualisiert, 37 zusätzlich installiert, 0 werden entfernt und 31 nicht aktualisiert.
Muss 25,2MB an Archiven herunterladen. Nach dem Entpacken werden 93,9MB zusätzlich belegt sein.
dbxen11:~# m-a a-i drbd8-source
Extracting the package tarball, /usr/src/drbd8.tar.bz2, please wait...
"/usr/share/modass/overrides/drbd8-source" build KVERS=2.6.18-6-xen-amd64 KSRC=/lib/modules/2.6.18-6-xen-amd64/build KDREV=2.6.18.dfsg.1-18etch1 kdist_image
Fertig mit /usr/src/drbd8-2.6.18-6-xen-amd64_8.0.7-1~bpo40+1+2.6.18.dfsg.1-18etch1_amd64.deb .
dpkg -Ei /usr/src/drbd8-2.6.18-6-xen-amd64_8.0.7-1~bpo40+1+2.6.18.dfsg.1-18etch1_amd64.deb
Wähle vormals abgewähltes Paket drbd8-2.6.18-6-xen-amd64.
(Lese Datenbank ... 28990 Dateien und Verzeichnisse sind derzeit installiert.)
Entpacke drbd8-2.6.18-6-xen-amd64 (aus .../drbd8-2.6.18-6-xen-amd64_8.0.7-1~bpo40+1+2.6.18.dfsg.1-18etch1_amd64.deb) ...
Richte drbd8-2.6.18-6-xen-amd64 ein (8.0.7-1~bpo40+1+2.6.18.dfsg.1-18etch1) ...
dbxen11:~# ls -Altr /usr/src/
insgesamt 248
drwxr-xr-x  3 root root   4096 2008-01-20 17:22 modules
-rw-r--r--  1 root root 121882 2008-01-20 17:22 drbd8.tar.bz2
drwxr-xr-x 17 root root   4096 2008-03-06 23:35 linux-headers-2.6.18-6-xen
drwxr-xr-x  3 root root   4096 2008-03-06 23:35 linux-kbuild-2.6.18
drwxr-xr-x  4 root root   4096 2008-03-06 23:35 linux-headers-2.6.18-6-xen-amd64
lrwxrwxrwx  1 root src      41 2008-03-06 23:35 linux -> /usr/src/linux-headers-2.6.18-6-xen-amd64
-rw-r--r--  1 root src  102638 2008-03-06 23:35 drbd8-2.6.18-6-xen-amd64_8.0.7-1~bpo40+1+2.6.18.dfsg.1-18etch1_amd64.deb
dbxen11:~#
 
dbxen11:~# cd /lib/modules/
dbxen11:/lib/modules# find . | grep drbd
./2.6.18-6-xen-amd64/kernel/extra/drbd.ko
dbxen11:/lib/modules# depmod -a
dbxen11:/lib/modules# modprobe drbd
dbxen11:/lib/modules# tail -20 /var/log/messages
Mar  6 23:19:40 dbxen11 kernel: Filesystem "dm-0": Disabling barriers, not supported by the underlying device
Mar  6 23:19:40 dbxen11 kernel: XFS mounting filesystem dm-0
Mar  6 23:19:40 dbxen11 kernel: Adding 4194296k swap on /dev/mapper/rootvg-lvswap.  Priority:-1 extents:1 across:4194296k
Mar  6 23:19:40 dbxen11 kernel: processor: Unknown symbol pm_idle
Mar  6 23:19:40 dbxen11 kernel: ACPI: Power Button (FF) [PWRF]
Mar  6 23:19:40 dbxen11 kernel: ACPI: Power Button (CM) [PWRB]
Mar  6 23:19:40 dbxen11 kernel: processor: Unknown symbol pm_idle
Mar  6 23:19:40 dbxen11 kernel: thermal: Unknown symbol acpi_processor_set_thermal_limit
Mar  6 23:19:40 dbxen11 kernel: NET: Registered protocol family 10
Mar  6 23:19:40 dbxen11 kernel: lo: Disabled Privacy Extensions
Mar  6 23:19:40 dbxen11 kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready
Mar  6 23:19:40 dbxen11 kernel: IPv6 over IPv4 tunneling driver
Mar  6 23:19:43 dbxen11 kernel: tg3: eth0: Link is up at 1000 Mbps, full duplex.
Mar  6 23:19:43 dbxen11 kernel: tg3: eth0: Flow control is on for TX and on for RX.
Mar  6 23:19:43 dbxen11 kernel: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Mar  6 23:24:25 dbxen11 kernel: Bridge firewalling registered
Mar  6 23:39:01 dbxen11 kernel: drbd: initialised. Version: 8.0.7 (api:86/proto:86)
Mar  6 23:39:01 dbxen11 kernel: drbd: GIT-hash: cf14288833afe95db396075f8530a5960d29e498 build by phil@mescal, 2007-11-02 13:15:41
Mar  6 23:39:01 dbxen11 kernel: drbd: registered as block device major 147
Mar  6 23:39:01 dbxen11 kernel: drbd: minor_table @ 0xffff8800198bc2c0

Fehlermeldungen wie thermal, processor etc. ausschalten, ipv6 auch.
(http://www.docunext.com/blog/2007/06/23/dectop-debian-tips/)

“/etc/modprobe.d/blacklist”

blacklist fan
blacklist processor
blacklist thermal
blacklist 8250_pnp
deb10:~# /etc/init.d/drbd start
  --==  Thank you for participating in the global usage survey  ==--
The server's response is:
 
you are the 909th user to install this version
 
In the future drbdadm will only contact usage.drbd.org when you update
DRBD or when you use 'drbdadm create-md'. Of course it will continue
to ask you for confirmation as long as 'usage-count' is at its default
value of 'ask'.
 
Just press [enter] to continue: 
Starting DRBD resources:    In resource r0:
        resource 'r2' mentioned in 'after' option is not known.
WARN:
  You are using the 'drbd-peer-outdater' as outdate-peer program.
  If you use that mechanism the dopd heartbeat plugin program needs
  to be able to call drbdsetup and drbdmeta with root privileges.
 
  You need to fix this with these commands:
  chgrp haclient /sbin/drbdsetup
  chmod o-x /sbin/drbdsetup
  chmod u+s /sbin/drbdsetup
 
 
WARN:
  You are using the 'drbd-peer-outdater' as outdate-peer program.
  If you use that mechanism the dopd heartbeat plugin program needs
  to be able to call drbdsetup and drbdmeta with root privileges.
 
  You need to fix this with these commands:
  chgrp haclient /sbin/drbdmeta
  chmod o-x /sbin/drbdmeta
  chmod u+s /sbin/drbdmeta
deb10:~# drbdadm create-md r0
WARN:
  You are using the 'drbd-peer-outdater' as outdate-peer program.
  If you use that mechanism the dopd heartbeat plugin program needs
  to be able to call drbdsetup and drbdmeta with root privileges.
 
  You need to fix this with these commands:
  chgrp haclient /sbin/drbdsetup
  chmod o-x /sbin/drbdsetup
  chmod u+s /sbin/drbdsetup
 
 
WARN:
  You are using the 'drbd-peer-outdater' as outdate-peer program.
  If you use that mechanism the dopd heartbeat plugin program needs
  to be able to call drbdsetup and drbdmeta with root privileges.
 
  You need to fix this with these commands:
  chgrp haclient /sbin/drbdmeta
  chmod o-x /sbin/drbdmeta
  chmod u+s /sbin/drbdmeta
 
 
v08 Magic number not found
v07 Magic number not found
About to create a new drbd meta data block
on /dev/sda3.
 
 ==> This might destroy existing data! <==
 
Do you want to proceed?
[need to type 'yes' to confirm] yes
 
Creating meta data...
initialising activity log
NOT initialized bitmap (6844 KB)
New drbd meta data block sucessfully created.
success
deb10:~#
$ cat /proc/drbd
version: 8.0.7 (api:86/proto:86)
GIT-hash: cf14288833afe95db396075f8530a5960d29e498 build by phil@mescal, 2007-11-02 13:15:41
 0: cs:Connected st:Secondary/Secondary ds:Inconsistent/Inconsistent C r---
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
        resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0
 1: cs:Connected st:Secondary/Secondary ds:Inconsistent/Inconsistent C r---
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
        resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0

* drbdadm primary all

State change failed: (-2) Refusing to be Primary without at least one UpToDate disk
Command 'drbdsetup /dev/drbd0 primary' terminated with exit code 11
drbdsetup exited with code 11

* drbdadm — –overwrite-data-of-peer primary all

drbdadm -- --overwrite-data-of-peer primary all
version: 8.0.7 (api:86/proto:86)
GIT-hash: cf14288833afe95db396075f8530a5960d29e498 build by phil@mescal, 2007-11-02 13:15:41
 0: cs:SyncSource st:Primary/Secondary ds:UpToDate/Inconsistent C r---      
    ns:807844 nr:0 dw:0 dr:812032 al:0 bm:48 lo:1 pe:187 ua:131 ap:0
        [>...................] sync'ed:  0.4% (218127/218910)M        
        finish: 1:24:13 speed: 44,156 (44,548) K/sec                    
        resync: used:1/31 hits:50385 misses:50 starving:0 dirty:0 changed:50
        act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0
 1: cs:PausedSyncS st:Primary/Secondary ds:UpToDate/Inconsistent C rap-
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
        resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0

Addons

* aptitude install heartbeat-2
* Heartbeat erlauben drbd Befehle auszuführen
* chgrp haclient /sbin/drbdmeta
* chmod o-x /sbin/drbdsetup
* chmod u+s /sbin/drbdsetup

Powered by WordPress ( WordPress Deutschland )