How to Add a Disk on AIX Logical Volume Manager (LVM)
1) Add the physical or virtual disk to the logical partition.
2) Rescan your hardware so that the OS is aware of your new disk.
# cfgmgr
3) Check to see your disk. For the purpose of this example, let’s say the new disk is hdisk2.
# lsdev -Cc disk
# lspv
4) Associate your new disk to a volume group. In this case, let’s create a new group called myvg and put hdisk2 in there.
# mkvg -y myvg hdisk2
5) Now you can look at the size of hdisk2. (This command won’t work if it’s not associated with a volume group).
# lspv hdisk2
6) Create a log logical volume for jfs2.
This needs to be part of myvg. Note: in the example below, the type is
jfs2log and we’re giving it 1 physical partition (PP).
# mklv -t jfs2log myvg 1
7) Look for your new logical volume (lv). Chances are that AIX named it loglv00.
# lsvg
# lsvg -l myvg
8) Create your production logical volume. Let’s make it about 30GB? I’ll name it mylv1.
# lsvg myvg
# mklv -t jfs2 -y mylv1 myvg 30G
9) Lay down your file system on mylv1.
# mkfs -o log=/dev/loglv00 -V jfs2 /dev/mylv1
10) Mount your filesystem.
# mkdir /myfs1
# mount -o log=/dev/loglv00 /dev/mylv1 /myfs1
11) Edit /etc/filesystem and change the dev and log stanzas to match your dev and log names from above
Aşağıdaki 4 komut vgname, lvname ve mount point alanlarına isim vererek sırayla çalıştırabilirsiniz.
öncesinde check etmeliyiz tüm diskleri
##cfgmgr
##mkvg -y vgname -s 512 hdiskX
##mklv -y lvname -t jfs2 -L lvname vgname 100
##crfs -v jfs2 -d lvname -m mount_point -p rw -A yes
##mount mount_point
50GB 'lik bir filesystem oluşturur ve mount_point olarak verdiğiniz alana mount eder.
Diskte yer varsa,
##chfs -size=+10G mount_point
seklinde alani buyutebilirsiniz,
31 Aralık 2015 Perşembe
IBM AIX lere disk ekleme cıkarma ve mount etme yada mount edilmiş bir disk
IBM AIX lerde vmount: Operation not permitted hatası
Merhabalar,
Eğer IBM AIX lerde mount etmeye çalışırken bu hatayı alıyorsanız sistem bunu yapmanıza izin vermiyor olabilir.
hata: vmount: Operation not permitted.
check edelim
### nfso -a
client_delegation = 1
nfs_max_read_size = 65536
nfs_max_write_size = 65536
nfs_rfc1323 = 1
nfs_securenfs_authtimeout = 0
nfs_server_base_priority = 0
nfs_server_clread = 1
nfs_use_reserved_ports = 0
nfs_v3_server_readdirplus = 1
nfs_v4_fail_over_timeout = 0
portcheck = 0
server_delegation = 1
utf8_validation = 1
nfs_server_close_delay = 0
ayarı değiştirip 1 yapmanız gerekebilir.
## nfso -o nfs_use_reserved_ports=1
şimdi mount komutunu çalıştırabilirsiniz
## mount dd2500:/data/col1/dbshare /dbshare
mount edilmiş mi check edelim
##mount
eğer back-up serverınız varsa orada da makinaya mount edilmiş var mı check edebilirsiniz
back-up serverda
###nfs show clients
.
Eğer IBM AIX lerde mount etmeye çalışırken bu hatayı alıyorsanız sistem bunu yapmanıza izin vermiyor olabilir.
hata: vmount: Operation not permitted.
check edelim
### nfso -a
client_delegation = 1
nfs_max_read_size = 65536
nfs_max_write_size = 65536
nfs_rfc1323 = 1
nfs_securenfs_authtimeout = 0
nfs_server_base_priority = 0
nfs_server_clread = 1
nfs_use_reserved_ports = 0
nfs_v3_server_readdirplus = 1
nfs_v4_fail_over_timeout = 0
portcheck = 0
server_delegation = 1
utf8_validation = 1
nfs_server_close_delay = 0
ayarı değiştirip 1 yapmanız gerekebilir.
## nfso -o nfs_use_reserved_ports=1
şimdi mount komutunu çalıştırabilirsiniz
## mount dd2500:/data/col1/dbshare /dbshare
mount edilmiş mi check edelim
##mount
eğer back-up serverınız varsa orada da makinaya mount edilmiş var mı check edebilirsiniz
back-up serverda
###nfs show clients
.
Sybase iq da LOAD TABLE
Sybase iq da LOAD TABLE komutu ile veri atımının yapılması.
LOAD [ INTO ] TABLE [ owner.]table-name ... ( load-specification [, …] ) ... { FROM | USING [ CLIENT ] FILE } { 'filename-string' | filename-variable } [, …] ... [ CHECK CONSTRAINTS { ON | OFF } ] ... [ DEFAULTS { ON | OFF } ] ... [ QUOTES OFF ] ... ESCAPES OFF ... [ FORMAT { ascii | binary | bcp } ] ... [ DELIMITED BY 'string' ] ... [ STRIP { ON | OFF | RTRIM } ] ... [ WITH CHECKPOINT { ON | OFF } ] ... [ { BLOCK FACTOR number | BLOCK SIZE number } ] ... [ BYTE ORDER { NATIVE | HIGH | LOW } ] ... [ LIMIT number-of-rows ] ... [ NOTIFY number-of-rows ] ... [ ON FILE ERROR { ROLLBACK | FINISH | CONTINUE } ] ... [ PREVIEW { ON | OFF } ] ... [ ROW DELIMITED BY 'delimiter-string' ] ... [ SKIP number-of-rows ] ... [ WORD SKIP number ] ... [ START ROW ID number ] ... [ UNLOAD FORMAT ] ... [ ON PARTIAL INPUT ROW { ROLLBACK | CONTINUE } ] ... [ IGNORE CONSTRAINT constrainttype [, …] ] ... [ MESSAGE LOG ‘string’ ROW LOG ‘string’ [ ONLY LOG logwhat [, …] ] ... [ LOG DELIMITED BY ‘string’ ]
Kaynak: devamı ...
IBM AIX' lerde bir kaç kullanılacak ayar.
# refresh -s sshd
0513-005 The Subsystem, sshd, only supports signal communication.
In order to have a process such as SSHD re-read its configuration file (/et c/ss h/ss hd_c onfi g), you must do a "stopsrc -s sshd" followed by a "startsrc -s sshd":
# stopsrc -s sshd
0513-044 The sshd Subsystem was requested to stop.
# startsrc -s sshd
0513-059 The sshd Subsystem has been started. Subsystem PID is 3670044.
As
you can see when you do the "stopsrc" it just says the process was
requested to stop; not that it was stopped. This implies that there
might be a delay before the process actually stops.
So what a lot of people do in scripts where they need to restart processes like this is something like this:
stopsrc -s sshd
sleep 10
startsrc -s sshd
Here is a one liner to request a stop to a SRC process like SSHD, verify it is stopped, and then restart it:
stopsrc -s sshd && until lssrc -s sshd | grep -q inoperative; do echo "Waiting for sshd to stop"; perl -e 'sel ect( unde f,un def, unde f,.2 5)'; done && startsrc -s sshd
IBM AIX'de core sayılarını ve hostname version kernel bilgilerini kontrol etmek için kullanılan komutlar
1. lsdev -Cc processor
proc0 Available 00-00 Processor
proc2 Available 00-02 Processor
SMT thread processors are seen with bindprocessor
1. bindprocessor -q
The available processors are: 0 1 2 3
lparstat -i will show the virtual and logical processors.
1. lparstat -i | grep CPU
Online Virtual CPUs : 2
Maximum Virtual CPUs : 15
Minimum Virtual CPUs : 1
Maximum Physical CPUs in system : 2
Active Physical CPUs in system : 2
Active CPUs in Pool : 2
Physical CPU Percentage : 25.00%
topas -L shows logical processors,
mpstat shows virtual
1. lsattr -El proc0
frequency 1498500000 Processor Speed False
smt_enabled true Processor SMT enabled False
smt_threads 2 Processor SMT threads False
state enable Processor state False
type PowerPC_POWER5 Processor type False
1. lscfg -v | grep -i proc
Model Implementation: Multiple Processor, PCI bus
proc0 Processor
proc2 Processor
1. prtconf | pg
System Model: IBM,9111-520
Machine Serial Number: 10EE6FE
Processor Type: PowerPC_POWER5
Number Of Processors: 2
Processor Clock Speed: 1499 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
Sybase IQ' da tüm indexleri rebuild etme
Sybase IQ veritabanında tablo yada şema (shema) bazlı indexleri rebuild edebilriz.
Bunun bir yöntemi de idexleri drop create etmektir aslında ama rebuild ederek te indexleri güncelleyebiliriz. text indexler için geçerli değildir.
İndex türlerine göre ve shema türlerine göre seceneği mevcuttur.
select 'sp_iqrebuildindex ''' +su.name+'.' + T.[table_name] + ''', ''index ' + I1.index_name + '''' + char(13) + 'go'
from sysidx I1, sysiqidx I2, systab T, sysobjects so,sysusers su,SYSTABLE st
where T.table_id = I1.table_id
and (I2.table_id=I1.table_id and I2.index_id = I1.index_id)
and su.name='BTRANS'
and st.object_id=so.id and so.type = 'U' and so.uid = su.uid
and st.creator=T.creator and I2.index_type='HG'
Sybase taşıma işleminden sonra performans açısından aşağıdaki komutlar işinize yarayabilir
sp_iqcheckdb 'verify database'
go
sp_iqcheckdb 'allocation database'
go
Etiketler:
index,
index rebuild,
index restore,
sybase,
sybase iq,
sybaseiq
27 Ekim 2015 Salı
HPUX : Kernel Tunable parametreleri
Hp için Kernelde parametre setleme ve görüntüleme komutları
no child process hataları alıyorsanız kernelda max process limitini artırmanız gerekebilir.
/usr/sbin/kctune is the administrative command for HP-UX kernel
tunable parameters. It gives information about tunable parameters and
their values, and makes changes to tunable values.
To list all tunable paramters :
# kctune
Tunable Value Expression Changes
NSTREVENT 50 Default
NSTRPUSH 16 Default
NSTRSCHED 0 Default
STRCTLSZ 1024 Default
STRMSGSZ 65535 65535
acctresume 4 Default
acctsuspend 2 Default
aio_listio_max 256 Default Immed
aio_max_ops 2048 Default Immed
….
#
To list details about particular paramter:
# kctune -v -q maxuprc
Tunable maxuprc
Description Maximum number of processes for each non-root user
Module pm
Current Value 29995
Value at Next Boot 29995
Value at Last Boot 29995
Default Value 256
Constraints maxuprc >= 3
maxuprc <= nproc - 5
Can Change Immediately or at Next Boot
Changing the paramter values :
# kctune maxuprc=29990
WARNING: The automatic ‘backup’ configuration currently contains the
configuration that was in use before the last reboot of this
system.
==> Do you wish to update it to contain the current configuration
before making the requested change? y
* The automatic ‘backup’ configuration has been updated.
* The requested changes have been applied to the currently
running system.
Tunable Value Expression Changes
maxuprc (before) 29995 29995 Immed
(now) 29990 29990
Verify after changing :
# kctune -v -q maxuprc
Tunable maxuprc
Description Maximum number of processes for each non-root user
Module pm
Current Value 29990
Value at Next Boot 29990
Value at Last Boot 29995
Default Value 256
Constraints maxuprc >= 3
maxuprc <= nproc - 5
Can Change Immediately or at Next Boot
The maxuprc parameter is to set the maximum number of process a non-root user can run.
23 Ekim 2015 Cuma
Unix/Linux Sistemlerde Fiziksel Memory'i ve swap alanını check etme
Following are the most requred OS commands while installing and configuring Oracle Software on Unix/Linux Operating Systems.
Operating System: AIX 5L Based Systems (64-Bit)
Physical RAM: # /usr/sbin/lsattr -E -l sys0 -a realmem
Swap Space: # /usr/sbin/lsps -a
Operating System: HP Tru64 UNIXPPhysical RAM: # /bin/vmstat -P grep "Total Physical Memory"
Swap Space: # /sbin/swapon -s
Operating System: HP-UX Itanium
Physical RAM: # /usr/contrib/bin/machinfo grep -i Memory
Swap Space: # /usr/sbin/swapinfo -a
Operating System: HP-UX PA-RISC (64-Bit)Physical RAM: # grep "Physical:" /var/adm/syslog/syslog.log
Swap Space: # /usr/sbin/swapinfo -a
Operating System: IBM zSeries Based Linux, LinuxItanium/POWER/x86/x86-64
Physical RAM: # grep MemTotal /proc/meminfo
Swap Space: # grep SwapTotal /proc/meminfo
Operating System: Solaris SPARC 64-Bit/x86/x86-64Physical RAM: # /usr/sbin/prtconf grep "Memory size"
Swap Space: # /usr/sbin/swap -s
Operating System: AIX 5L Based Systems (64-Bit)
Physical RAM: # /usr/sbin/lsattr -E -l sys0 -a realmem
Swap Space: # /usr/sbin/lsps -a
Operating System: HP Tru64 UNIXPPhysical RAM: # /bin/vmstat -P grep "Total Physical Memory"
Swap Space: # /sbin/swapon -s
Operating System: HP-UX Itanium
Physical RAM: # /usr/contrib/bin/machinfo grep -i Memory
Swap Space: # /usr/sbin/swapinfo -a
Operating System: HP-UX PA-RISC (64-Bit)Physical RAM: # grep "Physical:" /var/adm/syslog/syslog.log
Swap Space: # /usr/sbin/swapinfo -a
Operating System: IBM zSeries Based Linux, LinuxItanium/POWER/x86/x86-64
Physical RAM: # grep MemTotal /proc/meminfo
Swap Space: # grep SwapTotal /proc/meminfo
Operating System: Solaris SPARC 64-Bit/x86/x86-64Physical RAM: # /usr/sbin/prtconf grep "Memory size"
Swap Space: # /usr/sbin/swap -s
20 Ekim 2015 Salı
HP-UX Cheat Sheet Sistem bilgilerini öğrenme komutları
Kernel
System Information
Daemons
Software
Log Files
Accounts
Network
NFS Configuration
Sam
Console
Boot (ISL)
Build a new kernel
Disk
Logical Volume Manager
see hpux logical volume manager for lvm commands
Swap
Misc
Kernel parms and Hardware. | /usr/sbin/sysdef or ioscan –fn |
Major numbers (devices) | lsdev |
Unix device messages | dmesg |
Configuration files | /etc/rc.config.d |
Unix Kernel | /stand/vmunix |
All crash files. | /var/adm/crash |
display loaded modules | kmadmin kmadmin -s |
load modules | kmadmin -L |
unload modules | kmadmin -U |
set kernel parameters | kctune (11i) rebuild kernel |
display kernel parameters | kctune (11i) sysdef kmtune kmsystem usr/sam/lbin/getkinfo -f /stand/vmunix -o /tmp/kernel.data |
re/build kernel | cd /stand/build /usr/lbin/sysadm/system_prep -s system edit system file /usr/sbin/mk_kernel -s ./system mv /stand/system /stand/system.old mv /stand/vmunix /stand/vmunix.old mv /stand/build/system /stand mv /stand/build/vmunix_test /stand/vmunix shutdown -r 0 |
System Information
amount of memory | dmesg |grep -I physical /usr/sam/lbin/getmem /opt/ignite/bin/print_manifest |
cpu (type, number, etc)
|
/opt/ignite/bin/print_manifest sam > performance monitors > system properties (detailed) model uname -m |
disk drives
|
pvdisplay -v |
disk info serial numbers
|
diskinfo -v /dev/rdsk/c0t4d0 (detailed but no serial number) /opt/ignite/bin/print_manifest ioscan -fn -C disk |
Kernel 32 or 64
|
getconf KERNEL_BITS (11.0) (HPUX < 11.00 all 32 bit) Note: determine if system supports 32/64 bits getconf HW_CPU_SUPP_BITS |
Display firmware
|
< 10.20: 1. At the system prompt, enter "sysdiag" 2. At the DUI prompt, enter "sysmap" 3. At the ENTER MAP prompt, enter "cpumap" 4. Note the PDC Firmware value 5. At the ENTER MAP prompt, enter "exit" 6. At the DUI prompt, enter "exit" 10.20 >: use mstm (tools manger) |
trace system calls
|
Daemons
NFS daemons | server: rpc.mountd, nfsd client:rpc.statd, lockd /etc/exports |
Time daemons | netdaemons /etc/rc.config.d/netdaemons /etc/ntp.conf |
Software
adding packages/patch | swinstall -s /var/spool/sw |
removing packages/patch | swremove |
Listing installed packages/patches | swlist -l product PH* (HPUX 10.x) swlist -l patch (HPUX 11) |
verify package/patches | swlist -l -a state swverify |
Adding packages to depot | swlist -d @ /dev/rmt/0m |
Removing packages to depot | swremove -d * @ /var/spool/sw |
listing packages from depot | swlist -d @ /dev/rmt/0 swlist -d @ /var/spool/sw |
copy software from one depot to another | swcopy -s /dev/rmt/0 @ /var/spool/sw |
register software | swreg |
List all files in package | swlist -l |
configure software | swconfig |
Log Files
messages | n/a |
syslog | /var/adm/syslog/syslog.log |
/var/adm/syslog/mail.log | |
cron | /var/adm/cron/log |
boot | /var/adm/syslog/syslog.log |
sam log | /var/sam/log/samlog |
Accounts
displaying users | cat /etc/passwd logins |
adding a user | useradd sam |
removing a user | userdel sam |
modifying a user | usermod sam |
password files | /etc/passwd /tcb/files/auth/r/root (trusted system) |
Network
displaying NIC speeds | ndd -get |
setting NIC speeds | ndd -set lanadmin |
display routing table | netstat -rn |
displaying network interfaces | lanscan (all) ifconfig lan0 (individual) |
Lan device config (interface name, state, mjr number, Hardware path, mac address) | lanscan |
Lan Diag tool (like a netstat –I and –s and more) | Landiag or lanadmin |
setup dns | /etc/resolv.conf |
name service switch file | /etc/nsswitch.conf |
NFS Configuration
display nfs shares | showmount -e localhost cat /etc/xtab |
create nfs share | /etc/rc.config.d/nfsconf (edit) /etc/exports (edit file & add share) exportfs -a |
uncreate nfs share | /etc/rc.config.d/nfsconf (edit) exportfs -au (unshare all) exportfs -u /home/vallep /etc/exports (edit file & remove file) |
nfs start | /sbin/init.d/nfs.core start /sbin/init.d/nfs.server start /sbin/init.d/nfs.client start |
nfs stop | /sbin/init.d/nfs.client stop /sbin/init.d/nfs.server stop /sbin/init.d/nfs.core stop |
nfs status | ps -ef|grep |
nfs reload | exportfs -a |
nfs performance | nfsstat |
Sam
Sam Log file location | /usr/local/log/samlog |
Console
Root only on console | /etc/securetty |
Boot (ISL)
Boot a particular kernel (standalone) | Hpux –is /stand/vmunix |
Boot in stanalone | Hpux –is boot |
Boot multi-user | Hpux –lm boot |
Build a new kernel
cd /stand/build /usr/lbin/sysadm/system_prem -s system edit system file /usr/sbin/mk_kernel -s ./system mv /stand/system /stand/system.old mv /stand/vmunix /stand/vmunix.old mv /stand/build/system /stand mv /stand/build/vmunix_test /stand/vmunix reboot |
Disk
setting the boot device | setboot -p setboot -a |
format floppy drive | n/a |
mount/unmount floppy | n/a |
mount/unmount CDROM | mount -rF cdfs /dev/mnt |
create boot disk or recovery tape |
recovery tape (preview): make_tape_recovery -v -I -x inc_entire=vg00 |
boot cdrom/diskette (single user) |
>boot pri Interact with IPL? Y ISL>hpux -is |
boot into maintenace mode |
>boot pri Interact with IPL? Y ISL>hpux -lm |
Display the LIF area (Logical Interchange Format) | lifls -l /dev/dsk/c0t6d0 |
Display characteristics of a tape drive | lssf /dev/rmt/c4t1d0DESTn |
Logical Volume Manager
see hpux logical volume manager for lvm commands
mountable drives | /etc/fstab |
lvm drives | /etc/lvmtab |
exported drives | /etc/exports |
mounted exported drives | /etc/xtab |
create a filesystem | newfs –F |
create a exported filesystem | exportfs-a |
block devices | mkfs –v –C |
raw devices | mkfs –v –r –C |
info on disk drives | diskinfo |
df –k | bdf |
change interleave factor | mediainit |
A number of disk that have to be running in order for a VG to mount | quorum |
Swap
Display swap information | swapinfo (display in Kb) swapinfo -m (display in Mb) swapinfo -tm (total and Mb) |
Adding swap | Create logical volume or filesystem
swapon swapon -p 3 update /etc/fstab Note: -p = priority swap number |
Removing swap | edit /etc/fstab reboot |
Misc
startup | |
shutdown | shutdown -h -g0 -y (halt) shutdown -r -g0 -y (reboot) |
init status 0 1 2 3 4 5 6 |
|
determine the runlevel | who -r |
obtain default run level | |
start xwindows | |
ntp setup | |
force a fsck | |
page size (memory) | 4Kb |
initialize system | set_parms initial |
Timezone | /etc/TIMEZONE |
update /dev directory | Class: insf -C tape Recreate deleted link: insf -H 0.1.0 -e |
remove device | rmsf |
list device drivers | lsdev |
console login (allow/deny) | /etc/securetty |
16 Şubat 2015 Pazartesi
Matematiksel operatörler
Operatörlerin ifadenin sağında yada solunda olması durumunda oluşan anlam farklılığı
kynk:www.comu.edu.tr
eğer a++ yada ++a arasında atama sırasını karıştıryorsanız. güzel bir örnek
kynk:www.comu.edu.tr
Kaydol:
Kayıtlar (Atom)