August 25, 2008 at 6:10 am
· Filed under Linux, Solaris
In both linux and Solaris and possibly other UNIX’es you can change your dhcp servers simply by editing your /etc/resolv.conf
It should look like below.
search domain.com otherdomain.com
nameserver 192.168.0.1
nameserver 192.168.0.2
The nameserver’s or DNS server will try to be connected to in order from top to bottom. The search domains do not matter if they are at the top or bottom. Search domains are usefull if you dont want to have to type in the whole FQDN (Fully Qualified Domain Name). So instead of typing in “ping sparky.domain.com” you can shorten it to “ping sparky”.
Permalink
July 11, 2008 at 3:16 pm
· Filed under Scripts, Soalris X86, Solaris, Solaris 10, Solaris Sparc, Veritas Volume Manager
1. Detach each submirror
ex. metadetach -f d0 d20
d0: submirror d20 is detached
2. Clear each submirror
ex. metaclear d20
d20: Concat/Stripe is cleared
3. Delete the db replica on the failed drive (you can find the replica output by issuing metadb command with no arguments):
ex. metadb -d c0t2d0s7
4. Remove failed drive. Replace with new drive.
5. Run the format command and place the correct partition table, using the layout of the non-replaced drive.
6. re-create the metadb replica on the new disk
ex. metadb -a c0t2d0s7
7. Run metainit for each replaced submirror
ex. metainit d21 1 1 c0t2d0s1
d21: Concat/Stripe is setup
8. Run metattach for each submirror
ex. metattach d0 d20
d0: submirror d20 is attached
ex. metattach d1 d21
d1: submirror d21 is attached
Permalink
July 11, 2008 at 8:12 am
· Filed under Soalris X86, Solaris, Solaris Sparc
If you want to set the nic speed and duplex of a Solaris machine you need to basically set up a script that wil be run at start up in one of the run levels preferably /etc/rc2.d/
/etc/rc2.d/S70ndd
1000 full duplex autoneg
#!/sbin/sh
#
PATH=/sbin:/usr/bin:/usr/sbin
echo “Configuring Network Interfaces”
interface=bge0
case “$1″ in
# Example setting Gigabit Ethernet to Auto Negotiate
’start’)
ndd -set /dev/$interface adv_1000fdx_cap 1
ndd -set /dev/$interface adv_1000hdx_cap 0
ndd -set /dev/$interface adv_100fdx_cap 0
ndd -set /dev/$interface adv_100hdx_cap 0
ndd -set /dev/$interface adv_10fdx_cap 0
ndd -set /dev/$interface adv_10hdx_cap 0
ndd -set /dev/$interface adv_autoneg_cap 1
;;
esac
exit 0_cap 0
Permalink
July 11, 2008 at 8:11 am
· Filed under Soalris X86, Solaris, Solaris Sparc
So you are trying to unmount a file system for some reason and it just wont let you. It keeps on telling you that it is busy. Whats the deal. You already cd to / so you are not the culprit. So instead of kicking everyone off the box just figure out who the offender is and yell at them.
Excerpt from /var/adm/messages
6 server05 mount[4691]: [ID 612810 user.error] mount: /www: Device busy
Feb 5 07:41:19 server05 mount[4708]: [ID 612810 user.error] mount: /www: Device busy
Feb 5 07:41:43 server05 mount[4717]: [ID 612810 user.error] mount: /www: Device busy
Feb 5 07:43:30 server05 mount[4949]: [ID 612810 user.error] mount: /www: Device busy
Feb 5 07:49:55 server05 mount[5273]: [ID 612810 user.error] mount: /www: Device busy
Feb 5 07:53:39 server05 mount[5656]: [ID 612810 user.error] mount: /www: Device busy
Feb 5 07:54:31 server05 mount[5713]: [ID 612810 user.error] mount: /www: Device busy
use fuser to identify the process that is causing the trouble.
server05% fuser /www
/www: 4053c
server05% ps -ef | grep 4053
abe 4061 4053 0 07:27:20 pts/3 0:00 less access
abe 4053 4031 0 07:26:50 pts/3 0:00 bash
abe 4075 4053 0 07:28:05 pts/3 0:00 less access
abe 4067 4053 0 07:27:42 pts/3 0:01 less access
abe 4122 4053 0 07:28:44 pts/3 0:00 more
abe 4121 4053 0 07:28:44 pts/3 0:00 grep -i keep-a access
louis 6983 6950 0 08:14:57 pts/1 0:00 grep 4053
Permalink
July 9, 2008 at 7:02 am
· Filed under Soalris X86, Solaris, Solaris Sparc
HOW TO CHANGE THE DUMP DIRECOTRY
# dumpadm -d /dev/dsk/c0t0d0s1
Dump content: kernel pages
Dump device: /dev/dsk/c0t0d0s1 (dedicated)
Savecore directory: /var/crash/unknown
Savecore enabled: no
# dumpadm -y
Dump content: kernel pages
Dump device: /dev/dsk/c0t0d0s1 (dedicated)
Savecore directory: /var/crash/unknown
Savecore enabled: yes
Permalink