Posts

Showing posts from June, 2011

EMC, Device-mapper multipath, Linux

Install device-mapper-multipath: yum install device-mapper-multipath Check udev package: rpm -q udev Load Multipath: #modprobe dm_multipath #lsmod grep multi dm_multipath 21577 0 dm_mod 56537 13 dm_multipath,dm_snapshot,dm_zero,dm_mirror

Drupal Notes:

Install: package needed: 1) yum install php-mbstring (unicode lib) Process to migrate the live site: Configure the new servers to reverse-proxy Drupal requests to the old servers Switch DNS from the old load balancer to the new one. Put the site in read-only mode just long enough to transfer the database Do a final database load on the new DB server

Performace tool

On Linux : iostat (IO status) vmstat (Memory) mpstat (CPU) mpstat -P ALL (all cores CPU) top sar Top 10 CPU uage: ps -eo pcpu,pid,user,args sort -k 1 -r head 10 or ps -eo pcpu,pid,user,args sort -r -k1 less who is using the CPU ps -e -o pcpu,cpu,nice,state,cputime,args –sort pcpu sed ‘/^ 0.0 /d’ check CPU: cat /proc/cpuinfo less /proc/interrupts ls /sys/devices/system/cpu

Change the Solaris Zone

1> Rename the zone (not rename the server name) a> shutdown the zone : # zoneadm -z halt b> Change the configuration: # cd /etc/zones # mv .xml .xml # vi .xml # cd /export/zones # mv c> Boot the zone: # zoneadm -z boot 2> Change the server name: (two ways to do it) a> during the zone up b> during the zone down # cd /export/zones/ /root # vi /etc/hosts # vi /etc/nodename # vi /etc/hostname. more info: http://www.softpanorama.org/Solaris/Virtualization/zones.shtml

Create new solaris zone

How to create Solaris Zone 1> Created a Zone Home directory mkdir -p /export/zones/ 2> Change premission chmod 700 /export/zones/ 3> Configure the the Zone zonecfg -z (in our case, we call the zone_name as sunrmg zonecfg:sunrmg> create zonecfg:sunrmg> set zonepath=/export/home/sunrmg zonecfg:sunrmg> add net zonecfg:sunrmg:net> set address=xxx.xxx.xxx.xxx zonecfg:sunrmg:net> set physical=ce0 zonecfg:sunrmg:net> end zonecfg:sunrmg> set autoboot=true (The above information is sufficient to configure a basic zone, with most software shared from the global zone. Other options could have been used, for example to inherit parts of the Global zone's file system, mount directories (e.g. /software) from the Global zone, restrict the zone's resources (e.g. CPU, memory)) zonecfg:sunrmg> info zonepath: /export/zones/sunrmg autoboot: true pool: inherit-pkg-dir: dir: /lib inherit-pkg-dir: dir: /platform inherit-pkg-dir: dir: /sbin inherit-pkg-dir: dir: /usr ne