Sunday, 1 July 2012


Finding and fixing a corrupt ODM install

Good day. Recently it was discovered that one of the AIX servers is having an issue with a multitude of powerpath devices. When issuing a lsdev |grep hdiskpower | wc -l I was surprised to see over 3000 finds. Upon looking at what was currently being used with lspv |grep power I noticed there was like half a dozen maybe in use.
Upgrading the ODM to a newer version didn’t help much. It took over 2.5 hours to remove all of the hdiskpower devices, followed by installing 3 additional ones. A reboot of the AIX system didn’t help either. Upon scouring the web, I have found a few places which indicate the following procedure should fix up the issue (at the moment this is untested). I’ll be validating this information within the next week.
* Shutdown the Application(s), Database(s), etc and varyoff all Volume Groups (VGs) except rootvg. This can be confirmed with lsvg -o
* If EMC Solutions Enabler is running, disable with stordaemon shutdown all -immediate
* Remove paths from the PowerPath Configuration –> powermt remove hba=all
* Delete all Symmetrix Disks –> lsdev -CtSYMM* -Fname |xargs -n1 rmdev -dl
* Delete all hdiskpower devices –> rmdev -dl powerpath0
* Confirm they’re gone with –> lsdev -Cc disk (no symmextrix nor hdiskpower devices should exist)
* Remove all fibre devices instances -> rmdev -Rdl fscsi0 (repeat for others like fscsi1 etc)
* Verify fibre adapters are gone –> lsdev -Cc adapter (no fscsi should exist)
* Put the hba devices into a defined state –> rmdev -l fcsX (replace x with 0, 1 etc)
* Scan the bus –> emc_cfgmgr or cfgmgr -vl fcsX NOTE: emc_cgrmgr is a script downloadable from EMC’s website
* Configure all of the EMC devices into PowerPath –> powermt config
* Some final checks –> powermt display & powermt display dev=all & lsdev -Cc disk
* Finally save your changes with –> powermt save
MPIO settings (if applicable) may have to be put in again. If so, they can be changed like so:
chdev -l fscsiX -a dyntrk=yes -a fc_err_recov=fast_fail (repeat for other adapters)
A reboot should NOT be necessary. However, I’ll confirm and update within a week.
= Varying degrees of success =
No issues up until “rmdev -dl powerpath0″. Got this response instead:
rmdev -dl powerpath0
Method error (/etc/methods/ucfgpower):
0514-062 Cannot perform the requested function because the
specified device is busy.
Hence, done the lsdev -Cc disk option. It listed the two local SAS drives, and the 3000+ hdiskpower devices (all of the hdiskpower devices were in a Defined state). Hence, attempted a manual removal of those with the following line of code:
lsdev -Cc disk | grep hdiskpower | awk {'print "rmdev -dl " $1'} | sh
This slowly started to delete each of them one at a time. Time for a coffee break apparently!
Once the 3135 hdiskpower devices were deleted, the rmdev -dl powerpath0command worked as expected. Rest of the procedure worked as planned. Lastly set the MPIO settings with the command:
chdev -l fscsi0 -a dyntrk=yes -a fc_err_recov=fast_fail -P
chdev -l fscsi1 dyntrk=yes -a fc_err_recov=fast_fail -P
MPIO settings took effect after reboot.

Creating LPAR from command line from HMC


Creating LPAR from command line from HMC

Create new LPAR using command line

mksyscfg -r lpar -m MACHINE -i name=LPARNAME, profile_name=normal, lpar_env=aixlinux, shared_proc_pool_util_auth=1,min_mem=512, desired_mem=2048, max_mem=4096, proc_mode=shared, min_proc_units=0.2, desired_proc_units=0.5,max_proc_units=2.0, min_procs=1, desired_procs=2, max_procs=2, sharing_mode=uncap, uncap_weight=128,boot_mode=norm, conn_monitoring=1, shared_proc_pool_util_auth=1


Note :- Use man mksyscfg command for all flag information.

Onother method of creating LPAR through configuration file we need to create more than one lPAR at same time

Here is an example for 2 LPARs, each definition starting at new line:

name=LPAR1,profile_name=normal,lpar_env=aixlinux,all_resources=0,min_mem=1024,desired_mem=9216,max_mem=9216,proc_mode=shared,min_proc_units=0.3,desired_proc_units=1.0,max_proc_units=3.0,min_procs=1,desired_procs=3,max_procs=3,sharing_mode=uncap,uncap_weight=128,lpar_io_pool_ids=none,max_virtual_slots=10,"virtual_scsi_adapters=6/client/4/vio1a/11/1,7/client/9/vio2a/11/1","virtual_eth_adapters=4/0/3//0/1,5/0/4//0/1",boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,shared_proc_pool_util_auth=1
name=LPAR2,profile_name=normal,lpar_env=aixlinux,all_resources=0,min_mem=1024,desired_mem=9216,max_mem=9216,proc_mode=shared,min_proc_units=0.3,desired_proc_units=1.0,max_proc_units=3.0,min_procs=1,desired_procs=3,max_procs=3,sharing_mode=uncap,uncap_weight=128,lpar_io_pool_ids=none,max_virtual_slots=10,"virtual_scsi_adapters=6/client/4/vio1a/12/1,7/client/9/vio2a/12/1","virtual_eth_adapters=4/0/3//0/1,5/0/4//0/1",boot_mode=norm,conn_monitoring=1,auto_start=0,power_ctrl_lpar_ids=none,work_group_id=none,shared_proc_pool_util_auth=1

Copy this file to HMC and run:

mksyscfg -r lpar -m SERVERNAME -f /tmp/profiles.txt

where profiles.txt contains all LPAR informations as mentioned above.

To change setting of your Lpar use chsyscfg command as mentioned below.

Virtual scsi creation & Mapping Slots
#chsyscfg -m Server-9117-MMA-SNXXXXX -r prof -i 'name=server_name,lpar_id=xx,"virtual_scsi_adapters=301/client/4/vio01_server/301/0,303/client/4/vio02/303/0,305/client/4/vio01_server/305/0,307/client/4/vio02_server/307/0"'

IN Above mentioned command we are creating Virtual scsi adapter for client LPAR & doing Slot mapping with VIO servers. In above scenario there is two VIO servers for redundancy.


Slot Mapping

Vio01_server ( VSCSI server slot) Client ( Vscsi client Slot)
Slot 301 Slot 301
Slot 303 Slot 303

VIO02_server (VSCSI sever Slot) Client ( VSCSI client Slot)
Slot 305 Slot 305
Slot 307 Slot 307


These Slot are mapped in such a way if Any disk or logical volume are mapped to Virtuals scsi adapter through VIO command "mkvdev".

Syntax for Virtual scsi adapter


virtual-slot-number/client-or-server/supports-HMC/remote-lpar-ID/remote-lpar-name/remote-slot-number/is-required


As in command above mentioned command mksyscfg"virtual_scsi_adapters=301/client/4/vio01_server/301/0"

means

301 - virtual-slot-number
client-or-server - client (Aix_client)
4 -- Partiotion Id ov VIO_01 server (remote-lpar-ID)
vio01_server - remote-lpar-name
301 -- remote-slot-number (VIO server_slot means virtual server scsi slot)
1 -- Required slot in LPAR ( It cannot be removed from DLPAR operations )
0 --means desired ( it can be removed by DLPAR operations)


To add Virtual ethernet adapter & slot mapping for above created profile

#chsyscfg -m Server-9117-MMA-SNxxxxx -r prof -i 'name=server_name,lpar_id=xx,"virtual_eth_adapters=596/1/596//0/1,506/1/506//0/1,"'

Syntax for Virtual ethernet adapter


slot_number/is_ieee/port_vlan_id/"additional_vlan_id,additional_vlan_id"/is_trunk(number=priority)/is_required

means

So the adapter with this setting 596/1/596//0/1 would say it is in slot_number 596, Its is ieee, the port_vlan_id is 1, it has no VLAN id assigned, It is not a trunk adapter and it is required.

