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

February 19, 2008

Command powermt for EMC storage inside Linux

Filed under: unix, EMC

Lesson 1

# powermt display
Symmetrix logical device count=0
CLARiiON logical device count=14
=====================================================
—– Host Bus Adapters ——— —— I/O Paths —– —— Stats —–
### HW Path Summary Total Dead IO/Sec Q-IOs Errors
=====================================================
^^^ 1 lpfc ^^ optimal ^ 28 ^^ 0 ^^ - ^^^ 0 ^^^ 0
^^^ 2 lpfc ^^ optimal ^ 28 ^^ 0 ^^ - ^^^ 0 ^^^ 0

-It shows 2 HBA card connected to this server from clarion with 14 LUN. If you can see there is 0 errors/dead, so means here each LUN is good connectivity condition to the array or switch.

Lesson 2

# powermt display dev=all
Pseudo name=XXXXXX
CLARiiON ID=APM00000000005 [XXXXX]
Logical device ID=600601607906DD7D5DDBD911 [XXXXX]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP A, current=SP A
===================================================
—————- Host ————— - Stor - — I/O Path - — Stats —
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
===================================================
^^^ 2 lpfc ^^ sdae ^ SP A3 active alive ^^ 0 ^^ 0
^^^ 2 lpfc ^^ sdak ^ SP B2 active alive ^^ 0 ^^ 0
^^^ 1 lpfc ^^ sdc ^ SP A0 active alive ^^ 0 ^^ 0
^^^ 1 lpfc ^^ sdi ^ SP B1 active alive ^^ 0 ^^ 0

-It shows more details of the HBA card and LUN (4 path), all working fine without no errors.

March 12, 2007

AIX simple command

Filed under: unix, AIX

After one month do nothing with my new job, last friday i start my 1st ticket and closed it. mak oiii terer lak guaaa…hehe
Today i learn new stuff, 1st time i ssh to AIX server, jakun plak rasanyaaa..:)
So here some tips that i gather for AIX command, actually not much different with solaris, linux and others unix command but the location of the files distributed somewhere else….:)

# mkuser

-create new user

# rmuser

-delete user

# more /etc/passwd
# more /etc/security/passwd

-passwd location files

# more /etc/group
# more /etc/security/group

-group location files

# more /etc/security/user
{rlogin=true}

-allow/block remote login

# more /etc/netsvc.conf

-name service switch

# more /etc/filesystems

-filesystem mount

# oslevel

-OS level (uname -a)

# more /etc/environment
# more /etc/profile

-timezone

# installp -a

-install soft

# installp -u

-uninstall soft

I’ll will update more form time to time…..hehe

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 13, 2006

how to do copy from filer to another filer

Filed under: unix, NetApp, storage

Actually there are few ways to copy data from filer to another filer.

1) using snapmirror
this method is easily using filerview but need license , so might be expensive. Easily to maintain and the data can be sync automatically.

2) using rsync, so you might need to run with script. What you need to do is mount the location of the filer and destination of the filer inside any server. Then create rsync script and run it as cronjobs.

3) using ndmcopy - this is very simple and easily to used for single data movement. I’ll show you how to do.
Telnet filerA (destination) :

filerA> ndmpcopy -sa root:password filerB:/vol/volname/qtree filerA:/vol/volname/qtree

Telnet filerB (source) :

filerB> ndmpcopy -da root:password filerB:/vol/volname/qtree filerA:/vol/volname/qtree

p/s: some user call filer or netapp hostsname.

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