SiNgAuTaRa - Live with EMC # NetApp # Solaris # Linux # UNIX

February 22, 2007

Netbackup tips

Filed under: solaris, unix, storage

There are sun box using netbackup for DRP backup, monthly backup or daily backup. My previous office, i’m using sun box V240 as backup server connected to quantum PX506 using SCSI wired. Inside PX506 contains 100 tape LTO2 Ultrium (200/400gb) and 4 robot.
v240 compaq PX506
Here some tips :

Stopping Netbackup
* /usr/openv/netbackup/bin/K77netbackup –> graceful shutdown
* /usr/openv/netbackup/bin/bpps -a –> check for any remaining processes
* /usr/openv/netbackup/bin/goodies/bp.kill_all —> kills all remaining netbackup process not necessarily graceful
* /usr/openv/netbackup/bin/bpps -a –> check for any remaining processes
* kill -9 {pid} for any remaining. NOTE: unkillable processes may require a reboot PX 506

Starting Netbackup
* /usr/openv/netbackup/bin/S77netbackup –> after bp.kill_all, to restart

Checking Backup Status
* Activity Monitor or
* /usr/openv/netbackup/bin/admincmd/bpdbjobs -report

February 21, 2007

Solaris simple question for beginner

Filed under: solaris, unix

Here some simple solaris question, good practice, let’s lah try it out…….hehe

1)In Solaris how many disk slices a disk can have ?
a) 8 b) 7 c) 6 d)1

2)Which file is used to set the default mask in Solaris ?
a)/etc/profile b) .profile c) /etc/system d) /etc/inittab

3)What are the advantage for making disk partitions ?
a) Easy to maintain b) Easy for backing up
c) Limits problems to one partition only d) Space can be monitored easily

4 )What does a + sign in /etc/hosts.equiv indicates ?
a) All hosts are allowed b) Only known hosts are allowed c) All users are allowed d) Unknown hosts are also allowed

5 )Which command is used to mount local file system ?
a) mount -l b) mountall c) mount d) mount -r

6) Which command line option gives a run level and output headings ?
a) who -b b) who -r c) who -rh d) who -rH

7) which command is used to change the auto-boot feature in sun ultra ?
a) eeprom “auto-boot?”=true b) eeprom auto-boot?=true c) eeprom autoboot? true d) eeprom auto-boot = true ..

8 ) If patch id is 123456-10 then its revision number is -
a)123 b)456 c)10 d)6-10

9)Which commands can be used to make a device alias
a) devalias ay OK prompt b) dvalias at root prompt
c) nvram at ok prompt d) drvconfig at root prompt

10) Where in Solaris encrypted passwords are stored ?
a) /etc/passwd b) /etc/shadow c)/etc/default/passswd d)/etc/initttab

11) What is required in a diskless workstation for Solaris workstation
a) cpu, monitor, keyboard, hard disk b) cpu, monitor, keyboard, cdrom drive
c) cpu, monitor, keyboard, Ethernet card d) cpu and Ethernet card only

12)Which of the following points to virtual file system ?
a) /dev/dsk/c0t0d0s3 b) /dev/rdsk/c0t0d0s3
c) /dev/md/dsk/c0t0d0s3 d) /dev/vx/rdsk/data/vol1

13) Which Solaris command is used to correct filesystem problems?.
a) newfs b) fsck c) mkfs d) format

14) Which is the configuration file for the tip command
a)/etc/tip.conf b) /etc/remote c) /etc/inittab.d d) .profile

15) When automounter daemon needs to be restarted ?.
a) When direct map is changes b) When indirect map is changes
c) No need to restart d) When a new user is created

16) What is the default configuration cluster in Solaris installation ?.
a) Developer b) Core c) End user d) Entire Distriidution

17) Which utility is used to administer the port monitor ?
a)sacadm b) pmadm c) ttyadm d) admintool

18) What is the command to assign a ip address to qfe network interface ?
Write the command ……………………………………..

