Power of Information Technology

Where Information liars

Home

Basic Commands in AIX auditing


http://www.blogger.com/profile/05365174810038891856

 


view:  full / summary

OS disks or SAN disks migration

Posted by Lloyd Johnson on March 6, 2013 at 1:50 PM Comments comments (0)

Steps to clone OS disks

• Install the REM modules

• Discover the local disks

• Reboot and boot from live CD KNOPPIX

• Use cfdisk to list the san disks layout

• Rebuild the local disk to be the same with the san disks layout using cfdisk. In this case change the FS type to LVM.

• Make boot device bootable by changing the flag type

• Cross check and ensure that both device have the same file system type using cfdisk command as well as fdisks.

• Use dd to copy from san device to local disks ( This should take a while)

• Power off the server and disconnect the san disks

• Power on the server and boot from local disks

 

This work plan is only for cloning the SAN disks to a local disks


script to scan hba cards in linux

Posted by Lloyd Johnson on March 2, 2013 at 7:50 AM Comments comments (0)

#Display current

powermt display

 

#Scan in devices

echo '- - -' > /sys/class/scsi_host/host3/scan

echo '- - -' > /sys/class/scsi_host/host4/scan

echo '- - -' > /sys/class/scsi_host/host5/scan

echo '- - -' > /sys/class/scsi_host/host6/scan

 

#Configure to EMC names

powermt config

powermt save

 

#Display new

powermt display

Preventing qlogic modules from starting up at boot

Posted by Lloyd Johnson on March 2, 2013 at 7:45 AM Comments comments (0)

627 cd /boot/

628 vim grub/grub.conf (rd_NO_DM rdloaddriver=ql2300_stub)

629 uname -r

630 cat grub/grub.conf

631 lsinitrd initramfs-2.6.32-131.21.1.el6.x86_64.img

632 lsinitrd initramfs-2.6.32-131.21.1.el6.x86_64.img|more

641 dracut -f --omit "lpfc qla4xxx qla2xxx" "initramfs-$(uname -r).image" $(uname -r)

657 mkinitrd -f --with=windrvr6 initramfs-2.6.32-131.21.1.el6.x86_64.img `uname -r`

659 lsinitrd initramfs-2.6.32-131.21.1.el6.x86_64.image|more

660 lsinitrd initramfs-2.6.32-131.21.1.el6.x86_64.image|grep -i ql

662 init 6

666 lsmod |grep -i qla2xxx

How to setup a domain for installation on E25K sun Server

Posted by Lloyd Johnson on November 12, 2010 at 5:22 AM Comments comments (0)

addboard -d N SB11


addboard -d N IO11


addboard -d A -c assign SB2 SB4 SB7(any)


deleteboard -c unassign SB2(to delete a board)


deleteboard -c unassign IO3


addtag -d A domainA


deletetag -d domain_id


showkeyswitch -d A


setkeyswitch -d domain_id  position (on)


/export/install/SOL_10_0509_SPARC/Solaris_10/Tools

 


./add_install_client vnl-25k2-b sun4u


boot net - install 

 


AIX SMIT

Posted by Lloyd Johnson on June 25, 2010 at 3:44 PM Comments comments (0)

to get the bootlog messages!!

more  /var/adm/ras/bootlog

Journaled File System (JFS)

more $HOME/smit.log >> contain logs of all the commands run by smit

smit update_all >> to update fix

smit list_installed >> to list all the installed fileset

lslpp -l|grep -i fileset ( to list a particular fileset) lslpp -l|grep bos

smit service_software(manage software)

smit compare_report

smit maintain_software

smit change_documentation_services

smit system (manage smit)

smit mlang(manage language)

smit devices (list all devices)

smit lvm (to add a volume)

smit lv( list and add volume)

smit mklv (add logical volume)

smit rmlv (remove a logical volume)

smit lvsc (change/rename/increase/add a copy to a logical volume & remove)

smit mklvcopy (add copies to alogical volume)

smit reorgvg (reorganise a volume group)

smit pv (add a physical volume)

smit vg/mkvg (volume group)

smit mkvg ( to add scalable volume group)

smit vgsc (change /add/remove/reorganise vollume group)

smit chvg (change volume group)

smit reducevg2 (remove vg)

smit importvg

smit mkps (add paging)

smit chps (change paging)

