Create a ipmp group over tagged VLANS

this is over nxge4 and nxge10, vlan503 and vlan800, IMPORTANT: reboot after placing files

 /etc/hostname.nxge503004
 crmdev41/26 netmask + broadcast + group crmdevnew1 deprecated -failover up
 addif crmdev/26 netmask + broadcast + failover up
/etc/hostname.nxge503010
 crmdev42/26 netmask + broadcast + group crmdevnew1 deprecated -failover standby
/etc/hostname.nxge800004
 crmdev11/26 netmask + broadcast + group crmdev10new deprecated -failover up
 addif crmdev10/26 netmask + broadcast + failover up
/etc/hostname.nxge800010
 crmdev12/26 netmask + broadcast + group crmdev10new deprecated -failover standby

Script to create FLARs

This one will login to a list of servers and create a flar in a NFS share

#!/bin/ksh

for h in `cat hosts.txt`;do
        echo "----------------------- $h"
cat <<EOF  > /tmp/$h
mkdir -p /b; mount -F nfs 10.80.120.219:/space /b; ls /b
time flarcreate -n "$h" -c -S -R / /b/flars/$h.flar
umount /b
EOF
scp /tmp/$h $h:/tmp
ssh $h /tmp/$h
done

Rsync many solaris server’s non-OS filesystems in parallel

This one will run rsyncs in the background for each host it finds in hosts.txt, and save each host’s progress in a log.

#!/bin/ksh
for h in `cat hosts.txt`;do
 echo "----------------------- $h"
 (
 ssh $h df -k | egrep -v 'cdrom|^Filesystem|/$|/devices$|/system/contract$|/proc$|/etc/mnttab$|/etc/svc/volatile$|/system/object$|/etc/dfs/sharetab$|/dev/fd$|/tmp$|/var$|/var/run$|/dev/vx/dmp$|/dev/vx/rdmp$|/cores$|/var/crash$' | awk '{ print $NF }' | while read l;do
 mkdir -p /space/$h$l
 echo "rsync --progress -zrtva $h:$l/ /space/$h$l/"
 rsync --progress -zrtva $h:$l/ /space/$h$l/
 done
 ) 2>&1 > ${h}.log &
 done

Reduce VirtualBox vdi image

if your vdi is larger than the space you’re using, you can reduce its size by installing “zerofree” inside your vm, and booting it in “recovery”, “failsafe” or “single user” mode, remount your “/” filesystem readonly, and supposing “/” is in /dev/sda1

# zerofree /dev/sda1

Shutdown your vm and in the VirtualBox host

# VBoxManage modifyhd linuxy.vdi compact

Solaris Trusted Extensions

To disable:

– for each zone

zonecfg -z thezone export > thezone.zcfg
zoneadm -z thezone halt
zoneadm -z thezone detach
zonecfg -z thezone delete

– disable the labeld service

svcadm disable labeld

– reboot the server

– verify with the command “plabel”

– recreate the zones

zonecfg -z thezone -f thezone.zcfg
zoneadm -z thezone attach
zoneadm -z thezone boot