How to Change a device attribute chdev -l (device) -a (attribute)=(new value) chdev -l sys0 -a maxuproc=80
lsattr -EH -l (device) -D Lists the defaults in the pre-defined db lsattr -EH -l sys0 -a modelname
TO change the device state from defined state to available state. rmdev -l (device) rmdev -l (device) -d Delete the device rmdev -l (device) -SR S stops device, R unconfigures child devices
TO Displays bus resource attributes of a device. lsresource -l (device)
Restore the file: restore -x -d -q -s4 -f /dev/rmt0.1 -s4 indicated that we are restoring 4th image on the tape,
Use rmt0.1, means no rewind on close and no retension on open.
If the backup was taken with -i flag, you can use the following command: restore -x -d -v -q -f /dev/rmt0
If the mksysb backup was taken with file system backup, you can use the following command: restore -x -v -q -f /dev/rmt0
Restoring A Directory File From mksysb Image If you want to restore a full directory from the mksysb archive on /dev/rmt0. Here you have to specify the directory name instead of a single file: Rewind The tape: tctl -f /dev/rmt1 rewind
Restore the file: restore -x -d -s4 -f /dev/rmt0.1
if the backup was taken with -i option then it will be: restore -x -d -v -q -f /dev/rmt0
If the backup was taken with filesystem backup option then it will be: restore -x -v -q -f /dev/rmt0
We can create the image of the running AIX OS in to tape or in to a file by using MKSYSB command in AIX or in other words Creating an installable image of the root volume group either in a file or onto a bootable tape.
It is use full when the server crashes or when the server is down with some ODM problem or if system admin executed rm –R on root .
For the production servers it is recommended that every 1 month image of the running OS should be maintain in a secure place.
Helps in Provisioning the AIX OS
We can create a good image of running AIX OS with all the requisites for our environment and it will help us in provisioning the same image to all the P series machines in a same project so that all the machines will be of same configuration and at same level because mksysb creates backup of the running OS .
Creating a image on Tape
By the following command we can create the image on tape .
1) mksysb –i /dev/rmt0 It create the backup of the running OS on the tape , which will be bootable .
2) mksysb –m /dev/rmt0 Create the image with map files
3) mksysb –i Create the backup on a file
Excluding the file in the backup
We can exclude the files that which we don’t want to backup , many reasons we don’t want to backup some files , the size of the file is one the major thing.
We need to follow below procedure to exclude the file from backup
1) Create the file name with /etc/exclude.rootvg 2) Write the file name that you want to exclude in the exclude.rootvg 3) Execute the command mksysb –ei /dev/rmt0
Notes: 1. The image the mksysb command creates does not include data on raw devices or in user-defined paging spaces. 2. If you are using a system with a remote-mounted /usr file system, you cannot reinstall your system from a backup image. 3. The mksysb command may not restore all device configurations for special features, such as /dev/netbios and some device drivers not shipped with the product. 4. Some rspc systems for AIX 5.1 and earlier do not support booting from tape. When you make a bootable mksysb image on an rspc system for AIX 5.1 and earlier that does not support booting from tape, the mksysb command issues a warning indicating that the tape will not be bootable. You can install a mksysb image from a system that does not support booting from tape by booting from a CD and entering maintenance mode. In maintenance mode you will be able to install the system backup from tape. 5. The mksysb command uses the backup command to create its archive image. The mksysb command will also save the EA format for any JFS2 filesystems being backed up. It uses the /usr/bin/mkvgdata shell script to save this information.