[[solaris]]
 

Network Speed and Duplexity

Report the current speed and duplexity of a NIC, in this case, hme0

ndd -set /dev/hme instance 0
ndd -get /dev/hme link_speed
ndd -get /dev/hme link_mode

Link speed:

  • 0 means 10mbit.
  • 1 means 100mbit.
  • 1000 means 1000mbit.

Link Mode:

  • 0 means half duplex.
  • 1 means full duplex.

Setting the following in /etc/system forces all hme interfaces to be forced 100mbit Full Duplex.

set hme:hme_adv_autoneg_cap=0
set hme:hme_adv_100hdx_cap=0
set hme:hme_adv_100fdx_cap=1

To set only specific interfaces on boot, you need to run ndd -set on boot, as /etc/system doesn’t handle specific hme1/hme2 interfaces.

From the command line, to make hme1 100mbit Full Duplex:

ndd -set /dev/hme instance 1
ndd -set /dev/hme adv_autoneg_cap 0
ndd -set /dev/hme adv_100hdx_cap 0
ndd -set /dev/hme adv_100fdx_cap 1

Solaris 10

dladm show-dev ce0

Swapping disks from one slot to another and having it still bootable.

Example: Ultra 1. Root Disk is in c0t0d0s0 and needs to be moved to c0t1d0s0 so a full height disk can be put in c0t0 (the bottom sled).

Add a 2nd disk in the slot you want to move to.

boot -r or drvconfig;devlinks;disks;format and see if the disk is there.

Change /etc/vfstab, shutdown, move disks. boot up.

at openboot :”boot disk1:a” and “setenv boot-device disk1:a”

Reboot again to get savecore and dumpadm happy.

Thanks to Brandon Butterworth for his assistance.

Solaris Tunables for Running Oracle/DB2/MySQL etc.

Taken from “Configuring and Tuning Databases on the Solaris Platform” by Allan N Packer. /etc/system:

      set pt_cnt=1024
      set msgsys:msginfo_msgmax=65535
      set msgsys:msginfo_msgmnb=65535
      set msgsys:msginfo_msgmap=3002
      set msgsys:msginfo_msgmni=2000
      set msgsys:msginfo_msgssz=16
      set msgsys:msginfo_msgtql=8192
      set msgsys:msginfo_msgseg=16384
      set semsys:seminfo_semmap=1026
      set semsys:seminfo_semmsl=1000
      set semsys:seminfo_semmns=2500
      set semsys:seminfo_semmnu=2500
      set semsys:seminfo_semume=2500
      set semsys:seminfo_semmni=2500
      set semsys:seminfo_semopm=150
      set semsys:seminfo_semvmx=32767
      set shmsys:shminfo_shmmax=0xFFFFFFFF
      set shmsys:shminfo_shmmni=1024
      set shmsys:shminfo_shmseg=48
      set maxphys=1048576

Solaris keyboard removal

Normally, if a Sun box is booted with a keyboard attached and then you remove it once the machine is up, the machine drops to openboot. To stop this, add to

/etc/system

set abort_enable=true

/etc/default/kbd

KEYBOARD_ABORT=disable 

Updating the BIOS in an ultra 5/10

cp flash*latest /
chmod 755 /flash*latest
drop to OpenBoot
Power off
Move JP2 to 2+3
Power on
Stop A
copy down output of printenv
boot disk /flash-update-ultra5/10-latest
version
poweroff
Move JP2 to 1+2
Delete the flash update files.

Troubleshooting

/usr/sbin/snoop is very handy for telling you what’s going on TCP, NFS wise.

Mirroring a mounted root FS with meta tools

d10|-d20   c1t0d0s0
   |-d30   c1t2d0s0

d10 is the main mirror with d20 and d30 as the submirrors.
d20 is the existing root fs, mounted as we start.
d30 is a partition the exact same size as d20, but blank.
prtvtoc /dev/rdsk/c1t0d0s0 | fmthard -s - /dev/rdsk/c1t1d0s0 - Copy Partition table from orginal disk to mirror
metadb -a -f -c2 /dev/dsk/c1t0d0s7 /dev/dsk/c1t1d0s7 - Install MetaDBs on 2 disks for now, add more later.
metainit -f d20 1 1 c1t0d0s0 - Create mirror of root FS
metainit d30 1 1 c1t1d0s0 - Create blank submirror
metainit d10 -m d20 - Create mirror containing one submirror of root FS
metaroot d10 - Set machine to boot from the main mirror
lockfs -fa - Keep the mirror and FS in sync
reboot 
metattach d10 d30 - Attach blank submirror to main mirror
metastat - Wait for them to sync up
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s0 - Install a bootblock (so the disk is bootable) to the 2nd mirror disk
 
solaris.txt · Last modified: 2007/02/16 15:17 by gavin
 
Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki