create big concat on svm

#!/bin/ksh
( N=`format < /dev/null | egrep -i 'emc|hit' | wc -l| sed 's/ //g'` /usr/ucb/echo -n "metainit d1 $N " format < /dev/null | egrep -i 'emc|hit' | awk '{ print $2 }' | while read d;do /usr/ucb/echo -n "1 ${d}s2 " done echo "" ) > /tmp/makevol.ksh
chmod 755 /tmp/makevol.ksh

“swapon -s” shows swap spaces as “(deleted)” if these are lvm volumes

[root@mylinux]# swapon -s
Filename Type Size Used Priority
/dev/systemvg/swapvol (deleted) partition 4095992 0 -3
According to http://kbase. redhat.com/faq/FAQ_79_4331.shtm we need to
add “swapoff -a && swapon -a” to the end of /etc/rc.d/rc. sysinit
We can also run
#swapoff -a && swapon -a
To fix it live, and we’ll see:
[root@mylinux]# swapon -s
Filename Type Size Used Priority
/dev/systemvg/swapvol partition 4095992 0 -3
114/433

changing a label from EFI to SMI

If your slice 2 is empty and you got partitions 0-9 in your disk when checkign it in “format”, you have an EFI label.
If you want to change it to a SMI label, you need to use “format -e” and when prompted for the label type,
choose SMI
partition> label
[0] SMI Label
[1] EFI Label
Specify Label type[1]: 0
Warning: This disk has an EFI label. Changing to SMI label will erase all
current partitions.
Continue? y
Auto configuration via format.dat[no]?
Auto configuration via generic SCSI-2[no]?
partition>
68/433

Quick and dirty script to query NIC speed

I already have a script like this in "miniexplorer", but it generates html and that may be overkill, so this is a quickie one to
 query all network card ports in your solaris server about NIC speed.
 
#!/bin/ksh
 ifconfig -a | grep flags | grep -v 'lo' |awk -F: '{ print $1 }' |uniq|while read IF;do
 D=`echo $IF| sed s/[0-9,:]*$//`
 IN=`echo $IF| sed 's/^[a-z]*//'`
 echo "$D $IN -------------------------------------------------"
 ndd -set /dev/$D instance $IN
 (ndd -get /dev/$D ?|awk '$1!~/^?/{print$1}'|while read p;do
 /usr/ucb/echo -n $p:;ndd -get /dev/$D $p;
 done
 kstat ${D}:${IN}) | egrep 'adv|link|speed' |sed 's/ //g'
 done