Recovering a Failed VIO Disk




Here is a recovery procedure for replacing a failed client disk on a Virtual IO 
server. It assumes the client partitions have mirrored (virtual) disks. The 
recovery involves both the VIO server and its client partitions. However, 
it is non disruptive for the client partitions (no downtime), and may be 
non disruptive on the VIO server (depending on disk configuration). This
procedure does not apply to Raid5 or SAN disk failures.

The test system had two VIO servers and an AIX client. The AIX client had two 
virtual disks (one disk from each VIO server). The two virtual disks 
were mirrored in the client using AIX's mirrorvg. (The procedure would be 
the same on a single VIO server with two disks.) 

The software levels were:


p520: Firmware SF230_145 VIO Version 1.2.0 Client: AIX 5.3 ML3 


We had simulated the disk failure by removing the client LV on one VIO server. The 
padmin commands to simulate the failure were:


#rmdev -dev vtscsi01 # The virtual scsi device for the LV (lsmap -all)
#rmlv -f aix_client_lv # Remove the client LV


This caused "hdisk1" on the AIX client to go "missing" ("lsvg -p rootvg"....The
"lspv" will not show disk failure...only the disk status at the last boot..)

The recovery steps included:

VIO Server 


Fix the disk failure, and restore the VIOS operating system (if necessary)mklv -lv aix_client_lv rootvg 10G # recreate the client LV mkvdev -vdev aix_client_lv -vadapter vhost1 # connect the client LV to the appropriate vhost 


AIX Client 


# cfgmgr # discover the new virtual hdisk2 
replacepv hdisk1 hdisk2 
# rebuild the mirror copy on hdisk2 
# bosboot -ad /dev/hdisk2 ( add boot image to hdisk2)
# bootlist -m normal hdisk0 hdisk2 ( add the new disk to the bootlist)

# rmdev -dl hdisk1 ( remove failed hdisk1)


The "replacepv" command assigns hdisk2 to the volume group, rebuilds the mirror, and 
then removes hdisk1 from the volume group. 

As always, be sure to test this procedure before using in production.
Virtual SCSI Server Adapter and Virtual Target Device.
The mkvdev command will error out if the same name for both is used.

$ mkvdev -vdev hdiskpower0 -vadapter vhost0 -dev hdiskpower0
Method error (/usr/lib/methods/define -g -d):
0514-013 Logical name is required.

The reserve attribute is named differently for an EMC device than the attribute
for ESS or FasTt storage device. It is “reserve_lock”.

Run the following command as padmin for checking the value of the attribute.
lsdev -dev hdiskpower# -attr reserve_lock

Run the following command as padmin for changing the value of the attribute.
chdev -dev hdiskpower# -attr reserve_lock=no

Commands to change the Fibre Channel Adapter attributes And also change the following attributes of the fscsi#, fc_err_recov to “fast_fail” and dyntrk to “yes”


$ chdev -dev fscsi# -attr fc_err_recov=fast_fail dyntrk=yes –perm

The reason for changing the fc_err_recov to “fast_fail” is that if the Fibre
Channel adapter driver detects a link event such as a lost link between a storage
device and a switch, then any new I/O or future retries of the failed I/Os will be
failed immediately by the adapter until the adapter driver detects that the device
has rejoined the fabric. The default setting for this attribute is 'delayed_fail’.
Setting the dyntrk attribute to “yes” makes AIX tolerate cabling changes in the
SAN.

The VIOS needs to be rebooted for fscsi# attributes to take effect.

Thursday, 28 June 2012

VIOS Installation over NIM


IBM VIOS Installation over NIM

Prerequisites
IBM VIOS Installation DVD
IBM AIX Installation CD Disk 1 (I used AIX 5.3)
AIX NIM Server (I used AIX 5.3)
Power Series 5
Step 1. Prepare Installation files:
AIX File Limit SizeYou must ensure that your file size security limitation isn't going to stop you from copying your mksysb image from your cdrom to your hard drive. On your NIM server, go to the /etc/security directory and edit the limits file. Change the fsize to -1 or something large enough to ensure the mksysb image will copy over. You will need to reboot your system for this to take place, or you can log out and log in again.
cd /etc/securityvi limitsfsize = -1reboot or logout
Insert and Mount VIOS DVD
smitty mountfsFILE SYSTEM name: /dev/cd0DIRECTORY over which to mount: /cdromTYPE of file system: cdrfsMount as a READ-ONLY system? yes(or mkdir /cdrommount -v cdrfs -o ro /dev/cd0 /cdrom )
Copy installation files from cdrom:
mkdir /export/VIOScd /cdrom/nimol/ioserver_res
-rw-r--r-- 1 root system 11969032 Jul 05 07:07 booti.chrp.mp.ent.Z
-rw-r--r-- 1 root system 951 Jul 05 07:07 bosinst.data
-rw-r--r-- 1 root system 40723208 Jul 05 07:07 ispot.tar.Z
lrwxrwxrwx 1 root system 38 Jul 05 07:07 mksysb -> ../../usr/sys/inst.images/mksysb_image
cp bosinst.data /export/VIOScd /cdrom/usr/sys/inst.images
-rw-r--r-- 1 root system 1101926400 Jul 05 06:52 mksysb_image
cp mksysb_image /export/VIOS
For newer versions of vio like 1.5.2 & 2.1 you need to do the following:cp mksysb_image2 /export/VIOScd /export/VIOScat mksysb_image2 >> mksysb_image
Step 2. Define NIM Resources:
Define the mksysb_image resource object
nim -o define -t mksysb -a location=/export/VIOS/mksysb_image -a server=master vios_mksysb
Define the SPOT resource object
mkdir /export/VIOSSPOTnim -o define -t spot -a server=master -a location=/export/VIOS/VIOSSPOT -a source=vios_mksysb vios_spot
# nim -o define -t spot -a server=master -a location=/export/VIOS/VIOSSPOT -a so
urce=vios_mksysb vios_spot
Creating SPOT in "/export/VIOS/VIOSSPOT" on machine "master" from "vios_mksysb"
...
Restoring files from BOS image. This may take several minutes ...
Checking filesets and network boot images for SPOT "vios_spot".
This may take several minutes ...
Define the bosinst resource object
nim -o define -t bosinst_data -a location=/export/VIOS/bosinst.data -a server=master vios_bosinst
Define the lpp_source resource object.( You might skip this step if you wish as lpp_source provides extra filesets. But you should be able to install/runvio without lpp_source, same as AIX. Also note that different VIO version is based on different AIX version.You need to find which AIX version you need to create the lpp_source. Run lsnim -l vios_mksysb and you willsee the AIX version. You need that CD to create the lpp_source. For example for VIO 1.5 you need AIX 5.3 TL7 CD1, for 1.5.2 you need AIX 5.3 TL8 CD1 for 2.1 you need AIX 6.1 TL2. But always run lsnim -l command on the mksysb or the spot you just created to find which AIX CD you need.)
Insert the first disk of the AIX installation. NOTE: When trying to use the VIOS lpp_source, when trying to NIM an LPAR, you get a missing simages error. So instead, we will use the AIX installation CDs, which works just fine.
umount /cdrommkdir /export/VIOS/lppsourcenim -o define -t lpp_source -a source=/dev/cd0 -a server=master -a location=/export/VIOS/lppsource vios_lppsource
Step 3. Create VIOS LPAR:
NOTE: I don't have any pictures of this part of the setup, but it should be obvious how this is doneNOTE: I give specifications for a typical VIOS server. Your environment may vary.
On the Power 5 HMC, right click on Partitions and select Create -> Logical Partition
Enter a Parition ID and a Partition name. Under Partition environment, select Virtual I/O server.
Select Next.
Configure the workload group, otherwise select No. Select Next.
Enter a Profile Name. Select Next.
Enter select the amount of Minimum memory, Desired memory, and Maximum memory. I usually use 2 GB throughout all three. Select Next.
Select a Processing mode. I use Dedicated. Select Next.
If using Dedicated, enter the Minimum processors, Desired processors, and Maximum processors. I usually use 4 processors throughout all three. Select Next.
Select your Hardware Configuration that you wish to use for your environment. Select Next.
Configure I/O pools - Leave these as the default. Select Next.
Configure Virtual I/O adapters - I typically configure this part later. Select Next.
Configure Power Controlling Partitions - Leave these as the default settings. Select Next.
Optional Settings - Leave these as the default settings. Select Next.
Verify settings and Select Finish.
Step 4. NIM VIOS LPAR:
On the NIM server, start NIM: smit nim
Network Installation Management
Move cursor to desired item and press Enter.
Configure the NIM Environment
Perform NIM Software Installation and Maintenance Tasks
Perform NIM Administration Tasks
Create IPL ROM Emulation Media
Esc+1=Help Esc+2=Refresh Esc+3=Cancel Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do
Select Perform NIM Software Installation and Maintenance Tasks
Perform NIM Software Installation and Maintenance Tasks
Move cursor to desired item and press Enter.
Install and Update Software
List Software and Related Information
Software Maintenance and Utilities
Alternate Disk Installation
Manage Diskless/Dataless Machines
Esc+1=Help Esc+2=Refresh Esc+3=Cancel Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do
Select Install and Update Software
Install and Update Software
Move cursor to desired item and press Enter.
Install the Base Operating System on Standalone Clients
Install Software
Update Installed Software to Latest Level (Update All)
Install Software Bundle
Update Software by Fix (APAR)
Install and Update from ALL Available Software
Esc+1=Help Esc+2=Refresh Esc+3=Cancel Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do
Select Install the Base Operating System on Standalone Client
Install and Update Software
Move cursor to desired item and press Enter.
Install the Base Operating System on Standalone Clients
Install Software
Update Installed Software to Latest Level (Update All)
Install Software Bundle
Update Software by Fix (APAR)
Install and Update from ALL Available Software
+--------------------------------------------------------------------------+
Select a TARGET for the operation

