Tech Blog

These are blog entries written by the UNIX Health Check development team. Our team has extensive technical experience on both AIX and Red Hat systems, and we like to share our knowledge with our visitors.

Topics: AIX, System Admin

Copying a logical volume

For copying a logical volume, the cplv command can be used. Using the -v flag, you can enter the name of the volume group you wish to copy to.

Once the logical volume has been copied, the trick is to get the file system in it back online:

Copy the stanza of the file system in the logical volume you copied to a new stanza in /etc/filesystems. Modify this new stanza; enter the correct jfs log, mount point and logical volume name. After this, do a fsck of your new mount point. Make sure your new mount point exists. After the fsck, you can mount the file system.

Topics: AIX, Backup & restore, System Admin

Restoring a mksysb of a mirrored rootvg to a non-mirrored rootvg

If you've created a mksysb of a mirrored rootvg and you wish to restore it to a system with only 1 disk in the rootvg, you can go about it as follows:

Create a new /image.data file, run:

# mkszfile -m
Change the image.data file:
# vi /image.data
In each lv_data stanza of this file, change the values of the COPIES= line by one-half (i.e. copies = 2, change to copies = 1). Also change the PPs to match the LPs as well.

Create a new mksysb, utilizing the /image.data file:
# mksysb /dev/rmt0
(Do not use smit and do not run with the -i flag, both will generate a new image.data file).

Use this mksysb to restore your system on another box without mirroring.

Topics: AIX, Networking, System Admin

Interface down from boot

If you wish to disable a network interface permanently, avoiding NETWORK DOWN errors in the error report:

# chdev -l en0 -a state=down -P
This command will permanently bring down the en0 interface (permanently means after reboot).

Topics: AIX, Performance, Storage, System Admin

Creating a large file

When you wish to create a very large file for test purposes, try this command:

# dd if=/dev/zero bs=1024 count=2097152 of=./test.large.file
This wil create a file consisting of 2097152 blocks of 1024 bytes, which is 2GB. You can change the count value to anything you like.

Be aware of the fact, that if you wish to create files larger than 2GB, that your file system needs to be created as a "large file enabled file system", otherwise the upper file size limit is 2GB (under JFS; under JFS2 the upper limit is 64GB). Also check the ulimit values of the user-id you use to create the large file: set the file limit to -1, which is unlimited. Usually, the file limit is default set to 2097151 in /etc/security/limits, which stands for 2097151 blocks of 512 bytes = 1GB.

Another way to create a large file is:
# /usr/sbin/lmktemp ./test.large.file 2147483648
This will create a file of 2147483648 bytes (which is 1024 * 2097152 = 2GB).

You can use this large file for adapter throughput testing purposes:

Write large sequential I/O test:
# cd /BIG
# time /usr/sbin/lmktemp 2GBtestfile 2147483648
Divide 2048/#seconds for MB/sec write speed.

Read large sequential I/O test:
# umount /BIG
(This will flush file from memory)
# mount /BIG
# time cp 2GBtestfile /dev/null
Divide 2048/#seconds for MB/sec read speed.

Tip: Run nmon (select a for adapter) in another window. You will see the throughput for each adapter.

More information on JFS and JFS2 can be found here.

Topics: AIX, Networking, System Admin

Measuring network throughput

To measure network throughput independantly from disk I/O:

Set up an FTP connection from machine A to machine B.

bin
put "|dd if=/dev/zero bs=32k count=1024" /dev/null
This will transfer a file of 32K * 1024 = 32 MB. The transfer informaton will be shown by FTP.

Topics: AIX, System Admin

System dump compression

Default compression of system dump isn't turned on, which may cause a lot of error report entries about your system dump devices being too small.

Check if the compression is on/off:

# sysdumpdev -l
Without compression, sysdumpdev -e will estimate the system dump size.

To turn compression on:
# sysdumpdev -C
This will reduce the required (estimated) dump size by 5-7.

Topics: AIX, System Admin

Simple printer remediation

To resolve a stuck printer, do the following:

Check the status of the queue:

# lpstat -W -p[queue-name]
Find the pio process in use for that queue:
# ps -ef | grep pio
Kill that pio process:
# kill [process-number]
Check the status of the queue again:
# lpstat -W -p[queue-name]
Enable the queue again:
# enable [queue-name]

Topics: AIX, NIM, System Admin

Nim status of a client

To check on the status of a NIM client, for example, when doing a mksysb restore through NIM:

# lsnim -l hostname

Topics: AIX, System Admin

Proper vmstat output

Often when you run vmstat, the output may be looking very disorganized, because of column values not being shown properly under each row. A very simple solution to this issue is to run the same command with the "-w" flag, which will provide you with a wide vmstat output:

# vmstat -w

Topics: AIX, System Admin

Changing maxuproc requires a reboot?

When you change MAXUPROC (Maximum number of processes allowed per user), the smitty help panel will tell you that changes to this operating system parameter will take effect after the next system reboot.

This is wrong Help information. The change takes effect immediately, if MAXUPROC is increased. If it is decreased, then it will take effect after the next system reboot.

This help panel text from smitty will be changed in AIX 5.3. APAR IY52397.

Number of results found for topic AIX: 231.
Displaying results: 181 - 190.