19) 10 30 * * 4 /usr/bin/loginfo entry in crontab will execute the program
a) Every Friday at 10.30 b) Every Thursday at 10.30
c) Every Saturday 10.30 d) Every Wednesday at 10.30

20) What do you need for a fresh Solaris Installation ?.
a) Host Name b) IP Address c) Net mask d) Domain name

21) How can you see the prom version ?
a) show version b) prom c) banner d) version

22) Which file enables you to disable root login on terminals ?.
a) /etc/profile b) .profile
c) /etc/default/login d) /etc/system

23 ) Which directory contain run level control scripts ?.
a) /etc/rc2.d b) /etc/init.d c) /etc/rc3.d d) /usr/bin

24) Which command show the patch installed in the system ?
a) patchadd -p b) showrev -p c) showpatch d) patchlist

25) What are the advantage of having a virtual file system ?.
a) Large capacity volumes b) Increased File system size
c) Performance enhancement d) backup becomes easy

26) Which file is used to define default run level for init process at booting time ?.
a) /etc/ttyyab b) /etc/ttyadm
c) /etc/inittab d) /etc/profile

27) Which command shows kernel parameters and and driver module information ?.
a) sysconfig b) prtconfig
c) dmesg d) prtconf

28) A multiuser operating system is one - in which
a) Many users can work simultaneously b) Many Processes can work simultaneously
c) A large number of users can be created d) A number of user home directories can be created.

29) What is true about software packages ?.
a) It is group of files & directories b) They are grouped to form clusters
c) It is standard way of delivering software in Solaris d) They can be installed using pkgadd command.

30)What type of names are used for administering disk drives in Solaris environment
a) Physical b) Logical c) Virtual d) disk instance

if you know the answers, let me know lah yek….hehe

February 19, 2007

Network Configuration Solaris

Filed under: solaris, unix

Here some tips for network configuration and checking using solaris. Normally the you can look inside /etc/system or /etc/rc2.d

- enable network card bge0

#ifconfig bge0 plumb

- configure IP/netmask and interface up

#ifconfig bge0 999.99.99.99 netmask 255.255.255.0 up

- check link status

# ndd /dev/bge0 link_status
1

link status 0 = Link Down
link status 1 = Link Up

- check link speed

# ndd /dev/bge0 link_speed
1

link speed 0 = 10 Mbps
link speed 1 = 100 Mbps
link speed 1000 = 1 Gbit

- check link mode

# ndd /dev/bge0 link_mode
1

link mode 0 = Half-Duplex mode (FDX)
link mode 1 = Full-Duplex mode (HDX)

- check NIC configuration

# ndd -get /dev/bge0 \?
adv_1000fdx_cap (read and write)
adv_1000hdx_cap (read and write)
adv_100fdx_cap (read and write)
adv_100hdx_cap (read and write)
adv_10fdx_cap (read and write)
adv_10hdx_cap (read and write)
adv_autoneg_cap (read and write)
adv_pause_cap (read and write)
adv_asym_pause_cap (read and write)
link_status (read only)
link_speed (read only)
link_duplex (read only)
loop_mode (read only)

#ndd /dev/bge0 [apa apa]

October 6, 2006

how to delete root passwd

Filed under: solaris, unix

Root passwd is important, it must be confidentials.
To delete root passwd, you can go to ok promt. Put cd solaris disk 1 inside the server.

ok> boot cdrom -s

# mount /dev/dsk/c0t0d0s0 /a

–> mount it to /a or /tmp

# cd /a
# cd etc
# vi shadow
root:g8KeIzST4Un8o:13409::::::

- delete g8KeIzST4Un8o
- save and reboot

September 13, 2006

command hardware checking

Filed under: solaris, unix

good info to learn.

# prtconf -v

- system configuration, memory size, pci

# psrinfo -v

- cpu size and speed

# iostat

