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 Unix
So you just logged into your unix system and you started typing and then oops you typed a wrong letter I mean charater.
root@server# ssfdkjfkjf^?^?^?^?
What are those funky charaters at the end, yup they are me trying to use the back space, but I just end up getting further away from the charaters that I am tryign to delete.
So now for the majick solution.
root@server# stty erase ^?
so the command stty sets options for the terminal session. Then you are telling it what key you want to use to erase with. Which is what the ^? is the erase key being used, so type stty erase space key then back space key then Enter, and you should be back to sanity once again.
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:05 am
· Filed under Linux, Unix
So you go to use crontab -e and you get some strange stuff at the bottom of the line. Yup you are in ee, which is even older then vi. This can often happen when you are using a serial connection, and even when using ssh. This is a simple fix, with examples below.
TERM=vt100 ; export TERM ; EDITOR=vi;export EDITOR
user@server:~$ echo $TERM
xterm
user@server:~$ TERM=vt100 ; export TERM ; EDITOR=vi;export EDITOR
user@server:~$ echo $TERM
vt100
Permalink