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,
Sayfalar
▼
31 Aralık 2015 Perşembe
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