- iostat utility iteratively reports terminal, disk, and
tape I/O activity, as well as CPU utilization

# mpstat

- mpstat reports per-processor statistics in tabular form

# vmstat

- vmstat reports virtual memory statistics regarding process, virtual memory, disk, trap, and CPU activity

# bash-2.03$ pwd
/usr/platform/SUNW,Ultra-60/sbin
#./prtdiag -v

-details hardware spec

how to block telnet sesion

Filed under: solaris, unix

Let’s says you want to block telnet session, follow details :

# vi /etc/inetd.conf
*then put comment out ‘#’ below
#telnet stream tcp6 nowait root /usr/sbin/in.telnetd in.telnetd
*then stop and restart services
# ./S72inetsvc stop
# ./S72inetsvc start

then try to telnet, sure cannot. but you still can used other like putty.

July 22, 2006

Starting IPv4 routing daemon (while booting)

Filed under: solaris, unix

I’m having problem with my new server. After sys-unconfig, server seems ‘hang’, i thinks it was IPv4 issues (network interface speed).
Here the failure output :

Sun Fire V240, No Keyboard
Copyright 2005 Sun Microsystems, Inc. All rights reserved.
OpenBoot 4.18.5, 1024 MB memory installed, Serial #xxxxxxxx.
Ethernet address xxxxxxx, Host ID: xxxxxx.

Rebooting with command: boot
Boot device: disk0:a File and args:
SunOS Release 5.8 Version Generic_117350-04 64-bit
Copyright 1983-2003 Sun Microsystems, Inc. All rights reserved
obpsym: symbolic debugging is available.
Hardware watchdog enabled
configuring IPv4 interfaces: bge0.
Hostname: xxxxx
metainit: xxxx: there are no existing databases

The system is coming up. Please wait.
checking ufs filesystems

The system is coming up. Please wait.
checking ufs filesystems
/dev/rdsk/c1t0d0s5: is clean.
/dev/rdsk/c1t2d0s6: is clean.
/dev/rdsk/c1t0d0s4: is clean.
/etc/rc2.d/S68net-tune
Starting IPv4 routing daemon.

————hang————–

I need to set up 1000 full duplex (1 giga) for network interface, here the files need to be edit.

# vi /etc/rc2.d/S68net-tune
# echo “Force bge0 to 1000fdx autoneg on… ”
#
# Force bge0 to 1000fdx autoneg on
#———————————
ndd -set /dev/bge0 adv_1000fdx_cap 1
ndd -set /dev/bge0 adv_1000hdx_cap 0
ndd -set /dev/bge0 adv_100fdx_cap 0
ndd -set /dev/bge0 adv_100hdx_cap 0
ndd -set /dev/bge0 adv_10fdx_cap 0
ndd -set /dev/bge0 adv_10hdx_cap 0
ndd -set /dev/bge0 adv_autoneg_cap 1
:wq!

Then do normal reboot and check your NIC behind CPU should be blinking.

July 10, 2006

user account maintanance

Filed under: solaris, linux, unix

1) How to add user

# useradd singa

2) How to change passwd

# passwd singa

3) If you need to changes user account

# vi /etc/passwd

4) Let’s say you have NIS server, then you need to change NIS account/passwd

# vi /var/yp/nis/passwd
# vi /var/yp/nis/shadow
# passwd -r nis singa

setup new sun box using solaris

Filed under: solaris, unix

There are several ways to set up new solaris box

1) install fresh using CD or jumpstart

2) already set-up just need to fresh configure (15 minutes downtime)

# sys-unconfig

3) already set-up but need to changes IP/hostname/netmask (5 minutes downtime)

# vi /etc/netmasks
# vi /etc/hosts
# vi /etc/hostsname
# vi /etc/nodename
# vi /etc/net/ticlts/hosts
# vi /etc/net/ticots/hosts
# vi /etc/net/ticotsord/hosts

Get free blog up and running in minutes with Blogsome
Theme designed by Gary Rogers