“IPv6 support is disabled” warnings

 

最近在使用国内的服务器的时候经常会发现这个问题

其实问题很简单,就是默认来说,国内的服务器没有IPv6, 而postfix 的默认配置文件是有Ipv6的,因为就会出现下面的warning:

send-mail: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
send-mail: warning: inet_protocols: configuring for IPv4 support only
postdrop: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
postdrop: warning: inet_protocols: configuring for IPv4 support only

 

知道问题的出处,解决就简单多了,默认让postfix 只monitor IPv4就可以了

编辑/etc/postfix/main.cf

inet_protocols = all

改成

inet_protocols = ipv4

就完美解决了

香港,荷兰,纽约三地实测对印度的延迟测试

ping india IPs from hong kong

109.73.166.43:263ms
49.50.76.26:114ms
103.21.59.167:93.6ms
202.65.128.19:239ms
202.71.131.8:260ms
43.230.203.206:156ms
43.252.89.151:266

ping india ips from New york
109.73.166.43:212ms
49.50.76.26:304ms
103.21.59.167:200ms
202.65.128.19:212ms
202.71.131.8:2617ms
43.230.203.206:69.7ms
43.252.89.151:212ms

ping india IPs from NL
109.73.166.43:141ms
49.50.76.26:175ms
103.21.59.167:120ms
202.65.128.19:137ms
202.71.131.8:158ms
43.230.203.206:140ms
43.252.89.151:149ms

综合来看,还是欧洲,尤其是UK 对 india 的速度比较好,因为印度的 TATA 集团的网络直连英国

file system on control domain full

这是玩 xenserver 的人经常会碰到的问题,一般来说标准的答案是清除 /tmp 下面的文件,以及/var/log中以.gz 结尾的文件,可以使用如下的命令:

 

rm -rf /tmp/*

rm -rf /var/log/*.gz

 

但是对于经常给xenserver打补丁的人来说,以上的标准的处理方式也许就不行了,删除上面的文件后,你会发现硬盘占有率仍然在90%以上,那么这个时候该怎么办呢?

简单,进入/var/patch, 删除除 applied 目录以外的所有文件,正式这些补丁文件,占据了系统的大部分磁盘。

Xenserver 自动升级

现在我的每台机器都安装了xenserver,但是xenserver 的升级确实是个问题,手动升级确实很恶心。

于是这就有了Darren Gibbard的自动升级程序,拿perl 写的,异常的方便.

code:

wget –no-check-certificate -O patcher.py https://raw.github.com/dalgibbard/citrix_xenserver_patcher/master/patcher.py

chmod +x patcher.py

./patcher.py

一些常用的xenserver 的命令集合

这是在搜索xenserver 的 SR 的问题的时候无意中找到的,很有帮助,对于我这种懒人来说

xe help –all|more
Show a list of XenServer CLI commands

xsconsole
Runs up the XenServer text based console

xe-toolstack-restart
Restarts the XenServer management tools

ls –l
List files in a Directory

less /var/log/dmesg
Display Boot Messages from Linux

xe host-dmesg
Xen Hypervisor Boot messages

tail –f /var/log/xensource.log
Look at xapi messages as they happen

tail –f /var/log/xensource.log | grep xxx
Look at xapi messages only for vm uuid xxx

tail –f [log name] > [target filename]
Send output to a file for analysis later

cat /etc/xensource-inventory
Display XenSource Inventory info

xen-bugtool –yes
Build a status report when xapi is down

xe-backup-metadata -d –u [uuid of SR]
Back up Pool metadata for all VMs

tcpdump –i [inf] –vvv –w [filename]
Get a Packet trace from [inf]. E.g. Inf=eth0, xenbr0, vif2.0 etc.

top
List the top processes running in Dom0

xentop
List top Xen processes

mpstat 5
Processor stats in Dom0

vmstat 2
Virtual memory in Dom0

netstat –s
Networking statistics

iostat -d 2 6
Storage traffic stats

list_domains
Lists VMs that are running

fdisk –l
List the disk partitions

hdparm –t /dev/sda3
Device read times for sda3 (normally local SR)

pvs
Show local and remote LVHD SRs

ll /dev/disks/by-id
Look at disk partitions

lvs
List logical volumes (virtual disks)

vgs
List LVM volume groups

cd /var/run/sr-mount
Look at NFS SRs

df -h
Shows how much disk space you have left

dd if=/dev/sdb of=/dev/null iflag=direct bs=1M count=512
Read data performance from sdb.

dd if=/dev/zero of=/dev/sdb oflag=direct bs=1M count=4096
Write performance on sdb. * Don’t use on disks with VMs on them!

ifconfig
Show info on NICs, virtual switches and vNICs

brctl show
Show info on virtual switches

ethtool eth0
Info for NIC eth0

mii-tool
Info on NIC bonding

iscsiadm -m discovery –type sendtargets –port 192.168.250.14
Discover iSCSI targets available to this server

iscsiadm –m session
Open iscsi sessions

history
Lists the history of commands you’ve used

!136
Executes command #136 in the history

history -w history-list.txt
Writes the history info to a text file

 

一晃一个月已过

 

一晃,回国已经一个多月,现在已经充分的融到了天津这座全国最大的农村之中

现在最喜欢的事,就是早上在海河边上慢跑,右看河边的老大爷们钓鱼,左看马路上匆匆忙忙上班的人们,怡然自得

心也慢慢的静下来,享受生活