AIX常用維護操作
eerpt
errpt -a
errpt -aj 2BFA76F6
Displaying errors by time reference
If you suspect that the errors were encountered during the last day, you can
display a detailed report of all errors logged in the past 24 hours, where the string
equals the current month, day, hour, minute, and year, minus 24 hours. To do so,
use the errpt command as follows:
# date
Wed Aug 29 09:30:42 CDT 2001
# errpt -a -s 0828093001
errclear #Deletes entries from the error log.
errinstall #Installs messages in the error logging message sets.
errupdate #Updates the Error Record Template repository.
Manager syslog
1. Check to see what the syslogd daemon process ID is. In this case, it is 5426.
# ps -ef | grep syslogd
root 5426 4168 0 Nov 01 - 0:00 /usr/sbin/syslogd
root 24938 25854 2 12:04:03 pts/6 0:00 grep syslog
2. Use the stopsrc command to stop the syslogd daemon as follows:
# stopsrc -s syslogd
0513-044 The stop of the syslogd Subsystem was completed successfully.
3. Check if the syslogd daemon has been stopped successfully.
# ps -ef | grep syslogd
root 26112 25854 2 12:04:16 pts/6 0:00 grep syslog
4. Restart the syslogd daemon.
# startsrc -s syslogd
0513-059 The syslogd Subsystem has been started. Subsystem PID is 13494.
The bootinfo -y command will identify the type of system hardware you have,
either 32-bit or 64-bit. If the command returns a 32, you cannot use the 64-bit
kernel.
bootinfo -y
Diag hardware problem
Use the following steps to run diagnostics if you suspect a problem.
1. Run the diag command.
2. Press Enter to advance past the information screen.
3. Select Diagnostic Routines.
4. Select Problem Determination
Alternatively, you could use the following command to perform
the same diagnostics if you suspect a problem with the sysplanar0 device.
diag -d sysplanar0 -v -e
Replace mirror disk
To replace a failed disk drive in a mirrored volume group, run the following
commands:
#unmirrorvg workvg hdisk7
reducevg workvg hdisk7
#rmdev -l hdisk7 -d
Replace the failed disk drive with a new one, and name it hdisk7 by executing
the following commands:
extendvg workvg hdisk7
#mirrorvg workvg
The following command will synchronize the newly created mirrors:
#mirrorvg -S -c 3 workvg
To create an exact mapped volume group, run the following command:
#mirrorvg -m datavg hdisk2 hdisk3
Making an available disk a physical volume
#chdev -l hdisk1 -a pv=yes
The following command is used to turn off the allocation permission for the
physical volume hdisk1:
#chpv -a n hdisk1
To turn the allocation permission back on, use the following command:
#chpv -a y hdisk1
The following command is used to set the state of a physical volume to
unavailable:
#chpv -v r pvname
The following command will make a physical volume available to the system.
#chpv -v a pvname
Removing physical volumes
A physical volume must be unconfigured before it can be removed from the
system. The following example shows how to unconfigure a physical volume
(hdisk1) and change its state from available to defined using the rmdev
command:
#rmdev -l hdisk0
Listing logical volume allocation within a PV
#lspv -l hdisk0
Listing physical partition allocation by PV region
#lspv -p hdisk0
Listing physical partition allocation table
#lspv -M hdisk0
Migrating the contents of a physical volume
#migratepv -l hd5 SourceDiskNumber DestinationDiskNumber
When the boot logical volume is migrated from a physical volume,
the boot record on the source should be cleared. Failure to clear this
record may result in a system hang. When you run the bosboot
command, you must also run: mkboot -c
Run the mkboot -c command to clear the boot record on the source. Do the
following on pre-AIX Version 4.2 systems:
#bosboot -a -d /dev/DestinationDiskNumber
then:
#bootlist -m normal DestinationDiskNumber
then:
#mkboot -c -d /dev/SourceDiskNumber
To remove the source disk from the volume group, such as when it is failing,
enter the following command:
#reducevg VGNname SourceDiskNumber
Before physically removing the source disk from the system, such as when it
is failing, enter the following command:
#rmdev -l SourceDiskNumber -d
The following are additional examples of using the migratepv command:
Use the following command to move physical partitions from hdisk1 to hdisk6
and hdisk7 (all physical volumes are in one volume group):
#migratepv hdisk1 hdisk6 hdisk7
Use the following command to move physical partitions in logical volume lv02
from hdisk1 to hdisk6:
#migratepv -l lv02 hdisk1 hdisk6
Modifying volume group activation characteristics
The following command allows the volume group, newvg, to be varied on
automatically each time a system is restarted:
#chvg -ay newvg
The following command will turn off the automatic varying on of the volume
group, newvg, at the system restart:
#chvg -an newvg
Adding a physical volume
#extendvg newvg hdisk3
Removing a physical volume
#reducevg myvg hdisk3
The following example shows the export of the volume group myvg.
#exportvg myvg
And, the following example shows the import of the volume group myvg.
#importvg -y myvg hdisk12
You can also use exportvg and importvg to change the name of a user-defined
volume group, as shown in the following example:
# lspv
hdisk0 006151409772fa27 rootvg
hdisk1 00382642e0e14dbd vg00
# varyoffvg vg00
# exportvg vg00
# importvg -y cadsvg hdisk1
cadsvg
# lspv
hdisk0 006151409772fa27 rootvg
hdisk1 00382642e0e14dbd cadsvg
Monitoring volume groups
#lsvg
#lsvg -o
Listing the logical volumes in a volume group
#lsvg -l rootvg
List the physical volume status within a volume group
#lsvg -p rootvg
Synchronizing a volume group
To synchronize the copies on physical volumes hdisk04 and hdisk05, run the
following command:
#syncvg -p hdisk04 hdisk05
To synchronize the copies on volume groups vg04 and vg05, run the following
command:
#syncvg -v vg04 vg05
Managing logical volumes
Adding a logical volume
#mklv -y newlv -c 2 rootvg 10
Removing a logical volume using the command line
# rmlv newlv
Reducing the size of a logical volume
The following steps can be performed to reduce the size of a logical volume to
free up excess logical partition allocation:
1. Back up all data in the logical volume.
2. Remove the logical volume.
3. Recreate the logical volume with the reduced logical partition allocation.
4. Restore the data.
Increasing the size of a logical volume
The following example shows the use of the extendlv command to add three
more logical partitions to the logical volume you created:
#extendlv newlv 3
Copying a logical volume using the command line
The following example shows the use of the cplv command to copy a logical
volume:
#cplv -v myvg -y newlv oldlv
The following example demonstrates how to copy a logical volume to an existing
logical volume:
#cplv -e existinglv oldlv
Summary of LVM commands
PV commands
The following commands are most commonly used with physical volume related
tasks.
lsdev Lists devices in the ODM.
chdev Changes the characteristics of a device.
mkdev Adds a device to the system.
chpv Changes the state of the physical volume.
lspv Displays information about a physical volume within a volume
group.
migratepv Moves allocated physical partitions from one physical volume to
one or more other physical volumes.
VG commands
The following commands are most commonly used with volume group related
tasks:
mkvg Creates a new volume group.
extendvg Adds a physical volume to a volume group.
reducevg Removes a physical volume from a volume group.
chvg Changes a volume group.
lsvg Displays information about a volume group.
importvg Installs a volume group.
exportvg Removes a volume group.
reorgvg Reorganizes a volume group.
syncvg Synchronizes a volume group.
varyonvg Makes a volume group available for use.
varyoffvg Makes a volume group unavailable for use.
LV commands
The following are some of the most commonly used logical volume commands:
mklv Creates a logical volume.
lslv Lists the characteristics of a logical volume.
rmlv Removes a logical volume.
extendlv Increases the size of a logical volume.
chlv Changes the characteristic of a logical volume.
mklvcopy Adds copies to a logical volume.
rmlvcopy Removes copies from a logical volume.
File system commands
The following is the list of file systems commands that have been discussed in
this chapter:
chfs Changes the characteristics of a file system.
crfs Adds a file system.
lsfs Displays the characteristics of a file system.
rmfs Removes a file system.
mount Makes a file system available for use.
fsck Checks file system consistency and interactively repairs the file
system.
umount Unmounts a previously mounted file system, directory, or file.
df Reports information about space on file systems.
Displaying paging space characteristics
# lsps -a -c
#Psname:Pvname:Vgname:Size:Used:Active:Auto:Type
paging00:hdisk1:rootvg:20:1:y:y:lv
hd6:hdisk1:rootvg:64:1:y:y:lv
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
paging00 hdisk1 rootvg 80MB 1 yes yes lv
hd6 hdisk1 rootvg 256MB 1 yes yes lv
# lsps -s
Total Paging Space Percent Used
336MB 1%
Adding and activating a paging space
Managing default paging space (hd6)
If you decide to reduce hd6, you must leave enough space for the software
in rootvg. A rule of thumb for reducing hd6 paging space is to leave enough
space to match physical memory. To find out the amount of physical
memory, use the following command:
#lsattr -E -l sys0 -a realmem
1. Create a temporary paging space on rootvg by executing the following
command:
mkps -a -n -s 30 rootvg hdisk0
This command outputs the name of the paging space (paging00 if no others
exist).
2. Use the following command to deactivate the hd6 paging spaces in
preparation for the reboot later in the procedure.
chps -a n hd6
3. Change the paging space entry in the /sbin/rc.boot file from:
swapon /dev/hd6
to
swapon /dev/paging00.
4. Run the following command to check the primary dump device designation.
# sysdumpdev -l
primary /dev/hd6
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
5. If the primary dump device is hd6, change it to some other paging space. The
following command shows how to change the primary dump device to
paging00:
# sysdumpdev -P -p /dev/paging00
primary /dev/paging00
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
6. Create a bootable image with the bosboot command for a hard disk image.
This step is required to update the system image used during initialization to
reflect the changes made to rc.boot.
bosboot -d /dev/hdisk0 -a
7. Put the system key (if present) in the normal position and use the following
command, which will both shutdown the operating system and reboot it.
shutdown -r
8. After the system reboots, remove the hd6 paging space.
rmps hd6
9. Create a new paging space logical volume of the size 120 MB for the hd6
paging space.
mklv -t paging -y hd6 rootvg 30
10.Use the lsps -a command to verify the reduced size of the default paging
space hd6.
11.Change the primary dump device designation back to be the paging space
hd6.
sysdumpdev -P -p /dev/hd6
12.Change the paging space entry in the /sbin/rc.boot file from:
swapon /dev/paging00
to
swapon /dev/hd6.
13.Create a bootable image with the bosboot command for a hard disk image.
bosboot -d /dev/hdisk0 -a
14.Run the following command to make the new hd6 paging space automatically
activate when the system reboots.
chps -a y hd6
15.Run the following command to change the attribute of temporary paging
space, paging00, so that it does not automatically activate after the next
reboot.
chps -a n paging00
16.Put the system key (if present) in the normal position and use the following
command to shutdown and reboot the system:
shutdown -r
17.After the system reboots, remove the temporary paging space.
rmps paging00
System backup, restores,and availability
There are various commands you can use to make backups of systems. The
following is a list of the most common commands for backups. A short description
of each is given here with a list of their respective flags in Table 8-1 on page 214.
tar
The tar command manipulates archives by writing files to, or
retrieving files from, an archive storage medium. The files used by
the tar command are represented by the File parameter. If the File
parameter refers to a directory, then that directory and, recursively, all
files and directories within it are referenced as well.
cpio
The cpio command copies files into and out of archive storage and
directories.
dd
The dd command reads the InFile parameter or standard input, does
the specified conversions, then copies the converted data to the
OutFile parameter or standard output. The input and output block
size can be specified to take advantage of raw physical I/O.
pax
The pax command should be the archive of choice for system dumps
and images greater than 2 GB in size.
mksysb
The mksysb command creates an installable image of the root volume
group either in a file or onto a bootable tape.
savevg
The savevg command saves non-root volume groups.
backup
The backup command creates copies of your files on a backup
medium, such as a magnetic tape or diskette. The copies are in one
of the two backup formats: Either specific files backed up (using the -i
flag), or the entire file system backed up by i-node.
restore
The restore command reads archives created by the backup
command and extracts the files stored on them. These archives can
be in either file-name or file-system format.
restvg
Use the restvg command to restore a volume group.
tctl
Use the tctl command to control a tape device.
User administration related commands
The following are a few of the important commands used for user administration:
mkuser
Creates a new user.
passwd
Creates or changes the password of a user.
chuser
Changes user attributes (except password).
lsuser
Lists user attributes.
rmuser
Removes a user and its attributes.
chsec
Changes security related stanzas.
login
Initiates a user session.
who
Identifies the users currently logged in.
dtconfig
Enables or disables the desktop autostart feature.
The following files are referenced while doing user administration:
/etc/security/environ Contains the environment attributes for users.
/etc/security/lastlog Contains the last login attributes for users.
/etc/security/limits Contains process resource limits for users.
/etc/security/user Contains extended attributes for users.
/usr/lib/security/mkuser.default Contains the default attributes for new users.
/usr/lib/security/mkuser.sys Customizes new user accounts.
/etc/passwd Contains the basic attributes of users.
/etc/security/passwd Contains password information.
/etc/security/login.cfg Contains configuration information for login
and user authentication.
/etc/utmp Contains the record of users logged into the
system.
/var/adm/wtmp Contains connect time accounting records.
/etc/security/failedlogin Records all failed login attempts.
/etc/motd Contains the message to be displayed every
time a user logs in to the system.
/etc/environment Specifies the basic environment for all
processes.
/etc/profile Specifies additional environment settings for
all users.
$HOME/.profile Specifies environment settings for specific
user needs.
/etc/group Contains the basic attributes of groups.
/etc/security/group Contains the extended attributes of groups.
1、計劃很重要,包括:
Cluster ID和Cluster Name 定義
網路規劃(TCPIP和串列埠網路)
磁碟陣列規劃
Application Server(Monitor)規劃
自定義事件
等等...
2、Cluster Configuration
Define Cluster Topology (on one node)
cluster definition
cluster nodes
network adapters
network modules
Synchronize Cluster Topology (to other nodes)
Define Application Server
Define Resource Groups and Assign Resources into this RG(on one node)
Disks
VGs
FSs
Network Addresses
Application Servers
name
start script
stop script
......
Verify Environment
Synchronize Cluster Resources to other nodes
HACMP啟動與停止
1.啟動某臺主機上的cluster:
smitty clstart
或:smitty hacmp
->cluster service management
->Start the Cluster
或:rc.cluster -N -boot -i
2.停止某臺主機上的cluster
smitty clstop
或:smitty hacmp ->....
或:clstop -gry
HACMP診斷
1.tail -f /tmp/hacmp.out察看hacmp產生的日誌
2.lsvg -o 察看datavg是否掛在本機上(判斷主用)
3.ifconfig -a 察看service ip是否在本機上.
4.ps -ef 察看application server是否啟動了.
5.lssrc -g cluster 察看cluster相關程式是否啟動
6.clstat -a 或cl_status 察看cluster狀態
7.lslpp -l cluster.* 察看HACMP安裝資訊
如何對cluster配置進行備份和恢復
1.備份:
smitty hacmp ->Cluster Configuration->
Cluster Snapshots-> Add a Cluster Snapshot
輸入名字後,即可在
/usr/es/sbin/cluster/snapshots目錄下獲得兩個文字檔案:*.odm和*.info
2.恢復:
smitty hacmp ->Cluster Configuration->
Cluster Snapshots-> Apply a Cluster Snapshot
eerpt
errpt -a
errpt -aj 2BFA76F6
Displaying errors by time reference
If you suspect that the errors were encountered during the last day, you can
display a detailed report of all errors logged in the past 24 hours, where the string
equals the current month, day, hour, minute, and year, minus 24 hours. To do so,
use the errpt command as follows:
# date
Wed Aug 29 09:30:42 CDT 2001
# errpt -a -s 0828093001
errclear #Deletes entries from the error log.
errinstall #Installs messages in the error logging message sets.
errupdate #Updates the Error Record Template repository.
Manager syslog
1. Check to see what the syslogd daemon process ID is. In this case, it is 5426.
# ps -ef | grep syslogd
root 5426 4168 0 Nov 01 - 0:00 /usr/sbin/syslogd
root 24938 25854 2 12:04:03 pts/6 0:00 grep syslog
2. Use the stopsrc command to stop the syslogd daemon as follows:
# stopsrc -s syslogd
0513-044 The stop of the syslogd Subsystem was completed successfully.
3. Check if the syslogd daemon has been stopped successfully.
# ps -ef | grep syslogd
root 26112 25854 2 12:04:16 pts/6 0:00 grep syslog
4. Restart the syslogd daemon.
# startsrc -s syslogd
0513-059 The syslogd Subsystem has been started. Subsystem PID is 13494.
The bootinfo -y command will identify the type of system hardware you have,
either 32-bit or 64-bit. If the command returns a 32, you cannot use the 64-bit
kernel.
bootinfo -y
Diag hardware problem
Use the following steps to run diagnostics if you suspect a problem.
1. Run the diag command.
2. Press Enter to advance past the information screen.
3. Select Diagnostic Routines.
4. Select Problem Determination
Alternatively, you could use the following command to perform
the same diagnostics if you suspect a problem with the sysplanar0 device.
diag -d sysplanar0 -v -e
Replace mirror disk
To replace a failed disk drive in a mirrored volume group, run the following
commands:
#unmirrorvg workvg hdisk7
reducevg workvg hdisk7
#rmdev -l hdisk7 -d
Replace the failed disk drive with a new one, and name it hdisk7 by executing
the following commands:
extendvg workvg hdisk7
#mirrorvg workvg
The following command will synchronize the newly created mirrors:
#mirrorvg -S -c 3 workvg
To create an exact mapped volume group, run the following command:
#mirrorvg -m datavg hdisk2 hdisk3
Making an available disk a physical volume
#chdev -l hdisk1 -a pv=yes
The following command is used to turn off the allocation permission for the
physical volume hdisk1:
#chpv -a n hdisk1
To turn the allocation permission back on, use the following command:
#chpv -a y hdisk1
The following command is used to set the state of a physical volume to
unavailable:
#chpv -v r pvname
The following command will make a physical volume available to the system.
#chpv -v a pvname
Removing physical volumes
A physical volume must be unconfigured before it can be removed from the
system. The following example shows how to unconfigure a physical volume
(hdisk1) and change its state from available to defined using the rmdev
command:
#rmdev -l hdisk0
Listing logical volume allocation within a PV
#lspv -l hdisk0
Listing physical partition allocation by PV region
#lspv -p hdisk0
Listing physical partition allocation table
#lspv -M hdisk0
Migrating the contents of a physical volume
#migratepv -l hd5 SourceDiskNumber DestinationDiskNumber
When the boot logical volume is migrated from a physical volume,
the boot record on the source should be cleared. Failure to clear this
record may result in a system hang. When you run the bosboot
command, you must also run: mkboot -c
Run the mkboot -c command to clear the boot record on the source. Do the
following on pre-AIX Version 4.2 systems:
#bosboot -a -d /dev/DestinationDiskNumber
then:
#bootlist -m normal DestinationDiskNumber
then:
#mkboot -c -d /dev/SourceDiskNumber
To remove the source disk from the volume group, such as when it is failing,
enter the following command:
#reducevg VGNname SourceDiskNumber
Before physically removing the source disk from the system, such as when it
is failing, enter the following command:
#rmdev -l SourceDiskNumber -d
The following are additional examples of using the migratepv command:
Use the following command to move physical partitions from hdisk1 to hdisk6
and hdisk7 (all physical volumes are in one volume group):
#migratepv hdisk1 hdisk6 hdisk7
Use the following command to move physical partitions in logical volume lv02
from hdisk1 to hdisk6:
#migratepv -l lv02 hdisk1 hdisk6
Modifying volume group activation characteristics
The following command allows the volume group, newvg, to be varied on
automatically each time a system is restarted:
#chvg -ay newvg
The following command will turn off the automatic varying on of the volume
group, newvg, at the system restart:
#chvg -an newvg
Adding a physical volume
#extendvg newvg hdisk3
Removing a physical volume
#reducevg myvg hdisk3
The following example shows the export of the volume group myvg.
#exportvg myvg
And, the following example shows the import of the volume group myvg.
#importvg -y myvg hdisk12
You can also use exportvg and importvg to change the name of a user-defined
volume group, as shown in the following example:
# lspv
hdisk0 006151409772fa27 rootvg
hdisk1 00382642e0e14dbd vg00
# varyoffvg vg00
# exportvg vg00
# importvg -y cadsvg hdisk1
cadsvg
# lspv
hdisk0 006151409772fa27 rootvg
hdisk1 00382642e0e14dbd cadsvg
Monitoring volume groups
#lsvg
#lsvg -o
Listing the logical volumes in a volume group
#lsvg -l rootvg
List the physical volume status within a volume group
#lsvg -p rootvg
Synchronizing a volume group
To synchronize the copies on physical volumes hdisk04 and hdisk05, run the
following command:
#syncvg -p hdisk04 hdisk05
To synchronize the copies on volume groups vg04 and vg05, run the following
command:
#syncvg -v vg04 vg05
Managing logical volumes
Adding a logical volume
#mklv -y newlv -c 2 rootvg 10
Removing a logical volume using the command line
# rmlv newlv
Reducing the size of a logical volume
The following steps can be performed to reduce the size of a logical volume to
free up excess logical partition allocation:
1. Back up all data in the logical volume.
2. Remove the logical volume.
3. Recreate the logical volume with the reduced logical partition allocation.
4. Restore the data.
Increasing the size of a logical volume
The following example shows the use of the extendlv command to add three
more logical partitions to the logical volume you created:
#extendlv newlv 3
Copying a logical volume using the command line
The following example shows the use of the cplv command to copy a logical
volume:
#cplv -v myvg -y newlv oldlv
The following example demonstrates how to copy a logical volume to an existing
logical volume:
#cplv -e existinglv oldlv
Summary of LVM commands
PV commands
The following commands are most commonly used with physical volume related
tasks.
lsdev Lists devices in the ODM.
chdev Changes the characteristics of a device.
mkdev Adds a device to the system.
chpv Changes the state of the physical volume.
lspv Displays information about a physical volume within a volume
group.
migratepv Moves allocated physical partitions from one physical volume to
one or more other physical volumes.
VG commands
The following commands are most commonly used with volume group related
tasks:
mkvg Creates a new volume group.
extendvg Adds a physical volume to a volume group.
reducevg Removes a physical volume from a volume group.
chvg Changes a volume group.
lsvg Displays information about a volume group.
importvg Installs a volume group.
exportvg Removes a volume group.
reorgvg Reorganizes a volume group.
syncvg Synchronizes a volume group.
varyonvg Makes a volume group available for use.
varyoffvg Makes a volume group unavailable for use.
LV commands
The following are some of the most commonly used logical volume commands:
mklv Creates a logical volume.
lslv Lists the characteristics of a logical volume.
rmlv Removes a logical volume.
extendlv Increases the size of a logical volume.
chlv Changes the characteristic of a logical volume.
mklvcopy Adds copies to a logical volume.
rmlvcopy Removes copies from a logical volume.
File system commands
The following is the list of file systems commands that have been discussed in
this chapter:
chfs Changes the characteristics of a file system.
crfs Adds a file system.
lsfs Displays the characteristics of a file system.
rmfs Removes a file system.
mount Makes a file system available for use.
fsck Checks file system consistency and interactively repairs the file
system.
umount Unmounts a previously mounted file system, directory, or file.
df Reports information about space on file systems.
Displaying paging space characteristics
# lsps -a -c
#Psname:Pvname:Vgname:Size:Used:Active:Auto:Type
paging00:hdisk1:rootvg:20:1:y:y:lv
hd6:hdisk1:rootvg:64:1:y:y:lv
# lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
paging00 hdisk1 rootvg 80MB 1 yes yes lv
hd6 hdisk1 rootvg 256MB 1 yes yes lv
# lsps -s
Total Paging Space Percent Used
336MB 1%
Adding and activating a paging space
Managing default paging space (hd6)
If you decide to reduce hd6, you must leave enough space for the software
in rootvg. A rule of thumb for reducing hd6 paging space is to leave enough
space to match physical memory. To find out the amount of physical
memory, use the following command:
#lsattr -E -l sys0 -a realmem
1. Create a temporary paging space on rootvg by executing the following
command:
mkps -a -n -s 30 rootvg hdisk0
This command outputs the name of the paging space (paging00 if no others
exist).
2. Use the following command to deactivate the hd6 paging spaces in
preparation for the reboot later in the procedure.
chps -a n hd6
3. Change the paging space entry in the /sbin/rc.boot file from:
swapon /dev/hd6
to
swapon /dev/paging00.
4. Run the following command to check the primary dump device designation.
# sysdumpdev -l
primary /dev/hd6
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
5. If the primary dump device is hd6, change it to some other paging space. The
following command shows how to change the primary dump device to
paging00:
# sysdumpdev -P -p /dev/paging00
primary /dev/paging00
secondary /dev/sysdumpnull
copy directory /var/adm/ras
forced copy flag TRUE
always allow dump FALSE
6. Create a bootable image with the bosboot command for a hard disk image.
This step is required to update the system image used during initialization to
reflect the changes made to rc.boot.
bosboot -d /dev/hdisk0 -a
7. Put the system key (if present) in the normal position and use the following
command, which will both shutdown the operating system and reboot it.
shutdown -r
8. After the system reboots, remove the hd6 paging space.
rmps hd6
9. Create a new paging space logical volume of the size 120 MB for the hd6
paging space.
mklv -t paging -y hd6 rootvg 30
10.Use the lsps -a command to verify the reduced size of the default paging
space hd6.
11.Change the primary dump device designation back to be the paging space
hd6.
sysdumpdev -P -p /dev/hd6
12.Change the paging space entry in the /sbin/rc.boot file from:
swapon /dev/paging00
to
swapon /dev/hd6.
13.Create a bootable image with the bosboot command for a hard disk image.
bosboot -d /dev/hdisk0 -a
14.Run the following command to make the new hd6 paging space automatically
activate when the system reboots.
chps -a y hd6
15.Run the following command to change the attribute of temporary paging
space, paging00, so that it does not automatically activate after the next
reboot.
chps -a n paging00
16.Put the system key (if present) in the normal position and use the following
command to shutdown and reboot the system:
shutdown -r
17.After the system reboots, remove the temporary paging space.
rmps paging00
System backup, restores,and availability
There are various commands you can use to make backups of systems. The
following is a list of the most common commands for backups. A short description
of each is given here with a list of their respective flags in Table 8-1 on page 214.
tar
The tar command manipulates archives by writing files to, or
retrieving files from, an archive storage medium. The files used by
the tar command are represented by the File parameter. If the File
parameter refers to a directory, then that directory and, recursively, all
files and directories within it are referenced as well.
cpio
The cpio command copies files into and out of archive storage and
directories.
dd
The dd command reads the InFile parameter or standard input, does
the specified conversions, then copies the converted data to the
OutFile parameter or standard output. The input and output block
size can be specified to take advantage of raw physical I/O.
pax
The pax command should be the archive of choice for system dumps
and images greater than 2 GB in size.
mksysb
The mksysb command creates an installable image of the root volume
group either in a file or onto a bootable tape.
savevg
The savevg command saves non-root volume groups.
backup
The backup command creates copies of your files on a backup
medium, such as a magnetic tape or diskette. The copies are in one
of the two backup formats: Either specific files backed up (using the -i
flag), or the entire file system backed up by i-node.
restore
The restore command reads archives created by the backup
command and extracts the files stored on them. These archives can
be in either file-name or file-system format.
restvg
Use the restvg command to restore a volume group.
tctl
Use the tctl command to control a tape device.
User administration related commands
The following are a few of the important commands used for user administration:
mkuser
Creates a new user.
passwd
Creates or changes the password of a user.
chuser
Changes user attributes (except password).
lsuser
Lists user attributes.
rmuser
Removes a user and its attributes.
chsec
Changes security related stanzas.
login
Initiates a user session.
who
Identifies the users currently logged in.
dtconfig
Enables or disables the desktop autostart feature.
The following files are referenced while doing user administration:
/etc/security/environ Contains the environment attributes for users.
/etc/security/lastlog Contains the last login attributes for users.
/etc/security/limits Contains process resource limits for users.
/etc/security/user Contains extended attributes for users.
/usr/lib/security/mkuser.default Contains the default attributes for new users.
/usr/lib/security/mkuser.sys Customizes new user accounts.
/etc/passwd Contains the basic attributes of users.
/etc/security/passwd Contains password information.
/etc/security/login.cfg Contains configuration information for login
and user authentication.
/etc/utmp Contains the record of users logged into the
system.
/var/adm/wtmp Contains connect time accounting records.
/etc/security/failedlogin Records all failed login attempts.
/etc/motd Contains the message to be displayed every
time a user logs in to the system.
/etc/environment Specifies the basic environment for all
processes.
/etc/profile Specifies additional environment settings for
all users.
$HOME/.profile Specifies environment settings for specific
user needs.
/etc/group Contains the basic attributes of groups.
/etc/security/group Contains the extended attributes of groups.
1、計劃很重要,包括:
Cluster ID和Cluster Name 定義
網路規劃(TCPIP和串列埠網路)
磁碟陣列規劃
Application Server(Monitor)規劃
自定義事件
等等...
2、Cluster Configuration
Define Cluster Topology (on one node)
cluster definition
cluster nodes
network adapters
network modules
Synchronize Cluster Topology (to other nodes)
Define Application Server
Define Resource Groups and Assign Resources into this RG(on one node)
Disks
VGs
FSs
Network Addresses
Application Servers
name
start script
stop script
......
Verify Environment
Synchronize Cluster Resources to other nodes
HACMP啟動與停止
1.啟動某臺主機上的cluster:
smitty clstart
或:smitty hacmp
->cluster service management
->Start the Cluster
或:rc.cluster -N -boot -i
2.停止某臺主機上的cluster
smitty clstop
或:smitty hacmp ->....
或:clstop -gry
HACMP診斷
1.tail -f /tmp/hacmp.out察看hacmp產生的日誌
2.lsvg -o 察看datavg是否掛在本機上(判斷主用)
3.ifconfig -a 察看service ip是否在本機上.
4.ps -ef 察看application server是否啟動了.
5.lssrc -g cluster 察看cluster相關程式是否啟動
6.clstat -a 或cl_status 察看cluster狀態
7.lslpp -l cluster.* 察看HACMP安裝資訊
如何對cluster配置進行備份和恢復
1.備份:
smitty hacmp ->Cluster Configuration->
Cluster Snapshots-> Add a Cluster Snapshot
輸入名字後,即可在
/usr/es/sbin/cluster/snapshots目錄下獲得兩個文字檔案:*.odm和*.info
2.恢復:
smitty hacmp ->Cluster Configuration->
Cluster Snapshots-> Apply a Cluster Snapshot
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9479798/viewspace-1050085/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle dg 維護常用操作和調優Oracle
- Oracle data guard常用維護操作命令(轉)Oracle
- 資料庫維護常用操作命令1-表操作資料庫
- Oracle 11gR2 RAC 常用維護操作Oracle
- 資料庫維護常用操作4--表空間操作資料庫
- AIX 常用操作及命令AI
- Oracle11g RAC常用操作 (維護及管理)Oracle
- Oracle 10g RAC 常用維護操作 說明Oracle 10g
- IBM AIX日常維護命令IBMAI
- 資料庫維護常用操作命令1--約束資料庫
- 資料庫維護常用操作命令2--約束資料庫
- Oracle 11gR2 RAC 常用維護操作 說明Oracle
- dba 常用維護sqlSQL
- oracle 維護常用SQLOracleSQL
- Oracle 11gR2 RAC 常用維護操作 說明(轉)Oracle
- Mysql常用的維護 SQLMySql
- oracle常用維護查詢Oracle
- Linux-Unix系統操作與維護常用命令Linux
- 資料庫維護常用操作3--DDL語句檢視資料庫
- 資料庫常用維護命令資料庫
- ORACLE DG 日常維護常用SQLOracleSQL
- rac常用維護工具和命令
- mysql維護常用命令MySql
- hbase叢集 常用維護命令
- Oracle維護常用SQL語句OracleSQL
- redo logfile的維護操作
- 雙棧維護頭尾操作
- AIX操作相關常用命令整理AI
- 【PDB】Oracle pdb維護常用sql命令OracleSQL
- SQLServer索引維護常用方法總結SQLServer索引
- nginx日常維護常用命令Nginx
- Oracle常用維護語句總結Oracle
- solaris 10維護常用命令
- Oracle RAC 常用維護工具和命令Oracle
- 轉:維護常用SQL語句收集!SQL
- Mysql optimize、Analyze、check、repair維護操作MySqlAI
- Logical Standby的維護操作_SKIP
- 轉貼:Oracle維護常用SQL語句OracleSQL