Author Archives: Dave - Page 5

sFlow XenServer

Download iso

http://sourceforge.net/projects/host-sflow/files/REL-1_22/

HERE!

mount and install.

service hsflowd start
service sflowovsd start

chkconfig hsflowd on
chkconfig sflowovsd on

edit conf file

nano /etc/hsflowd.conf

agent = xenbr0

DNSSD = off
polling = 20
sampling = 512

collector {
ip = 10.1.1.x
udpport = 6343
}

service hsflowd restart

Rackable IPMI reset

Rackable half size servers pack unbelievable punch per $$$. However finding resources for these servers is almost impossible.

We came across a number of these and had a very hard time cracking the IPMI. Below are the steps to reset the password of the IPMI so you can gain access via the web console.

1. Power on the server and go into the bios and setup the BMC/IPMI LAN config.
2. Plug a cat 5 cable into IPMI port.
3. Load whatever flavour of linux you like onto the server.
4. log into the server and make sure the ipmi drivers are loaded, if there aren’t then ->

modprobe ipmi_msghandler
modprobe ipmi_devintf
modprobe ipmi_si

run lsmod, and make sure the modules have loaded.

then simply run

ipmitool -I open lan set 1 password NEWPASSWORD
ipmitool -I open user set password 2 NEWPASSWORD

this should reset both of the passwords for the root user to NEWPASSWORD

open a web browser and point it to the IPMI IP address you setup in Step 1.

Log in with your new credentials!!!

Resources:
http://serverfault.com/questions/85042/is-it-possible-to-reset-the-password-on-a-supermicro-ipmi-interface
http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/linux/bks/SGI_Admin/books/Guide_AdminXE_AG/sgi_html/ch01.html#Z1165360258tls

Xenserver LVM over iSCSI

Trying to reclaim space from that VM you deleted several months ago?

This is a known issue with Xenserver and iSCSI when snapshots are used.

The short answer is that if you allow your SR to fill up too much, the automatic coalesce leaf operations performed by XS will not be able to be performed as a certain amount of space is required for this function to reclaim space.

The basic rule is that there must be Double the VM size of free space on the SR available for the coalesce function to work.

So if you delete a 100GB VM, you MUST have at least 200GB of free available space on the SR.

minimal centos

Remove those ugly useless packages from your CentOS 6 Server!

http://kyotera.net/2012/02/extra-packages-in-minimal-installation-of-centos-6-2/

gluster path stale usage path

http://joejulian.name/blog/glusterfs-path-or-a-prefix-of-it-is-already-part-of-a-volume/

Using parted to create partitions

http://blog.derakkilgo.com/2010/06/12/warning-the-resulting-partition-is-not-properly-aligned-for-best-performance/

hp sim xenserver agents..

ls -ld /

does it return

drwx—— 24 root root 4096 Feb 5 16:41 /

then execute this!

chmod 755 /

Start all VMs on HOST boot

place the following in /etc/rc.local

sleep 30
xe vm-start tags=autostart –multiple

mark all VMs with autostart tag and they’ll be started!

IPoIB tuning

startup script

in cron
@reboot /etc/path_to_script

script..
#!/bin/bash

echo “connected > /sys/class/net/ib0/mode”
echo “connected > /sys/class/net/ib0/mode”

ibconfig ib0 mtu 65520
ibconfig ib1 mtu 65520

#make sure sdp is loaded… just in case!
/sbin/modprobe ib_sdp

#TCP Tuning for IPOIB
/sbin/sysctl -w net.ipv4.tcp_timestamps=0
/sbin/sysctl -w net.ipv4.tcp_sack=0
/sbin/sysctl -w net.core.netdev_max_backlog=250000
/sbin/sysctl -w net.core.rmem_max=16777216
/sbin/sysctl -w net.core.wmem_max=16777216
/sbin/sysctl -w net.core.rmem_default=16777216
/sbin/sysctl -w net.core.wmem_default=16777216
/sbin/sysctl -w net.core.optmem_max=16777216
/sbin/sysctl -w net.ipv4.tcp_mem=”16777216 16777216 16777216″
/sbin/sysctl -w net.ipv4.tcp_rmem=”4096 87380 16777216″
/sbin/sysctl -w net.ipv4.tcp_wmem=”4096 65536 16777216″

Auto Start VMs on reboot

http://www.raido.be/knowledge-center/blog/detail/xenserver-6-auto-start-vms


# AutoStart VM's that are tagged with autostart tag
# Script created by Raido Consultants - http://www.raido.be
TAG="autostart" # helper function
function xe_param()
{
PARAM=$1
while read DATA; do
LINE=$(echo $DATA | egrep "$PARAM")
if [ $? -eq 0 ]; then
echo "$LINE" | awk 'BEGIN{FS=": "}{print $2}'
fi
done
} # Get all VMs
sleep 20
VMS=$(xe vm-list is-control-domain=false | xe_param uuid) for VM in $VMS; do
echo "Raido AutoStart Script : Checking VM $VM"
VM_TAGS="$(xe vm-param-get uuid=$VM param-name=tags)" if [[ $VM_TAGS == *$TAG* ]]
then
echo "starting VM $VM"
sleep 20
xe vm-start uuid=$VM
fi done

or just do this:

sleep 30
xe vm-start tags=autostart –multiple