smit sysbackup/mksysb ( backup OS//files to tape/cd etc)

smit vgbackup/savevg ( backup vg)

smit restvg ( restore a non root vg)

smit mkcd (backup the system to CD)

smit mkdvd (back system to iso)

smit mkdvd (backup to udf dvd)

smit savevgcd (backup vg to cd)

smit savevgdvd (backup to dvd)

smit savevgdvd (backup to udf dvd)

smit backfile ( backup a file/directory)

smit backupfilesys (backup a filesysytem)

smit restfile (restore a file or a directory)

smit spooler_choice(printer spool)

smit spooler (printer administrator)

smit mkhostslpd (add print access for a remote client)

smit mkitab_lpd(To start print server subsystem)

smit chpq (to change characteristics of a queue printer)

smit rmpq (to remove a printer queue)

smit pqmanage (manage print queue)

smit jobs( managing print jobs)

smit qcan (cancel a print job)

smit mktcpip (configuure a network)

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

command line check for fix

instfix -ik (fix ID)

/usr/websm/bin/wsmserver -enable >> to enable web base system

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

bootinfo -p to view architecture type

bootinfo -y to view bit

alog -o -t boot|more to view the boot logs

##################################

lssrc -g spooler( to list rsc services)

startsrc -s (servicename) lpd > to start service lpd

refresh -s (refresh a service)

stopsrc -s (stop a rsc services) lpd

Note lpd services can be found by typing "ps -ef"

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

lsdev -P -H ( to list all supported device)

lsdev -Pc tape >> to get the device infor for tape

lsattr -E -l device-name -a realmem ( to get the amount of memory for a device)

Note##################

lsdev -C -H

lsattr -EH -l devicenaame based on the first command

lsattr -El devicename -a realmen

lsdev -CHF "name status physloc location description"

 lsdev -CHF "name" list device name

lscfg -v (provide details device information

getconf -a (provide the values for system configuration variables

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

varyonvg -f  volume-group(to activate a volume-group)

varyonvg datavg

varyoffvg  -f datavg (to disactivate a volume-group)

chvg -b -y datavy ( to turn on bad block relocatn policy)

chvg -b n datavg (turn off bad block relocatn policy )

chvg -v datavg( check all disk in a volume if the have grown in size)

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

lslv -l volume

lslv -m volume

lsvg -o |lsvg -i -l (list logical volumes)

lslv volume

lspv -l disk

lspv

lspv disk

migratepv -l volume disk disk1 (move contents of volume from one place to another)

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

#########manageing file system################

defragfs

lsps -a (monitor paging)

swapoff /dev/paging00 ( to remove an active paging space)

swappon

rmps ( to remove an active paging space)

chps -s logicalpartitn pagingspace(chps -s l paging00)

chps -d l paging00(decrease the size of a large page)

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

######### BACKUP ###################

backup -u -l -f /dev/rmt0 /home (backup to tape)

restore -Tvf /dev/rmt0 (restore commands)

restore -xvf /dev/rmt0/home/mike/manual/chapl (restore individual files

restore -rqvf /dev/rmt0 ( restore complete file)

restore -Pavf /dev/rmt0 ./etc/passwd ( to restore the only the permission of a file)

restore -Ta -vf /dev/rmt0 ./etc/passwd( to display only the permission )

###############################################

tar -cvf /dev/rmt0.3 /home

tar -xvf /dev/rmt0.3 (extract)

tar -tvf /dev/rmt0 (list)

################################################

find /home |cpio -ov> /dev/rmt0(backup with cpio)

cpio -idv </dev/rmt0 (restore from cpio)

##################################################

cat file|dd conv=ucas ( convent to upper case)

#################################################

tctl $$$$$$$$$$ use to control tape$$$$$$$$$$$$$$$

tctl rewid/fsf/offline/rewoffl (rewind and eject)

tctl -f /dev/rmt0 rewind

tctl -f /dev/rmt0.1 fsf 3

tctl -f /dev/rmt0 rwoffliz

restore -s

restore -s 4 -xvf /dev/rmt0.1 ./etc/inittab

cpio -itv < /dev/rmt0 (to list)

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

##########printer configuration###############################

qprt -Pqs -c file

lp -d queuename filename

qprt -P queuename filename

qchk (to list jobs in a queue)lpstat (queue status)

enable draft (enable queue)

disable quality(to disable a queue)

qchk -L

qpri -#570 -a 25

qcgk -L

qhld -#1493

qchk -A

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

The meaning of RISC(reduces Instruction set Computing)

The meaning of POWER(Performance Optimized With Enhanced Risc)

PowerPC

Power4

Power5

Micro Channel Architecture(MCA) more supported

Uniprocessor refers to a machine with only one processor


AIX 5L SERIES ADMINISTRATOR

Posted by Lloyd Johnson on June 13, 2010 at 1:22 PM Comments comments (0)

AIX 5L Series

More  /var/adm/ras/bootlog to get boot messages

Journaled File System (JFS)

more $HOME/smit.log >> contain logs of all the commands run by

 

  • smit

  • smit update_all >> to update fix

  • smit list_installed >> to list all the installed fileset

  • lslpp -l|grep -i fileset ( to list a particular fileset) lslpp

  • lslpp  -l|grep bos

  • smit service_software(manage software)

  • smit compare_report

  • smit maintain_software

  • smit change_documentation_services

  • smit system (manage smit)

  • smit mlang(manage language)

  • smit devices (list all devices)

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

  • command line check for fix

  • instfix -ik (fix ID)

  • /usr/websm/bin/wsmserver -enable >> to enable web base system

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

  • bootinfo -p to view architecture type

  • bootinfo -y to view bit

  • alog -o -t boot|more to view the boot logs

##################################

  • lssrc -g spooler( to list rsc services)

  • startsrc -s (servicename) lpd > to start service lpd

  • refresh -s (refresh a service)

  • stopsrc -s (stop a rsc services) lpd

  • Note lpd services can be found by typing "ps -ef"

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

  • lsdev -P -H ( to list all supported device)

  • lsdev -Pc tape >> to get the device infor for tape

  • lsattr -E -l device-name -a realmem ( to get the amount of memory for a device)

Note##################Devices commands basic#######################

  • lsdev -C -H

  • lsattr -EH -l devicenaame based on the first command

  • lsattr -El devicename -a realmen

  • lsdev -CHF "name status physloc location description"

  •  lsdev -CHF "name" list device name

  • lscfg -v (provide details device information

  • getconf -a (provide the values for system configuration variables

 

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

 

 


How create a volume group and logical volume in solaris

Posted by Lloyd Johnson on April 16, 2010 at 12:32 PM Comments comments (0)

check the LUN

 

# /opt/NTAP/SANToolkit/bin/sanlun lun show all|grep Callhistory-Lungrow

 

Go to format..

Then

 

# vxdctl enable

# vxdisk scandisks

 

it will be online status with the number Disk_179

 

# vxdisksetup -i -f Disk_179 [ -f option for if it assigned previously in any disk group ]

 

#vxdg init EMC_ESCDG ESCDG01=emcpower1s2

#vxdg -g EMC_ESCDG adddisk ESCDG02=emcpower2s2

 

 

 

# vxdg -g tdwdg adddisk Disk_179=Disk_179

 

check the mount point primary node

 

# fsclustadm -v showprimary /ccbs/oradata/u01 2

tabsdb01

 

 

check the master node

 

# vxdctl -c mode

mode: enabled: cluster active - MASTER

master: tabsdb01

 

 

 

 

 

vxassist -g EMC_ESCDG make workvol 15g [ alloc="emcpower1s2 emcpower3s2" ]

 

 

mkfs -F vxfs /dev/vx/rdsk/EMC_ESCDG/workvol

 

 

mount -F vxfs /dev/vx/dsk/EMC_ESCDG/workvol /emc/med/work

 

 

 

Increase the ORAvol01 100g [prev size was 400g, new size will be 500g]

 

# vxresize -F vxfs -g EMC_ESCDG workvol +100g

 

 

check the DG total space

 

# vxassist -g ORAdg maxsize

Maximum volume size: 209448960 (102270Mb)

 

 

 

#########################################################3

 

 

check the LUN

 

# /opt/NTAP/SANToolkit/bin/sanlun lun show all|grep Callhistory-Lungrow

 

Go to format..

Then

 

# vxdctl enable

# vxdisk scandisks

 

it will be online status with the number Disk_179

 

# vxdisksetup -i  Disk_179 [ -f for force ]

 

vxdg -g EMC_ESCDG adddisk ESCDG02=emcpower2s2

 

fsclustadm -v showprimary /ccbs/oradata/u01

 

vxdctl -c mode [ check the master node ]

 

vxresize -F vxfs -g EMC_ESCDG workvol +100g

 


Configuring Quota in Linux

Posted by Lloyd Johnson on April 3, 2010 at 10:26 AM Comments comments (0)

The first thing to do when configuring a quota is to creat a partition

  • # fdisk /dev/sda
  • #partprobe

Then make a file system

  • #mkfs .exts3 or exts2
  • #create a directory mkdir /lloyd

You can make it parmanet by adding an entry in the fstab

Now create a use for the quota

  • #useradd -d /mount point/quotaname quotaname
  • #quotacheck /mount point
  • #quotaon /mountpoint
  • #quotaon -c /mountpoint
  • #edquota userquota (set the quota)


To verify

  • # su - userquota
  • #quota



configuring print in linux

Posted by Lloyd Johnson on April 3, 2010 at 9:51 AM Comments comments (0)

You can use the GUI.

/usr/sadm/admin/bin/printmgr &


Please note the gui gives you more simpler way of configuring print in linux, it is explaninatory


Basic commands


#lp -d lloyd >> lloyd is the printer name

#lpadmin -x lloyd >> to remove a printer

#reject printer(printer name)

#enable/disable printer

#lpmove printer1 printer2

#lpadmin -p printer -c >>>> (class)

#lpstat -p printername

#cancel printer


As a system admin you can deny or allow a  printer

vi /etc/lp/printer/printername/users-all/deny


lpadmin -p printer -u deny:users


To start and stop a print service

#svcadm enable -t print >>>solaris

#service print start

Zones

Posted by Lloyd Johnson on April 3, 2010 at 9:49 AM Comments comments (0)

Zone IntroductionZones are containers to segregate services so that they do notinterfere with each other. One zone, the global zone, isthe locus for system-wide administrative functions. Non-globalzones are not able to interact with each other except throughnetwork interfaces. When using management commands that reference PIDs, only processes in the same zone will be visible from any non-global zone.


Zones requiring network connectivity have at least onededicated IP address. Non-global zones cannot observeeach other's network traffic. Users in the global zone, however,are able to observe the functioning of processes in non-globalzones. It is usually good practice to limit user access tothe global zone to system administrators. Other processes and users should be assigned to a non-global zone.


Each zone is assigned a zone name and a unique numeric zone ID.The global zone always has the name "global" and ID "0."A node name is also assigned to each zone, including global.The node names are independent of the zone names.

Each zone has a path to its root directory relative to theglobal zone's root directory.


A non-global zone's scheduling class is set to be the same as the system's scheduling class. Ifa zone is assigned to a resource pool, its scheduling class can be controlled by controlling the pool's scheduling class.


Non-global zones can have their own zone administrators. Their authority is limited to their home zone.

The separation of the environments allows for bettersecurity, since the security for each zone is independent.Separation also allows for the installation ofenvironments with distinct profiles on the samehardware.


The virtualization of the environment makes it easierto duplicate an environment on different physicalservers.

ZFS is supported in Solaris10 zones from the 6/2006 release and after.


Zone InstallationThe system administrator configures new non-global zonesvia the zonecfg command, administers themviazoneadm and logs into them viazlogin.


Zone StatesZone state information can be viewed withzoneadm list -iv from the global zone.Non-global zones have one of the following states:


configured: Configuration complete and in stable storage.incomplete: Installation or uninstallationunderwayinstalled: Configuration instantiatedon system. Zone has no associated virtual platform.ready: Virtual platform established,zsched started,IPs plumbed, filesystems mounted, zone ID assigned.No zone processes started yet.running:


This state entered when zoneinit process starts.shutting down: Zone being halted.down: Transitional state during zoneshutdown.Zone Control CommandsThe following control commands can be used to manage and monitor transitions between states:


zlogin options

zone-namezoneadm -z zone-name bootzoneadm -z zone-name haltzoneadm -z zone-name installzoneadm -z zone-name readyzoneadm -z zone-name rebootzoneadm -z zone-name uninstallzoneadm -z zone-name verifyzonecfg -z zone-name: Interactive mode;can be used to remove properties of the following types: fs, device, rctl, net, attrzonecfg -z zone-name commitzonecfg -z zone-name createzonecfg -z zone-name deletezonecfg -z zone-name verifyResource ManagementZones can be used to dynamically control resource allocations on a zone basis. This means that an applicationon a zone can be isolated and prevented from throttling other processesin other zones on the same server.

Zone ComponentsThe following components may be included in a zone:


Zone namezonepath: Path to the zone root in the globalzone's file space.autoboot: Whether to start the zone automatically.(Note that the svc:/system/zones:default service needsto be running in SMF for this to work.)pool: Associate the zone with a resource pool; multiple zones may share a pool.net: Zone network interfacefs: File systems from the zone's /etc/vfstab, automounted file systems configured within the zone, manually mounted file systems or ZFS mounts from within the zone.dataset: This allows a non-global zone to manage a ZFS file system.inherit-pkg-dir: In a sparse root zone, representsdirectories containing packaged software that a non-global zoneshares with the global zone. (Should not be used in a whole rootzone.)device: Devices that should be configuredin a non-global zone.rctl: Zone-wide resource controls such as zone.cpu-shares andzone.max-lwpsattr: Zone commentsThe components can be set using the zonecfg command.zonecfg Interactive ModeIn interactive mode, zonecfg can refer to eithera global scope or a specific resource. If no zone is specified inthe original zonecfg command, the scope is globalby default.


If a select or add subcommand isused to specify a resource, the scope limited to that resourceuntil an end or cancel command isissued.

The following subcommands are supported:


  • add: Add the specified resource or property tothe configuration in the scope.cancel
  • : Ends the resource specification and returnsto the global scope without retaining partially specified resources.commit: Dump current configuration to disk.create: In-memory configuration begun for a new zone.
  • A -t template option specifies a template,
  • -F overwrites an existing configuration, and -bcreates a blank configuration.delete: Destroy the specified configuration.end: Ends the resource specificationexit: Ends the zonecfg session.export: Export the configuration in a form that canbe used in a command file.help: Context-sensitive help depending on the currentscopeinfo: Display information about the configurationof the current scope.remove: Remove the specified resource or property from the command scope.revert: Return to the last state written to disk.select: From the global scope, changes scope to thespecified resourceset: Set the specified property to the specifiedvalueverify: Verify the current configuration for correctness.Adding Resourcesdataset:
  • zonecfg:zone-name> add dataset
  • zonecfg:zone-name:dataset> set name=pool/filesys
  • zonecfg:zone-name:dataset> end
  • fs:
  • zonecfg:zone-name> add fs
  • zonecfg:zone-name:fs> set directory=/mountpoint
  • zonecfg:zone-name:fs> set special=/dev/dsk/c#t#d#s#
  • zonecfg:zone-name:fs> set raw=/dev/rdsk/c#t#d#s#
  • zonecfg:zone-name:fs> set type=ufs
  • zonecfg:zone-name:fs> add options logging
  • zonecfg:zone-name:fs> end
  • inherit-pkg-dir:
  • zonecfg:zone-name> add inherit-pkg-dir
  • zonecfg:zone-name:inherit-pkg-dir> set dir=/package-home
  • zonecfg:zone-name:inherit-pkg-dir> end
  • net:
  • zonecfg:zone-name> add net
  • zonecfg:zone-name:net> set physical=interface-name
  • zonecfg:zone-name:net> set address=xxx.xxx.xxx.xxx
  • zonecfg:zone-name:net> end
  • (Examples of interface names include hme0 and bge0.)
  • rctl:
  • zonecfg:zone-name> add rctl
  • zonecfg:zone-name:rctl> set name=resource-name
  • zonecfg:zone-name:rctl> add value (priv=priv-level,limit=#,action=action-type)
  • zonecfg:zone-name:rctl> end

 

(See Resource Management forinformation about what sorts of values to use.)

Zone ModelsThere are two different zone models, sparse and whole root.

Sparse zones only contain a subset of the packages installed intothe root zone. Additional packages can be brought in usingthe inherit-pkg-dirresources. Each sparse zone requires about 100MB of free spacein the global file system. 40MB of free RAM are also recommended.

Whole root zones contain all required packages and also anyoptional Solaris packages that have been selected. The diskspace required for whole root zones is as much as is requiredfor a full installation. Whole root zones allow maximum configurationwithin the zone context.

mkdir zonename

chmod 777 zonename

  • Zone Creation ExampleFrom within the global zone:
  • # zonecfg -z zone-name
  • zonecfg:zone-name> create
  • zonecfg:zone-name> set zonepath=/zone-root-path
  • (Note that the zone's root path cannot be on ZFS, thoughthat capability is coming.)
  • zonecfg:zone-name> set autoboot=true
  • zonecfg:zone-name> add fs
  • zonecfg:zone-name:fs> set dir=/mount-point
  • zonecfg:zone-name:fs> set special=/global-source-dir
  • zonecfg:zone-name:fs> set type=lofs
  • zonecfg:zone-name:fs> end
  • (Inside the non-global zone, the mounted loopback file system willbe readable and writable.)
  • zonecfg:zone-name> add datasetzonecfg:zone-name:dataset> set name=zone-pool/ZFS-filesys
  • zonecfg:zone-name:dataset> end
  • zonecfg:zone-name> verify
  • zonecfg:zone-name> commit
  • zonecfg:zone-name> end
  • zoneadm -z    zonename install
  • zoneadm -z   zonename ready
  •  zoneadm -z   zonename boot
  • zlogin -C zonename

 



Rss_feed