Difference between revisions of "Server Dell PowerEdge T410"

From YobiWiki
Jump to navigation Jump to search
m
 
(35 intermediate revisions by 2 users not shown)
Line 17: Line 17:
 
** Reboot
 
** Reboot
 
* SSH: PermitRootLogin no / ssh-copy-id ...
 
* SSH: PermitRootLogin no / ssh-copy-id ...
* Install mc, sudo (adduser xxx sudo)
+
* Install mc, screen, sudo (adduser xxx sudo)
 
* Renaming interfaces (always easier to remember what's plugged where...)
 
* Renaming interfaces (always easier to remember what's plugged where...)
 
** à la ifrename
 
** à la ifrename
Line 29: Line 29:
 
*** actually we don't need ifrename because udev is now doing the same, see /etc/udev/rules.d/70-persistent-net.rules, you can simply change the NAME key
 
*** actually we don't need ifrename because udev is now doing the same, see /etc/udev/rules.d/70-persistent-net.rules, you can simply change the NAME key
 
** Be sure the old name is not used anywhere else in your config, typically in /etc/network/interfaces
 
** Be sure the old name is not used anywhere else in your config, typically in /etc/network/interfaces
  +
==Xen==
===XEN: installation===
 
  +
===Installation===
* see [http://wiki.debian.org/Xen notes on Debian wiki]
 
  +
See [[Xen]] Installation notes
* aptitude install linux-image-2.6.32-5-xen-amd64 xen-tools xen-utils
 
  +
* backup /etc/xen/xend-config.sxp
 
  +
Edit /etc/default/xendomains and change XENDOMAINS_SAVE=/var/lib/xen/save to:
* edit /etc/xen/xend-config.sxp, and uncomment line "(network-script network-bridge)" or for a non-default interface ethX: "(network-script 'network-bridge netdev=ethX')"
 
  +
XENDOMAINS_SAVE=""
* reboot
 
  +
===Sagemath guest===
* aptitude remove --purge linux-image-2.6.32-5-amd64 linux-image-2.6-amd64
 
  +
* xen-create-image --hostname=sagemath --memory=12G --swap=12G --vcpus=20
* /etc/default/grub => GRUB_DEFAULT=2
 
  +
* lvm> lvcreate -L 1000G -n sagemath-data vg0
* update-grub
 
  +
* /etc/xen/sagemath.cfg: add data volume:
* reboot
 
  +
root = '/dev/xvda2 ro'
* cat /proc/xen/capabilities #(to check xend is running)
 
  +
disk = [
===XEN: guest creation===
 
  +
'phy:/dev/vg0/sagemath-disk,xvda2,w',
* If you've a proxy it's much easier to have it defined in the environment variables:
 
  +
'phy:/dev/vg0/sagemath-swap,xvda1,w',
** Edit /etc/environment
 
  +
+ 'phy:/dev/vg0/sagemath-data,xvda3,w',
http_proxy=http://myproxy:port
 
  +
]
** Logout/login
 
  +
* Edit the config file for creating images (/etc/xen-tools/xen-tools.conf) to your needs:
 
  +
* mkdir -p /etc/xen/auto
<source lang=diff>
 
  +
* ln -s /etc/xen/sagemath.cfg /etc/xen/auto
--- xen-tools.conf.orig 2010-05-30 22:42:25.000000000 +0200
 
  +
* xm create -c /etc/xen/sagemath.cfg
+++ xen-tools.conf 2010-08-17 17:47:35.000000000 +0200
 
  +
* Hook the data drive as /home
@@ -52,7 +52,7 @@
 
  +
** mkfs.ext4 /dev/xvda3
# LVM volume group here instead
 
  +
** In /etc/fstab: /dev/xvda3 /home ext4 noatime,nodiratime,errors=remount-ro 0 1
#
 
  +
** mount /home
##
 
  +
* Install sage
-# lvm = vg0
 
  +
** apt-get install aria2
+lvm = vg0
 
  +
** cd /opt
 
  +
** aria2c http://www.sagemath.org/mirror/linux/64bit/meta/sage-4.5.2-linux-64bit-ubuntu_10.04_lts-x86_64-Linux.tar.lzma.metalink
 
  +
** tar x --lzma -f sage-4.5.2-linux-64bit-ubuntu_10.04_lts-x86_64-Linux.tar.lzma
#
 
  +
** cd sage-4.5.2-linux-64bit-ubuntu_10.04_lts-x86_64-Linux
@@ -125,12 +125,12 @@
 
  +
** Edit sage and set SAGE_ROOT="/opt/sage-4.5.2-linux-64bit-ubuntu_10.04_lts-x86_64-Linux"
# Disk and Sizing options.
 
  +
** ./sage
##
 
  +
** sage> notebook.setup()<br>Provide FQDN for TLS certificate generation
#
 
  +
===Backuppc guest===
-size = 4Gb # Disk image size.
 
  +
* xen-create-image --hostname=backuppc --memory=1G --swap=1G --vcpus=20
+size = 8Gb # Disk image size.
 
  +
* lvm> lvcreate -L 200G -n backuppc-data vg0
memory = 128Mb # Memory size
 
  +
* /etc/xen/backuppc.cfg: fix MAC address if needed and add data volume:
swap = 128Mb # Swap size
 
  +
root = '/dev/xvda2 ro'
# noswap = 1 # Don't use swap at all for the new system.
 
  +
disk = [
fs = ext3 # use the EXT3 filesystem for the disk image.
 
  +
'phy:/dev/vg0/backuppc-disk,xvda2,w',
-dist = `xt-guess-suite-and-mirror -s` # Default distribution to install.
 
  +
'phy:/dev/vg0/backuppc-swap,xvda1,w',
+dist = squeeze # Default distribution to install.
 
  +
+ 'phy:/dev/vg0/backuppc-data,xvda3,w',
image = sparse # Specify sparse vs. full disk images.
 
  +
]
 
  +
#
 
  +
* mkdir -p /etc/xen/auto
@@ -166,7 +166,7 @@
 
  +
* ln -s /etc/xen/backuppc.cfg /etc/xen/auto
#
 
  +
* xm create -c /etc/xen/backuppc.cfg
# Uncomment this if you wish the images to use DHCP
 
  +
* Hook the data drive as /home
#
 
  +
** mkfs.ext4 /dev/xvda3
-# dhcp = 1
 
  +
** In /etc/fstab: /dev/xvda3 /home ext4 noatime,nodiratime,errors=remount-ro 0 1
+dhcp = 1
 
  +
** mount /home
 
  +
* Install backuppc
 
  +
** apt-get install backuppc
##
 
  +
See also [[BackupPc]] for installation notes
@@ -254,10 +254,10 @@
 
  +
* /etc/init.d/backuppc stop
#
 
  +
* mv /var/lib/backuppc /home
# You may specify the things to use here:
 
  +
* ln -s /home/backuppc /var/lib
#
 
  +
-# serial_device = hvc0 #default
 
  +
==Misc notes==
+serial_device = hvc0 #default
 
  +
===Boot & DHCP===
# serial_device = tty1
 
  +
I've still sometimes some issues at boot time when the xenbr0 bridge doesn't catch its IP...
#
 
  +
<br>In those cases I find dhclient still hooked to the non-existing bnx1 IF (which was renamed pbnx1 by XEN). I've to kill it and start a similar dhclient on IF xenbr0.
-# disk_device = xvda #default
 
  +
<br>Finally I renamed the default interface as eth0 and called the xen bridge script without parameters: (network-script network-bridge)
+disk_device = xvda #default
 
  +
# disk_device = sda
 
  +
===Hyperthreading===
#
 
  +
I'm not sure if in the long run it'll help but given that there are already 12 CPUs, I've disabled the logical CPU support in the BIOS.
</source>
 
  +
===SSH===
* xen-create-image --hostname=mynewguest
 
  +
Connecting directly as root is useful e.g. to run X11 programs such as xenwatch, xenstore-gtk and a local root password is usually needed for local console access but I don't' want to leave ssh+root+pwd so, edit /etc/ssh/sshd_config:
  +
PermitRootLogin yes
  +
Match User root
  +
PasswordAuthentication no
  +
PubkeyAuthentication yes

Latest revision as of 11:13, 7 April 2011

Manuals

  • here, online version of the main manual here with chapter on LED status here

Install notes

BIOS

    • Activate Virtualization support
    • Power Management -> OS Control
    • Report kbd errors: NO

Debian Squeeze

Still testing at time of writing but frozen so almost stable ;-)

  • Installing squeeze from daily image (17/08/2010)
    • Complains about missing bnx2/bnx2-mips-09-5.0.0.j3.fw & bnx2/bnx2-rv2p-09-5.0.0.j3.fw
      • Get it on another machine and put it on USB stick: aptitude install firmware-bnx2 ; cp /lib/firmware/bnx2/bnx2-*-09-5.0.0.j3.fw /media/XXXX
      • Actually I had also an additional Intel network card so I could have skipped this step...
    • Partitionning:
      there is a first primary partition for Dell Utilities (FAT16), I left it just in case...;
      there is also a second primary partition: 2Gb of FAT32, empty, so I deleted it.
      partition #2: primary 10Gb ext3 / label=ROOT
      partition #3: primary 16Gb swap
      partition #5: logical 2Tb physical volume for LVM
      Configure LVM / ok to write table / Create VG with sda5, called vg0 (will be used by XEN)
    • Tasksel: SSH & standard utilities
    • Reboot
  • SSH: PermitRootLogin no / ssh-copy-id ...
  • Install mc, screen, sudo (adduser xxx sudo)
  • Renaming interfaces (always easier to remember what's plugged where...)
    • à la ifrename
      • aptitude install ifrename
      • Create /etc/iftab then reboot
intelG mac 00:1b:21:xx:xx:xx
intelD mac 00:1b:21:xx:xx:xx
bcm1   mac 84:2b:2b:xx:xx:xx
bcm2   mac 84:2b:2b:xx:xx:xx
    • à la udev
      • actually we don't need ifrename because udev is now doing the same, see /etc/udev/rules.d/70-persistent-net.rules, you can simply change the NAME key
    • Be sure the old name is not used anywhere else in your config, typically in /etc/network/interfaces

Xen

Installation

See Xen Installation notes

Edit /etc/default/xendomains and change XENDOMAINS_SAVE=/var/lib/xen/save to:

XENDOMAINS_SAVE=""

Sagemath guest

  • xen-create-image --hostname=sagemath --memory=12G --swap=12G --vcpus=20
  • lvm> lvcreate -L 1000G -n sagemath-data vg0
  • /etc/xen/sagemath.cfg: add data volume:
 root        = '/dev/xvda2 ro'
 disk        = [
                   'phy:/dev/vg0/sagemath-disk,xvda2,w',
                   'phy:/dev/vg0/sagemath-swap,xvda1,w',
+                  'phy:/dev/vg0/sagemath-data,xvda3,w',
               ]
  • mkdir -p /etc/xen/auto
  • ln -s /etc/xen/sagemath.cfg /etc/xen/auto
  • xm create -c /etc/xen/sagemath.cfg
  • Hook the data drive as /home
    • mkfs.ext4 /dev/xvda3
    • In /etc/fstab: /dev/xvda3 /home ext4 noatime,nodiratime,errors=remount-ro 0 1
    • mount /home
  • Install sage

Backuppc guest

  • xen-create-image --hostname=backuppc --memory=1G --swap=1G --vcpus=20
  • lvm> lvcreate -L 200G -n backuppc-data vg0
  • /etc/xen/backuppc.cfg: fix MAC address if needed and add data volume:
 root        = '/dev/xvda2 ro'
 disk        = [
                   'phy:/dev/vg0/backuppc-disk,xvda2,w',
                   'phy:/dev/vg0/backuppc-swap,xvda1,w',
+                  'phy:/dev/vg0/backuppc-data,xvda3,w',
               ]
  • mkdir -p /etc/xen/auto
  • ln -s /etc/xen/backuppc.cfg /etc/xen/auto
  • xm create -c /etc/xen/backuppc.cfg
  • Hook the data drive as /home
    • mkfs.ext4 /dev/xvda3
    • In /etc/fstab: /dev/xvda3 /home ext4 noatime,nodiratime,errors=remount-ro 0 1
    • mount /home
  • Install backuppc
    • apt-get install backuppc

See also BackupPc for installation notes

  • /etc/init.d/backuppc stop
  • mv /var/lib/backuppc /home
  • ln -s /home/backuppc /var/lib

Misc notes

Boot & DHCP

I've still sometimes some issues at boot time when the xenbr0 bridge doesn't catch its IP...
In those cases I find dhclient still hooked to the non-existing bnx1 IF (which was renamed pbnx1 by XEN). I've to kill it and start a similar dhclient on IF xenbr0.
Finally I renamed the default interface as eth0 and called the xen bridge script without parameters: (network-script network-bridge)

Hyperthreading

I'm not sure if in the long run it'll help but given that there are already 12 CPUs, I've disabled the logical CPU support in the BIOS.

SSH

Connecting directly as root is useful e.g. to run X11 programs such as xenwatch, xenstore-gtk and a local root password is usually needed for local console access but I don't' want to leave ssh+root+pwd so, edit /etc/ssh/sshd_config:

PermitRootLogin yes
Match User root
 PasswordAuthentication no
 PubkeyAuthentication yes