Move cursor to desired item and press Enter.

reg-05 machines standalone

Esc+1=Help Esc+2=Refresh Esc+3=Cancel
Esc+8=Image Esc+0=Exit Enter=Do
Es /=Find n=Find Next
Es+--------------------------------------------------------------------------+
Select the machine to install VIOS on. If nothing appears, make sure you have created a standalone system.
Install and Update Software
Move cursor to desired item and press Enter.
Install the Base Operating System on Standalone Clients
Install Software
Update Installed Software to Latest Level (Update All)
Install Software Bundle
Update Software by Fix (APAR)
Install and Update from ALL Available Software
+--------------------------------------------------------------------------+
Select the installation TYPE

Move cursor to desired item and press Enter.

rte - Install from installation images
mksysb - Install from a mksysb
spot - Install a copy of a SPOT resource

Esc+1=Help Esc+2=Refresh Esc+3=Cancel
Esc+8=Image Esc+0=Exit Enter=Do
Es /=Find n=Find Next
Es+--------------------------------------------------------------------------+
Select mksysb - Install from a mksysb
Install and Update Software
Move cursor to desired item and press Enter.
Install the Base Operating System on Standalone Clients
Install Software
Update Installed Software to Latest Level (Update All)
Install Software Bundle
Update Software by Fix (APAR)
Install and Update from ALL Available Software
+--------------------------------------------------------------------------+
Select the MKSYSB to use for the installation

Move cursor to desired item and press Enter.

vios_mksysb resources mksysb

Esc+1=Help Esc+2=Refresh Esc+3=Cancel
Esc+8=Image Esc+0=Exit Enter=Do
Es /=Find n=Find Next
Es+--------------------------------------------------------------------------+
Select the vios_mksysb resource.
Install and Update Software
Move cursor to desired item and press Enter.
Install the Base Operating System on Standalone Clients
Install Software
Update Installed Software to Latest Level (Update All)
Install Software Bundle
Update Software by Fix (APAR)
Install and Update from ALL Available Software
+--------------------------------------------------------------------------+
Select the SPOT to use for the installation

Move cursor to desired item and press Enter.

vios_spot resources spot

Esc+1=Help Esc+2=Refresh Esc+3=Cancel
Esc+8=Image Esc+0=Exit Enter=Do
Es /=Find n=Find Next
Es+--------------------------------------------------------------------------+
Select vios_spot resource.
Select the vios_lppsource resource.
Select the vios_bosinst resource.
Install the Base Operating System on Standalone Clients
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[TOP] [Entry Fields]
* Installation Target reg-05
* Installation TYPE mksysb
* SPOT vios_spot
LPP_SOURCE [vios_lppsource] +
MKSYSB vios_mksysb
BOSINST_DATA to use during installation [vios_bosinst] +
IMAGE_DATA to use during installation [] +
RESOLV_CONF to use for network configuration [] +
Customization SCRIPT to run after installation [] +
Customization FB Script to run at first reboot [] +
ACCEPT new license agreements? [no] +
Remain NIM client after install? [yes] +
PRESERVE NIM definitions for resources on [yes] +
this target?
FORCE PUSH the installation? [no] +
[MORE...31]
Esc+1=Help Esc+2=Refresh Esc+3=Cancel Esc+4=List
Esc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=Image
Esc+9=Shell Esc+0=Exit Enter=Do
NOTE: Setting the "Remain as NIM client after install" as YES can cause errors when configuring your shared ethernet adapters after install.
Press Enter to start the NIM process.

MOVING FILE SYSTEMS


Moving file systems from one volume group to another

Moving file systems from one volume group to another

ATTENTION: Make sure a full backup exists of any data you intend to migrate before using these procedures.

In AIX, storage allocation is performed at the volume group level. Storage cannot span volume groups. If space within a volume group becomes constrained, then space that is available in other volume groups cannot be used to resolve storage issues.

The solution to this problem is to add more physical volumes to the relevant volume group. This may not be an option in all environments. If other volume groups contain the required free space, the alternative is to move the required logical volumes to the desired volume group and expand them as needed.

The source logical volume can be moved to another volume group with the cplv command. The following steps achieve this.

ATTENTION: The logical volume should be inactive during these steps to prevent incomplete or inconsistent data. If the logical volume contains a mounted file system, then that file system should be unmounted first. If this logical volume is being used as a RAW storage device, then the application using this logical volume should close the device or be shut down.

1.Copy the source logical volume to the desired volume group with the cplv command.

For example, where myvg is the new volume group and mylv is the name of the user's logical volume, enter:

cplv -v myvg mylv

This will return the name of the new logical volume, such as lv00.

If this logical volume was being used for RAW storage, skip to to step 6. If this is a JFS or JFS2 file system, proceed to step 2. Note that RAW storage devices should NOT use the first 512 bytes of the RAW device. This is reserved for the LVCB or logical volume control block. cplv will not copy the first 512 bytes of the RAW logical volume, but it will update fields in the new logical volume's LVCB.

2.All JFS and JFS2 file systems require a log device. This will be a logical volume with a type of jfslog or jfs2log for JFS2 file systems. Run the lsvg -l command on your destination volume group. If a JFS or JFS2 log DOES NOT already exist on the new volume group, create one by using the mklv and logform commands as detailed below. If a JFS or JFS2 log DOES exist, proceed to
step 3

With a JFS2 filesystem, you also have the option of using an inline log. With inline logs, the jfs2log exists on the filesyster itself. After the cplv command is ran on a JFS2 inline log filesystem, run:

logform /dev/lvname

You should receive a message about formatting the inline log. If you do not receive a message about an inline log, then this filesystem is not a JFS2 inline log filesystem and you should treat it as a regular JFS2 filesystem. After hitting y on formatting the inline log, continue to step 3.

To make a new JFS log, enter the following command, where myvg is the name of the new volume group, enter:

mklv -t jfslog myvg 1

