/etc/opt/SUNWexplor/default/explorer
# Where explorer output should be mailed EXP_EMAIL="explorer-database-americas@sun.com"
Look for an installed package: pkginfo | openssl List all files in a package: pkgchk -l MAGENT | grep Pathname
format - shows all disks, allows partitioning new disks iostat -En # shows disk errorsexit
echo type 20 > format_opts # select proper HD type 20 is for EMC san echo label >> format_opts # this will write the label to the disk format -f ./format_opts -d c4t5d101 format -f ./format_opts -d c4t5d102 format -f ./format_opts -d c4t5d103 format -f ./format_opts -d c4t5d104 format -f ./format_opts -d c4t5d105 format -f ./format_opts -d c4t5d106 format -f ./format_opts -d c4t5d107 format -f ./format_opts -d c4t5d108
/usr/platform/sun4u/sbin/prtdiag -v
vxprint -thr # shows volumes and plexes vxdisk list # shows disk groups and disks vxdisk list <disk> # shows disk info vxdctl vxdmpadm listctlr all # list controllers format inq /usr/sbin/lpfc/lputil # Emulex tool
EMC Agent: pkginfo -l MAGENT /usr/ecc/exec
metastat -p # shows a short configuration
1. Find the bad disk
iostat -En
or
dmesg
2. Where is the metadb located?
metadb -i
3. If that disk is failing, move the metadb to only the good disk
metadb -d /dev/dsk/c#t#d#s# (bad disk)
metadb -a -c 3 /dev/dsk/c#t#d#s# (good disk)
4. Physically replace the bad disk
5. Copy the vtoc from the good mirror to the new disk
prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t0d0s2
or
format and
6. Re-sync the mirror
$ metastat | grep Invoke
Invoke: metareplace d100 c0t1d0s0 <new device>
Invoke: metareplace d101 c0t1d0s1 <new device>
Invoke: metareplace d102 c0t1d0s7 <new device>
Invoke: metareplace d103 c0t1d0s6 <new device>
Invoke: metareplace d104 c0t1d0s5 <new device>
Thus, the commands you need are:
metareplace -e d100 c0t1d0s0
metareplace -e d101 c0t1d0s1
metareplace -e d102 c0t1d0s7
metareplace -e d103 c0t1d0s6
metareplace -e d104 c0t1d0s5
Watch the re-sync
$ metastat | grep %
Resync in progress: 0 % done
Resync in progress: 76 % done
Resync in progress: 0 % done
Resync in progress: 0 % done
Resync in progress: 0 % done
7. Restore the metadb
$metadb -a -c3 /dev/dsk/c#t#d#s#
$ metadb -i
flags first blk block count
a u 16 1034 /dev/dsk/c0t0d0s3
a u 1050 1034 /dev/dsk/c0t0d0s3
a u 16 1034 /dev/dsk/c0t1d0s3
a u 1050 1034 /dev/dsk/c0t1d0s3
a u 2084 1034 /dev/dsk/c0t1d0s3
a u 2084 1034 /dev/dsk/c0t0d0s3
Userfull Commands:
View print queue: lpstat -o printer.domain.net
View printer status: lpstat -p printer.domain.net -l
Stop a print queue: disable <printer-name>
Start a pritn queue: enable <printer-name>
Configuration info:
/etc/printers.conf
ypcat -k printer.conf.byname
/etc/lp/interfaces/<printer-name>
Log Files: /var/lp/logs
Other Files: /var/spool/lp
# lsof -i TCP:7006 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME inetd 827 root 18u IPv4 0x300381944c0 0t0 TCP *:ctmagent (LISTEN) p_ctmat 26027 root 0u IPv4 0x3001b3261d8 0t0 TCP dhextntc2.svr.bankone.net:ctmagent->ino6a003.svr.bankone.net:42775 (CLOSE_WAIT)
New VIP setup. ifconfig ce1:28 plumb ifconfig ce1:29 plumb ifconfig ce1:28 155.180.250.170 netmask 255.255.254.0 broadcast 155.180.251.255 ifconfig ce1:29 155.180.250.171 netmask 255.255.254.0 broadcast 155.180.251.255 ifconfig ce1:28 up ifconfig ce1:29 up Modify Hosts file with the following: 155.180.250.170 pcsssvct.svr.bankone.net 155.180.250.171 pcsssvcdr.svr.bankone.net pcsssvcdr.img.bankone.net #create hostname files with proper naming. echo pcsssvct.svr.bankone.net > /etc/hostname.ce1:28 echo pcsssvcdr.svr.bankone.net > /etc/hostname.ce1:29
Using /net
cd /net/<hostname>/path
lsof | grep -i /{mount}/{point}
# lsof | grep -i /datahubt/u08
oracle 12359 oracle 261uW VREG 0,509542400 /datahubt/u08 (/dev/vx/dsk/dhubt1/u08)
oracle 12359 oracle 262uW VREG 0,533725184 /datahubt/u08 (/dev/vx/dsk/dhubt1/u08)
# ipcs IPC status from <running system> as of Tue Sep 13 15:33:57 EDT 2005 T ID KEY MODE OWNER GROUP Message Queues: Shared Memory: m 0 0x5e002a66 --rw------- root root m 1 0x5643 --rw-rw-rw- root root m 2 0x5654 --rw-rw-rw- root root m 203 0xcace --rw-rw-rw- root other Semaphores: s 0 0x1 --ra-ra-ra- root root s 1 0x5653 --ra-ra-ra- root root s 2 0x73657276 --ra-ra-ra- root root s 65539 0x10057b2 --ra-ra-ra- root root s 131076 0x4500097b --ra-ra-ra- root other s 5 0x45000dca --ra-ra-ra- root other s 6 0xcace --ra-ra-ra- root other s 7 0x450003a5 --ra-ra-ra- root other s 262152 0x45000c22 --ra-ra-ra- root other s 9 0x45000fa3 --ra-ra-ra- root other
NAME
ipcrm - remove a message queue, semaphore set, or shared
memory ID
SYNOPSIS
ipcrm [ -m shmid ] [ -q msqid ] [ -s semid ] [ -M shmkey
] [ -Q msgkey ] [ -S semkey ]
DESCRIPTION
ipcrm removes one or more messages, semaphores, or shared
memory identifiers.
LCFD Restart Procedure
1. ps -ef | grep engine | grep -v grep
img2s003n1 # ps -ef | grep engine | grep -v grep
root 3060 1 0 Jun 29 ? 11:21 dm_ep_engine img2s003n1.svr.bankone.net solaris2 DM362317
2. run the tivoli stop script /etc/rc3.d/S**tiv
img2s003n1 # cd /etc/rc3.d/
img2s003n1 # ls
README S69esmrc S99vcs
S25mdlogd S99Tivoli_lcf1 S99vvr-udp-settings
S50san_driverchk S99netmask
img2s003n1 # ./S99Tivoli_lcf1 stop
The process id in /tivoli/lcf/dat/1/lcfd.pid is not an lcfd process id.
Unable to get process id of the Tivoli LCF daemon (pid).
3. kill engine process (verify that lcfd and tivoli are not running)
img2s003n1 # ps -ef | grep engine | grep -v grep
root 3060 1 0 Jun 29 ? 11:21 dm_ep_engine img2s003n1.svr.bankone.net solaris2 DM362317
img2s003n1 # kill 3060
img2s003n1 # ps -ef | grep engine | grep -v grep
4. restart the script
img2s003n1 # ./S99Tivoli_lcf1 start
Aug 25 09:21:32 1 lcfd Command line argv[0]='/tivoli/lcf/bin/solaris2/mrt/lcfd'
Aug 25 09:21:32 1 lcfd Starting Unix daemon
5. verify that the engine comes up (give it a minute or so)
Below is the method to use if you hav a SPARC version of Solaris 8 and 9: 1. Get a copy of the Solaris 9 CD 1. 2. Do a 'boot cdrom -s'. This boots into single-user mode. 3. mount /dev/dsk/c0t0d0s0 /a 4. TERM=sun; export TERM 5. vi /a/etc/shadow/ Use vi to delete the password for root Save shadow in vi: type ": wq!" 6. cd / 7. umount /a 8. cd /sbin 9. init 6 (this reboots you - log in as root, open up a terminal, type passwd, reset your passwd, and you're done!)