To make a new JFS2 log, enter: mklv -t jfs2log myvg 1

This will return a new logical volume of either type jfslog or jfs2log, such as loglv00. This new logical volume will need to be formatted with the logform command in order to function properly as either a JFS or JFS2 log. For example:

logform /dev/loglv00

Answer yes to destroy.

3.Change the filesystem to reference a log device that exists in the new volume group and the new logical volume with the chfs command.

For example, where myfilesystem is the name of the user's filesystem, enter:

chfs -a dev=/dev/lv00 -a log=/dev/loglv00 /myfilesystem

With inline logs on JFS2 filesystems this command is also different:

chfs -a dev=/dev/lv00 -a log=INLINE /myfilesystem

4.Run fsck to ensure filesystem integrity. Enter:

fsck -p /dev/lv00

NOTE: It is common to receive errors after running fsck -p /dev/lvname prior to mounting the filesystem. These errors are due to a known bug that development is currently aware of and which will be resolved in a future release of AIX. Once the filesystem is mounted, a future fsck with the filesystem unmounted should no longer produce an error.

Mount the file system.

For example,
where myfilesystem is the name of the user's file system, enter:

mount /myfilesystem

At this point, the migration is complete, and any applications or users can now access the data in this filesystem. To change the logical volume name, proceed to the following step.

NOTE: If you receive errors from the preceding step, do not continue. Contact you AIX support center.


6.Remove the source logical volume with the rmlv command.

For example,

where mylv is the name of the user's logical volume, enter:

rmlv mylv


Rename and reset any needed attributes on the new logical volume with the chlv or chmod commands. In order to rename the logical volume, the filesystem or raw logical volume must be in a closed state.

For example, where mylv is the new name you wish to change lv00 to be, enter:

chlv -n mylv lv00

Logical volumes specific to rootvg

The following logical volumes and file systems are specific to the rootvg volume group and cannot be moved to other volume groups

Logical Volume File System or Description ------------------------------------------------------
hd2 /usr
hd3 /tmp
hd4 /
hd5 
hd6 
hd8 
hd9var /var








Moving file systems from one volume group to another

Moving file systems from one volume group to another
ATTENTION: Make sure a full backup exists of any data you intend to migrate before using these procedures.
In AIX, storage allocation is performed at the volume group level. Storage cannot span volume groups. If space within a volume group becomes constrained, then space that is available in other volume groups cannot be used to resolve storage issues.
The solution to this problem is to add more physical volumes to the relevant volume group. This may not be an option in all environments. If other volume groups contain the required free space, the alternative is to move the required logical volumes to the desired volume group and expand them as needed.
The source logical volume can be moved to another volume group with the cplv command. The following steps achieve this.
ATTENTION: The logical volume should be inactive during these steps to prevent incomplete or inconsistent data. If the logical volume contains a mounted file system, then that file system should be unmounted first. If this logical volume is being used as a RAW storage device, then the application using this logical volume should close the device or be shut down.
Copy the source logical volume to the desired volume group with the cplv command.
For example, where myvg is the new volume group and mylv is the name of the user's logical volume, enter: cplv -v myvg mylv
This will return the name of the new logical volume, such as lv00.
If this logical volume was being used for RAW storage, skip to to step 6. If this is a JFS or JFS2 file system, proceed to step 2. Note that RAW storage devices should NOT use the first 512 bytes of the RAW device. This is reserved for the LVCB or logical volume control block. cplv will not copy the first 512 bytes of the RAW logical volume, but it will update fields in the new logical volume's LVCB.
All JFS and JFS2 file systems require a log device. This will be a logical volume with a type of jfslog or jfs2log for JFS2 file systems. Run the lsvg -l command on your destination volume group. If a JFS or JFS2 log DOES NOT already exist on the new volume group, create one by using the mklv and logform commands as detailed below. If a JFS or JFS2 log DOES exist, proceed to step 3.
With a JFS2 filesystem, you also have the option of using an inline log. With inline logs, the jfs2log exists on the filesyster itself. After the cplv command is ran on a JFS2 inline log filesystem, run: logform /dev/lvname
You should receive a message about formatting the inline log. If you do not receive a message about an inline log, then this filesystem is not a JFS2 inline log filesystem and you should treat it as a regular JFS2 filesystem. After hitting y on formatting the inline log, continue to step 3.
To make a new JFS log, enter the following command, where myvg is the name of the new volume group, enter: mklv -t jfslog myvg 1
To make a new JFS2 log, enter: mklv -t jfs2log myvg 1
This will return a new logical volume of either type jfslog or jfs2log, such as loglv00. This new logical volume will need to be formatted with the logform command in order to function properly as either a JFS or JFS2 log. For example: logform /dev/loglv00
Answer yes to destroy.

Change the filesystem to reference a log device that exists in the new volume group and the new logical volume with the chfs command.

For example, where myfilesystem is the name of the user's filesystem, enter: chfs -a dev=/dev/lv00 -a log=/dev/loglv00 /myfilesystem
With inline logs on JFS2 filesystems this command is also different: chfs -a dev=/dev/lv00 -a log=INLINE /myfilesystem
Run fsck to ensure filesystem integrity. Enter: fsck -p /dev/lv00
NOTE: It is common to receive errors after running fsck -p /dev/lvname prior to mounting the filesystem. These errors are due to a known bug that development is currently aware of and which will be resolved in a future release of AIX. Once the filesystem is mounted, a future fsck with the filesystem unmounted should no longer produce an error.
Mount the file system.
For example, where myfilesystem is the name of the user's file system, enter: mount /myfilesystem
At this point, the migration is complete, and any applications or users can now access the data in this filesystem. To change the logical volume name, proceed to the following step.
NOTE: If you receive errors from the preceding step, do not continue. Contact you AIX support center. 
Remove the source logical volume with the rmlv command.
For example, where mylv is the name of the user's logical volume, enter: rmlv mylv
Rename and reset any needed attributes on the new logical volume with the chlv or chmod commands. In order to rename the logical volume, the filesystem or raw logical volume must be in a closed state.
For example, where mylv is the new name you wish to change lv00 to be, enter: chlv -n mylv lv00
Logical volumes specific to rootvg
The following logical volumes and file systems are specific to the rootvg volume group and cannot be moved to other volume groups: Logical Volume File System or Description
------------------------------------------------------
hd2 /usr
hd3 /tmp
hd4 /
hd5 
hd6 
hd8 
hd9var /var

AIX COMMANDS

Most used AIX commands
These are my most used AIX 4.3.3 commands. (I'm working with the Korn shell)
acledit "file"  for changing the ACL(access control list) of a file
aclget "file"
aclget "input file" | aclput
"output file"
aclget -o "output file"
"input file"
shows the ACL of a file
for copying an ACL
writes an ACL to an ACL temporary file
aclput -i "input file"
"output file"
writes an ACL from an ACL temporary file
alog -
f /var/adm/ras/bootlog -o
alog -t boot -o
for viewing the boot logs
for viewing the boot logs
alt_disk_install -d "tape
device" "physical volume"
alt_disk_install -d "tape
device" -B "physical
volume"
alt_disk_install -C -b
update_all -l "cdrom
device" "physical volume"
alt_disk_install -X
installs an alternate rootvg on the physical volume
installs an alternate rootvg and does not change the bootlist
creates a cloned rootvg with another AIX level on a physical
volume
removes a cloned rootvg
anacheck -ap  error analysing for Escala E + T
arp -a
shows the connection of the Ethernet number with the MAC
adress
at -l
echo ""command"" | at
0600
echo ""command"" | at
2300 friday
lists up all jobs you have sent to be run later
runs a command at 6 o'clock on the same day
runs a command at 23 o'clock on the next friday
audit start
audit stop
audit query
audit off
audit on
for starting auditing
for stopping auditing
for displaying the audit status
for suspending auditing
for restarting auditing
auditpr -v < "auditing log
file"
to read the system audit tail file with default header titles and
fields
auditstream | auditpr -v
> /dev/console &
for displaying all audit records on the console
shows the architecture of your hardware
Tenir's brain Page 1 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002bootinfo -p
bootinfo -z
bootinfo -b
indicates if your system is a uniprocessor model or not (output
= 1 indicates a multiprocessor model)
returns the last boot device
bootlist -m normal cd0
bootlist -m normal -o
bootlist -m service -o
bootlist -m service "first
boot device" "second boot
device"
for booting the system next time from a CD-drive
for viewing the normal bootlist
for viewing the service bootlist
for changing the service bootlist
bosboot -a
bosboot -ad "disk"
to create a boot image on the default boot logical volume on
the fixed disk from which the system is booted
for fixing a corrupted boot logical volume (BLV) on the
specified disk
bsh  starts a born shell
cancel "print job number"  for killing a print job
cat "file"
cat "file" | grep -c "^$"
cat "file" > "print device"
cat "file" | rsh "host" "qprt -
P "queue""
for viewing a file
counts the number of empty lines in a file
for sending a file directly to the printer without using a queue
for printing a file on a remote host
cd "directory"
cd
cd ~"user"
cd ..
cd ../..
for changing the actual directory
for changing to the your home directory
for changing to the home directory of the specified user
for changing to the parent directory of the current directory
moves you two directories up in the tree
cfgmgr -v
cfgmgr -i
cfgmgr -s
cfgmgr
shows the devices as they are configured
attempts to install device software support for each new
detected device
executes the second boot phase (normal boot) configuration
rules
executes the second boot phase (normal boot) configuration
rules
chfn
chfn "user"
for changing the gecos(general user information stored
in /etc/passwd) information of the current user
for changing the gecos information of a user
chdev -l sys0 -a
autorestart=true
chdev -l "tape device" -a
block_size=512
chdev -l "tape device" -a
block_size=0
for activating the automatically reboot after a system crash
for changing the block size of a tape drive to 512
for reading a tape from that you don't know the block size
chfs -a size="new size"
"file system"
chfs -a size=+"size" "file
for changing the size of a file system
for increasing the size of a file system
Tenir's brain Page 2 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002system"
chgrp "group" "file"  changes the group of a file
chitab "inittab statement"  for disabling a statement of the /etc/inittab
chmod 0777 "file"
gives everybody the right to read, write and execute the
specified file
chown "user" "file"  changes the owner of a file
chpv -va "physical
volume"
chpv -vr "physical volume"
defines the disk as active
brings the disk into the removed state
chsec -
f /etc/security/prolog -
s /dev/tty0 -a locktime=0
to unlock a locked tty
chtcb on "file"
chtcb off "file"
chtcb query "file"
marks a file for being trusted
marks a file for being not trusted
checks if a file is trusted
chvg -u "volume group"
chvg -B "volume group"
chvg -Qn "volume group"
for unlocking an ODM-locked volume group
changes a volume group to a big volume group
disables the quorum functionality of a volume group
cmp "first file" "second
file"
cmp -s "first file" "second
file"
to determine whether two files are identical
silent compare, returns a 0 if the files are identical
compress -v "file"  compresses a file
cp "file" "destination"
cp -p "file" "destination"
copies a file to the destination
copies a file without changing the attributes (date, owner...) of
it
cpio -itv <"storage device"
ls * | cpio -ov >"storage
device"
find . -cpio "storage
device" -print
find . -print | cpio -pd
"target directory"
find . -print | cpio -pdl
"target directory"
to list up all copied files on a storage medium
to copy all files in the current directory onto a storage device
to copy all files in the current directory including
subdirectories
to copy all files in the current directory including
subdirectories to another directory
to copy all files in the current directory including
subdirectories to another directory and uses links if possible
cplv  copies a logical volume (no mirroring)
crfs  for creating a file system
csh  starts a c shell
crash "dump file or dump
device" "kernel"
for analyzing a dump
Tenir's brain Page 3 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002crontab -l
crontab -e
lists up your crontab
for editing your crontab
date  gives out the date and time
dd count=1 bs=4k skip=31
seek=1 if=/dev/hd4
of=/dev/hd4
dd if="input file"
of="output file"
conv=ebcdic
to copy the superblock of the root file system from block 31
to block 1
to convert the input file from ASCII to EBCDIC
df
df -k
df -tk "file system"
shows the usage of the file systems in 512-byte blocks
shows the usage of the file systems in kB
shows the usage of a file system in kB (without inode usage)
diag  starts the diagnostic operating instructions
diff "first file" "second
file"
diff -w "first file" "second
file
diff -r "first directory"
"second directory"
compares the contens of two text files
to compare two files while ignoring differences in the amount
of white space
to compare two directories
dircmp "first directory"
"second directory"
dircmp -s "first directory"
"second directory"
for comparing two directories
for comparing two directories and suppressing information
about identical files
domainname
domainname
"domainname"
to find out the domain you belong to
for setting your NIS domain
du
du "file"
du -ak "directory"
du -sk
du -sk "directory"
displays the blocks (512 Byte) each file uses
displays the blocks a file uses
shows the usage of a directory for each file and for total in kB
displays the total disk usage in kB
displays the usage of a directory in kB
dumpfs "file system"
shows the superblock, i-node map, and disk map information
of a file system
echo "variable"
echo *
shows the contents of a variable
shows all files of the current directory excluding all that begin
with a point
enable "print queue"  for enabling a print queue
env  shows the environment variables
errclear 0
errclear -d S 0
deletes all entries of the error log
deletes all entries of the error log classified as Software errors
errlogger "message"  writes an error message to the error log
Tenir's brain Page 4 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002errpt
errpt -a
errpt -d H
errpt -a -d S
errpt -c > /dev/console
processes a summary report of logged errors
does a detailed error report
does a summary report of all hardware errors
processes a detailed error report of all software errors
for real time error logging
export "variable"="value"
export DISPLAY="local
host":0
for exporting a environment variable
for redirecting Xapplications on a remote host to the local
host
exportfs -a
exportfs "directory"
exportfs -u "directory"
exportfs -v
exportfs -i "directory"
exportfs access="group"
"directory" -o
to export all directories in the /etc/exports file
to export a single directory
to unexport a single directory
for viewing the actual exports (like cat /etc/xtab)
to export a directory that isn't specified in the /etc/exports file
to export a directory and give group members access
permission
exportvg "volume group"  for removing a complete volume group from the ODM
extendvg "volume group"
"physical volume"
adds a new disk to a volume group
file "file"  shows the type of a file
filemon
uses the trace facility to monitor the activity of the AIX file
system
find / -user "user"
find / -user "user" -exec rm
-r {} \;
find / -name "file"
find / -size +2048 -mtime
+30 -exec ls -l {} \;
find / -type f -perm -2000 -
o -perm -4000
find . -ctime 1
find / \( -name a.out -o -
name '*.o' \) -atime +7 ! -
fstype nfs -exec \ rm {} \;
searches for all files of the specified user
removes all files of the specified user
searches everywhere for the specified file
searches for all files greater than one MB and that haven't
been changed for a month
searches for all files that have set the SUID- or SGID-mode
to list all files in the current directory that have been changed
during the current 24-hour period
to remove all files named a.out or *.o that have not been
accessed for a week and that are not mounted using nfs
finger @"host"
finger "user"@"host"
shows the users of a system
shows information about the specified user
format  for formating a floppy disk
fsck
fsck -p "file system"
fsck -y "file system"
fsck -f "file system"
for checking all default file systems
for fixing minor problems with the specified file system
automatically
for fixing severely damaged file systems (auto response YES)
for doing a fast check of a file system
ftp  starts an ftp-client
fuser -u "file system"  shows if a file system is currently in use
Tenir's brain Page 5 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002getlvcb -AT "logical
volume"
queries a LVCB (logical volume control block)
| grep "string"
for searching a string in the input of the standard output of the
previous command
groups
groups "user"
shows the current group membership
shows the group membership of the specified user
grpck -t ALL
grpck -t "group"
searching for inconsistencies in the /etc/security/group
searching for inconsistencies of a single group in
the /etc/security/group
gunzip -f "file"  unzips a file
head "file"  to display the first ten lines of a file
help  gives out a basic command help screen
host "host"
host "IP"
for getting the IP of a host
for getting the host name of an IP
hostname  shows the actual hostname
id  shows extended information about the current user
ifconfig "network
interface"
shows the status of a network interface
importvg -y "volume
group" "physical volume"
importvg -L "volume
group" "physical volume"
imports a volume group by creating new ODM objects
for reimporting a volume group (learn about possible
changes)
info
info -s "command"
starts the InfoExplorer
starts the InfoExplorer wiht topics of the specified command
init 2
init s
for initialising the multi user mode
for initialising the single user mode
installp -u "fileset"  uninstalls the specified fileset and any of its installed updates
iostat
iostat 10 2
iostat -d "physical volume"
2
shows status information about io
shows io information two times with break of two seconds
to display a continuous disk report at two second intervals for
the specified disk
jobs
jobs -l
lists up background processes of the environment
lists up background processes and gives a detailed output
ksh
set -x
starts a korn shell
for changing to the debug mode
kill "process id"
kill -2 "process id of the
named"
kill -9 -1
for terminating a process
for making a dump of the active DNS-database
to stop all processes that you own
Tenir's brain Page 6 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002kill -kill 0  to stop all processes that you own and log yourself off
killall  stops all background processes
last  shows the logins /var/adm/wtmp in the reverse sequence
ll  shows the contents of a directory including access controls
ln "destination" "link"
ln -s "destination" link"
creates a hard link
creates a soft link
lock  for locking a terminal
logform "logging logical
volume"
for formating, fixing or reinitializing a logging logical volume
lpr -#3 "file1" "file2"
lpr -P "queue" "file"
to print three copies of the file1 and file2
to print the file on the queue
lpstat  shows the status of the print queues
lqueryvg -p "physical
volume" -At
shows an extract from the VGDA (volume group descriptor
area) on physical volume
ls
ls "directory"
ls -a
ls -l
ls -l "file"
ls -l /dev
ls -le "file"
shows the contents of the current directory
shows the contents of the specified directory
shows the contents of the current directory ordered by name
shows the contents of a directory including extended
information
shows extended information of a file
show the devices
shows if a file is trusted (indicated by a +)
lsattr -El sys0
lsattr -HE -l sys0 -a
realmem
shows the system attributes
gives out the physical memory size
lscfg
lscfg -v
shows the current device configuration
shows more information about the current device
configuration
lscons
writes the name of the current console device to standard
output
lsdev -C -c "physical
volume" -H
lsdev -PH
lsdev -CH
lsdev -Cc "device class"
lsdev -Cs "device subclass"
shows information about a specific hard disk
shows the predefined devices
shows the customized devices
shows all customized devices of a class
shows all customized devices of a subclass
lsdisp  lists the displays currently available on the system
lsfs
lsfs -q
lsfs -v jfs
shows the file systems
with superblock informations
shows all file systems of type jfs
Tenir's brain Page 7 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002lsgroup ALL
lsgroup "group"
lists all groups
shows information about a specific group
lsitab -a
lsitab "name of the
statement"
shows the /etc/inittab
shows the specified line of the /etc/inittab
lslpp -l "fileset"
lslpp -h "fileset"
lslpp -f "fileset "
lslpp -w "file"
checks if the specified fileset is installed
checks the installation history of a fileset
lists up all file names of the specified fileset
gives out the owning fileset of a file
lslv "logical volume"
lslv -p "physical volume"
lslv -m "logical volume"
shows information about a logical volume
shows the logical volume allocation map of a physical volume
identifies the physical partitions that have been assigned to
your logical partitions
lsps -a  shows information about the paging space
lspv
lspv "physical volume"
lspv -l "physical volume"
lspv -p "physical volume"
lists up the physical volumes
shows the contens of a physical volume
lists up the logical volumes of a physical volume
lists up the physical partions of physical volume
lssec -
f /etc/security/login.cfg -s
"tty device" -a logintimes
lssec -f /etc/security/lastlog
-s root -a
unsuccessful_login_count
displays the times logins are allowed on a terminal
lists the number of unsuccessful login attemps for root since
the last successful login
lssrc -a  for showing information about the sub systems
lsuser ALL
lsuser "user"
lists all users
shows information about a specific user
lsvg
lsvg -o
lsvg -o | lsvg -i -l
lsvg "volume group"
lsvg -p "volume group"
lsvg -l "volume group"
shows the volume groups of a system
shows the activated volume groups of a system
shows all logical volumes of a volume group
gives status information about a volume group
gives information about the physical volumes of a volume
group
gives information about the logical volumes of a volume
group
makedbm  for generating a NIS map
man "command"  shows information about a command
migratepv "source physical
volume" "destination
physical volume"
migratepv -l "logical
volume" "source physical
volume" "destination
moves the physical partitions from one disk to another
moves all physical partitions of a logical volume from one
disk to another
Tenir's brain Page 8 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002physical volume"
mkboot -cd "boot device"  for clearing the boot record of a disk (leaves the PVID)
mkdir "directory"
mkdir -m 755 "directory"
mkdir -p
"subdirectories&directory"
generates a dircetory
generates a directory with the access restriction rwxr-xr-x
for generating a directory directly under not existing
subdirectories
mkgroup "group"  generates a new group
mkitab "inittab statement"  for adding a statement to the /etc/inittab
mklv -y "logical volume"
mklv -t jfslog -y "logging
logical volume" "volume
group" "number of logical
partitions"
for creating a logical volume
for creating a JFS logging device on a newly created volume
group
mklvcopy "logical volume"
2 "physical volume"
for adding a mirrored copy of the logical volume to a volume
group
mkps -a -n -s4 "volume
group"
to create a paging space in a volume group that has four
logical partitions and is activated immediately and at all
subsequent system restarts
mksysb "tape device"
mksysb -i "tape device"
generates a bootable system backup on a tape
generates a bootable system backup and ignores an existing
image.data file
mkszfile
mkszfile -X
generates the image.data (used for mksysb) file in the root
directory
increases the /tmp if it is necessarily for the operation
mkuser "user"  generates a user called "user"
mkvg -s 2 -y "volume
group" "physical volume"
mkvg -B -t 16 -y "volume
group" "physical volume"
creates a volume group with 2MB partition size
creates a big volume group with a maximum number of 16256
partitions on a disk
mkvgdata "volume group"
generates the /tmp/vgdata/"volume group"/"volume
group".data file (like mkszfile)
mount
mount "file system"
mount all
mount -o log="log device"
"logical volume" "mount
point"
mount -rv cdrfs "cdrom
device" "mount point"
shows information about the mounts
for mounting a file system
for mounting all file systems
for mounting a file system with the specified log device on a
specified mount point
for mounting a cdrom file system
mt fsf 2
mt -f "tape device" rewind
for winding two files forward on the default tape
for rewinding a tape
Tenir's brain Page 9 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002mv "file" "destination"  moves a file to the specified location
ncheck -i "inode number"
"path"
for finding a file name from the inode number
netstat
netstat -rn
netstat -in
shows the active connections
shows the routing table
for displaying the information about an internet interface
nfsstat -c
nfsstat -s
nfsstat -z
dispays statistics about NFS and RPC calls sent and rejected
by the client
dispays statistics about NFS and RPC calls sent and rejected
by the server
resets all call-related information to zero on the client and the
server
nice -n 10 "command"
nice -n -10 "command"
runs a command with a ten point higher nice value as normal
(low priority)
runs a command with a ten point lower nice value as normal
(high priority)
no -a
no -o ipforwarding
no -o ipforwarding=0
no -o ipforwarding=1
displays network options
displays if ipforwarding is activated
disables ipforwarding
enables ipforwarding
nslookup
nslookup -query=hinfo -
timeout=10
queries internet domain name servers
for changing the default query type to host information and
the initial time-out to 10 seconds
od "file"
od -x "file"
shows an octal dump of the specified file
shows an hexadecimal dump of a file
odmadd "file"  for adding the file input to the ODM
odmchange -o "class" -q
"criteria" "file"
for replacing a selected part of an ODM class with the file
input
odmcreate "class"  for creating a ODM class
odmdelete -o "class" -q
"criteria"
for deleting a selected part of an ODM class
odmdrop -o  for deleting an entire class
odmget "class"
odmget -q "criteria" "class"
for viewing an ODM class
for viewing a selected part of an ODM class
odmshow  for viewing the structure of an ODM class
on -d "host" "command"  does a command on a remote system
oslevel
oslevel -l "level"
for getting the current operating system version
compares the system oslevel with the specified level
passwd "user"  changes the password of the user
Tenir's brain Page 10 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002pdt_config
for configuring PDT (Performance Diagnostic Tool), located
in /usr/sbin/perf/diag_tool
penable -a  enables all normal ports that are listed in /etc/inittab
perfpmr 3600
for generating a performance analysis (for 1 hour) that could
be send to IBM, the output is written to /var/perf/tmp
pg  for viewing the contens of a file in page size
ping "host"
ping -R "host"
for showing if a host is contactable(echo) on the OSI layer 2
for tracing the route of the ping
printenv  shows the environment variables
ps
ps -f
ps -afe
ps aux
ps -elf
shows information about the running tasks
shows extended information about the running tasks
shows extended information about the tasks and daemons
shows the usage of the CPU's for each process
shows the processes ordered after it's priority and nice value
pwd  shows the current directory
pwdadm "user"  changes the password of any user
pwdck -t ALL
pwdck -t "user"
searching for inconsistencies in the /etc/security/passwd
searching for inconsistencies of a single user in
the /etc/security/passwd
qadm -D "print queue"
qadm -U "print queue"
for stopping a print queue
for starting a print queue
qchk  shows the status of the print queue
qprt "file"
qprt -c "file"
qprt -P "queue" "file"
prints the specified file on the first available printer
configured for the default print queue (Queueing)
prints a copy of the specified file on the first available printer
configured for the default print queue (Spooling)
sends the specified file to the specified queue
rcp "user"@"host":"file"
"user"@"host":"target file"
rcp -r
"user"@"host":"directory"
"user"@"host":"target
directory"
copies a file from one host to another
copies a directory from one host to another
reboot
reboot -l
for rebooting the system
to reboot the system without logging it
reducevg "volume group"
"physical volume"
reducevg "volume group"
"PVID"
reducevg -d "volume
group" "physical volume"
removes a disk from a volume group
removes a disk from a volume group
removes a disk from a volume group and deletes
automatically all logical volume data
Tenir's brain Page 11 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002refresh -s "daemon"  for sending a subsystem refresh request to the SRC
renice -n -10 "PID"
renice -n 10 "PID"
decreases the nice value of a running process to 10 (high
priority)
increases the nice value of a running process to 10 (low
priority)
restore -Tq
restore -rvqf "tape device"
restore -s4 -Tqvf "tape
device".1 > "file"
restore -s2 -xqvf "tape
device" ./bosinst.data
to list names of files in either a file-name or file-system
archive on the diskette drive /dev/rfd0
restores a backup from a tape
for verifying the data from a mksysb-tape
for restoring the bosinst.data file from a mksysb-tape
restvg -f "tape device"
"physical volume"
for restoring a volume group from a tape
rexec "host" "command"
rexec -n "host" "command"
executes a command on the remote host
executes a command on the remote host and ignores the
$HOME/.netrc
rlogin "host"
rlogin "host" -l "user"
for login in a remote system
for login in a remote system with the specified user
rm "file"
rm -r "directory"
deletes a file
deletes a directory including the subdirectories
rmdev -l "physical volume"
-d
removes a disk from the ODM
rmfs  removing a file system
rmitab "inittab statement"  for deleting a statement of the /etc/inittab
rmlvcopy "logical volume"
1
reduces the number of copies to 1
rmss -c 30  changes the memory size to 30MB
route add -net default
"router IP"
route add -host "target host
IP" "router IP"
route add -net "target net
IP" "router IP"
for setting the default route
for generating a host route
for generating a net route
rpcinfo -p "host"
gets from the portmap-daemon of the specified host all RPC
services
rsh "host" "command"  executes a command on the remote host
Rsh  starts a restricted shell
rup -h  shows the state of all hosts on the net
ruptime
shows the uptime of all systems where the rwhod has been
Tenir's brain Page 12 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002started
rusers -h "host"  shows the state of all user on a remote host
rwho
shows the current users of all systems where the rwhod has
been started
sar -u
sar -u 60 30
shows the CPU usage
shows the CPU usage thirthy times with an interval of 60
seconds
savevg -i -f "
device"
"volume group"
savevg -f "tape device"
"volume group"
for saving a volume group on tape
for saving a volume group on tape by using the
prepared /tmp/vgdata/"volume group"/"volume group".data
file
set -o
set -o vi
for viewing the current option settings
to activate vi behavior in command line
sh
sh "file"
sh "shell script" > "file"
2>&1
starts a sh-shell
for running a shell script that hasn't got the executable flag
for running a shell skript and piping the error_out and
user_out in the specified file
showmount -e
showmount -e "host"
showmount -a "host"
showmount -d "host"
to list up the exported directories
to list up the exported directories on a host
to list up all remote directories mounted by a host
to list up the directories mounted by a client on the host
shutdown +5 "user
information"
shutdown -m
shutdown -Fm
shutdown -Fr
shuts down the system in 5 minutes and shows user the
chosen information
changes to single user mode
changes fast to single user mode
for a fast shutdown including a reboot
the system administration tool, for the fast path you can
choose of the followings:
alog alt_clone alt_mksysb analysis at backsys cfgdials cfgpty
chcons chdials chdisp chfont chgated chgkbd chgprt chgpty
chgsys chhostent chif chinet chinetd chinetdconf chkbd
chlicense chnamed chnfsmnt chpq chprtcom chservices
chsyslogd chtimed chtz chtz_date chypdom clientnet controls
crfs date dce dcecdsadmin dcesecadmin dce_to_tcpip dev
dfsadmin diag dials display display_pm_select dtconfig
dtsadmin dump dump_link easy_install_bundle errclear
errdemon errpt error extendlv filemgr fs fshrttbl font gated
group ftpusers hostent hostname hosts hostsequiv hosts.equiv
inet inetd inetdconf inetd.conf inetdsubsys input install
install_all install_latest install_selectable_all jfs jobs
keyboard keymap lft logs lppchk lsdials lsdisp lsdprt lsfont
lsftpusers lsgated lshostent lshostname lshostsequiv lshostslpd
lsinet lsinetd lsinetdconf lskbd lsnamed lsnamerslv lsservices
lssprt lssyslogd lsroute lstimed lv lvm makdials makprt
Tenir's brain Page 13 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002smit "fast path"
ESC + 3
maktty mkcd mkdce mkdceregister mkdomain mkfont
mkftpusers mkgroup mkhostent mkhostname mkhostsequiv
mkhostlpd mkinet mkinetca mkinetd mkinetdconf
mkinetd_boot mkinetd_both mkinetd_now mkineten mkinetet
mkinetfi mkinetsl mkinetso mkinettr mkitab_lpd mkkeyserv
mklv mknamerslv mknfsexp mknfsmnt mkpq mksball
mkservices mksysb mkroute mkwacom mk6093 mlang
monitors mouse movprt named namerslv netinterface newkey
nfs nfsconfigure otherserv performance pgsp pm pqmanage
pqtools print printer printerinst problem pty pv qprt rds
restartdce restvg resolvconf resolv.conf rmdce rmdceregister
rmdials rmdomain rmfs rmftpusers rmhostent rmhostsequiv
rmhostslpd rminet rminetd rminetdconf rminetd_boot
rminetd_both rminetd_now rmitab_lpd rmkeyserv rmlvcopy
rmnamerslv rmnfsexp rmnfsmnt rmpq rmsball rmroute
rmservices rmtaccess rmvpty rmwacom rm6093 route routed
rpc rpc_maint rprint ruser rwhod savevg security server
servernet setbootup_option shinet shinetdconf shservices
shutdown spaceball spgated spgated_boot spgated_both
spgated_now spnamed spnamed_boot spnamed_both
spnamed_now spnamerslv spooler spsyslogd spsyslogd_boot
spsyslogd_both spsyslogd_now sprwhod sprwhod_boot
sprwhod_both sprwhod_now sptimed sptimed_boot
sptimed_both sptimed_now statlpd stgated stgated_boot
stgated_both stgated_now stnamed stnamed_boot
stnamed_both stnamed_now stnamerslv stnamerslv1
stnamerslv2 stopdce storage strouted strouted_boot
strouted_both strouted_now strwhod strwhod_boot
strwhod_both strwhod_now stsyslogd stsyslogd_boot
stsyslogd_both stsyslogd_now sttimed sttimed_boot
sttimed_both sttimed_now syslogd system tablet timed tpty
trace trace_link trcrpt trcstart trcstop tty user vg wacom_tablet
wall yp ypconfigure ypmaps ypstartstop 6093_tablet _nfs
for getting out of a frozen smit
smitty "fast path"
ESC + 3
the ASCII version of the smit, for the fast paths look in the
section of smit
for getting out of a frozen smitty
snap -a
snap -a -o "tape device"
snap -a -c
snap -f
snap -g
snap -k
snap -D
gathers all system configuration information and writes it to
the /tmp/ibmsupt directory
gathers all system configuration information and writes it on
tape
generates a compressed tar image snap.tar.Z in
the /tmp/ibmsupt
gathers file system information
gathers general information
gathers kernel information
gathers dump and /unix information
spray "host" -c 1200 -d 2 -l  sends all 2 microseconds 1200 pakets of 2000 byte size to the
Tenir's brain Page 14 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/20022000  specified host
startsrc -s "daemon"
startsrc -g "daemon"
startsrc -t "subserver"
startsrc -s "daemon" -a "-d"
for starting a subsystem
for starting all daemons of a subsystem
for starting a subserver of a subsystem
for starting a subsystem and providing debug information
stopsrc -s "daemon"
stopsrc -g "daemon"
stopsrc -t "subserver"
for stopping a subsystem
for stopping all daemons of a subsystem
for stopping a subserver of a subsystem
strings "file"  shows the printble strings of a binary file or an object
stty
stty -echo
stty echo
CTRL+j stty sane CTRL+j
lists up a short description of your tty settings
makes the user input invisible
makes the user input visible
resets the tty confirguration
su
su -
exit
for switching the user
for switching the user with setting the environment
for switching back to the original user
svmon
captures and analyzes information about virtual-memory
usage
swapon -a
swapon "swapping device"
activates all paging spaces
activates a swapping device
syncvg -v "volume group"  synchronizes the physical partitions from a volume group
sysdumpdev
sysdumpdev -l
sysdumpdev -L
sysdumpdev -p "dump
device"
sysdumpdev -P -p "dump
device"
sysdumpdev -
p /dev/sysdumpnull
sysdumpdev -P -s "dump
device"
sysdumpdev -e
sysdumpdev -z
sysdumpdev -K
to reset the current dump device settings, when worked with
temporary settings
to display the current dump device settings
to display information from the previous dumps
for changing the primary dump device
for changing the primary dump device permanently
for deactivating the dump device
for changing the secondary dump device permanently
estimates the dump size
writes down the dump size and the location, if a new one is
present
reset button will force a dump, for machines without a key
sysdumpstart -p
sysdumpstart -s
starts a kernel dump to the primary dump device
starts a kernel dump to the secondary dump device
tail "file"
tail -f "file"
shows the last ten lines of a file
for monitoring the last ten lines of growing file
tar -tvf "file"
tar -xfv "file"
tar -cvf "tape device" "file"
for viewing the structure of a tar-file
for extracting a tar-file
for creating an archive
Tenir's brain Page 15 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002tcbck -n ALL
tcbck -p tree
tcbck -t "file"
tcbck -y "file"
tcbck -a "file"
class="class"
tcbck -d "file"
tcbck -l "device name"
checks all files listed in sysck.cfg and reports faults but
doesn't fixes them
checks all files and fixes the faults but doesn't report them
checks a file, reports a fault and asks the user for fixinig it
checks a file, reports a fault and fixes it
adds a file to the sysck.cfg under the specified class
deletes an entry ot the sysck.cfg
for adding a device, for example /dev/led, to the sysck.cfg
tcpdump host "host"  prints all packets arriving or departing from the specified host
tctl -f "tape device" rewind  for rewinding a tape
time "command"
displays the elapsed execution time and the user and system
processing time attributed to a command
tn "host"
tn "host" "port number"
starts a telnet session to the specified host
starts a telnet session to an host on the specified port
top
lists up all processes orderer after it's CPU usage and updates
itself periodical
touch "file"
this sets the last access and modification times of the specified
file to the current date and time, if the file does not exist, the
touch command creates an empty file with that name
trace -a; sleep 10; trcstop  for tracing the system for a period of 10 seconds
traceroute "IP-number"  prints the route that IP packets take to a network host
tsh
for starting a trusted shell, that only executes commands that
are marked as being trusted
umount "file system"
umount allr
unmounts a file systems
unmounts all remote file systems
uname -a
uname -m
uname -M
gives out system information (operating system name,
hostname...)
gives out the system serial number
gives out the system typ (not for MCA)
uncompress "file"  for uncompressing a file
updatelv "logical volume"
"volume group"
updates the LVCB of a logical volume
users  lists up the names of the users who are working on the system
usrck -t ALL
usrck -t "user"
searching for inconsistencies in the /usr/security/user
searching for inconsistencies of a single user in
the /etc/security/user
varyoffvg "volume group"  for deactivating a volume group
varyonvg "volume group"
varyonvg -f "volume
for activating a volume group
allows a volume group to be made active that does not
Tenir's brain Page 16 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002group"  currently have a quorum of available disks
vi
vi "file"
for starting the vi-editor
for editing a file
vmstat
vmstat 5
shows statistics about the virtual memory
shows a summery report about the virtual memory each five
seconds
w  shows the current users with login time and more
wall ""message""
wall
writes a message to all users logged in a system
also for writting a message to all users (finishing with Ctrl+D)
who -
a /etc/security/failedlogin
who -a /etc/adm/wtmp
who -r
who
who -b
shows the failed logins
shows the successfull logins
shows the current run-level and when it has been started
shows the current users
shows when the last boot did occur
whoami
who am i
shows the current user
shows the login user
xhost +"host"
xhost -"host"
adds an host to the access control list of an Xserver
removes an host to the access control list of an Xserver
xlock  for locking a Xwindows session
ypbind  enables client processes to bind, or connect, to an NIS server
ypcat  prints out an NIS map
ypinit  sets up NIS maps on a NIS server
yppasswd  changes your network password in NIS
yppoll
displays the order number of the NIS map currently in use on
the server
yppush  propmts the NIS slave servers to copy updated NIS maps
ypserv  looks up information in local NIS maps
ypset "IP"  for changing the IP of a NIS server on the client
ypwhich
identifies either an NIS server or the server that is the master
for a given map
ypxfr  transfers an NIS map from a NIS server to a local host
| tee "file"
| tee -a "file"
for piping the output of a command to the standard output and
a new file
for piping the output of a command to the standard output and
a existing file
"command" &  for running a command in the background
Tenir's brain Page 17 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002> "file"  for cleaning the contents of a file
Tenir's brain Page 18 of 18
http://www.davearts.com/kunden/tenir/aixcomma.htm 7/6/2002