Storage Management Files and Commands Summary

This chapter provides details of storage management commands and usage. Commands common to AIX Version 3 and AIX Version 4 are covered, as well as those specific to AIX Version 4. Although common commands are being reviewed first, they will be initially grouped according to the AIX Version 4 fileset that they belong to. This will help the reader become more familiar with the AIX Version 4 environment.

How to Understand and Use this Chapter

To learn more about a file in an AIX Version 4 environment, it is advisable to first determine the fileset it belongs to, which is discussed in Major AIX Version 4 Filesets Relevant to Storage Management. To learn more about a file in an AIX Version 3 environment, it is helpful to know what logical function the file has that corresponds to the AIX Version 4 fileset description. Otherwise, refer to each of the four fileset groups in Common Storage Management Commands Using AIX Version 3 Syntax and use the criteria in this section to read about a specific file.

As discussed in Major AIX Version 4 Filesets Relevant to Storage Management, Common Storage Management Commands Using AIX Version 3 Syntax refers to all files in the four major fileset logical groups. It then advises the reader to check AIX Version 4 Specific File Features if necessary.

The files listed in Common Storage Management Commands Using AIX Version 3 Syntax and AIX Version 4 Specific File Features are organized in a logical manner according to the fileset that they belong to. Files in the same fileset are then grouped in the following logical breakdown:

  1. What part of the installation package they belong to (that is, the usr, root or share part).
  2. Which AIX Version 4 directory path are they in (it is assumed that the product bos.compat that includes filesets such as AIX 3.2 to 4.1 Compatibility Links has not been installed; the missing links are noted in AIX Version 4 Specific File Features).
  3. Alphabetical order (this ensures that commands that do similar tasks, such as the ch* commands that change object attributes, are located near each other in this chapter).

Each file is initially described by a brief statement that includes:

There is then a reference to its documentation status which is one of:

Finally, the chapter concludes by mentioning some other useful commands that are not part of the AIX Version 3 or AIX Version 4 base operating system. It then shows you examples of how to look at logical volume manager and journaled file system information.

Major AIX Version 4 Filesets Relevant to Storage Management

The AIX Version 4.1 Installation Guide describes how software is packaged, and reminds us that that the systems administrator needs to consider what functions are required, and hence what filesets should be installed. The command:


# lslpp -l bos.*|pg

will provide a list of base operating system filesets that are installed. The major ones discussed in this chapter are:
bos.rte.lvm
Logical Volume Manager
bos.rte.filesystem
Filesystem Administration
bos.sysmgt.sysbr
System Backup and BOS Installation Utilities
bos.rte.archive
Archive Commands

All files in these four filesets are referred to in this chapter, and are listed in section Common Storage Management Commands Using AIX Version 3 Syntax. If a file has significant changes from AIX Version 3, or if it is a new file that has been introduced by AIX Version 4, then a reference is given to look in section AIX Version 4 Specific File Features.

Other filesets that contain commands that are relevant to AIX storage management include:

bos.rte.boot
Boot Commands
bos.rte.serv_aid
Error Log Service Aids
bos.diag.rte
Hardware Diagnostics
bos.rte.diag
Diagnostics
bos.sysmgt.serv_aid
Software Error Logging and Dump Service Aids
bos.rte.compare
File Compare Commands
bos.rte.methods
Device Configuration Methods
bos.sysmgt.quota
File System Quota Commands

Only some of the most important files from these filesets that are relevant to AIX storage management are discussed in this chapter.

The contents of a fileset can be seen from the command:


# lslpp -f fileset_name |pg

Note that it is easy to find what fileset a file belongs to in an AIX Version 4 system, if the filset in question is installed, by using the command:


# lslpp -f all|pg

and by then using the / search syntax at the colon prompt. For example, to find that the cplv command belongs to the bos.rte.lvm fileset, type:
:/cplv

and press the Enter key followed by entering:
:-

once or twice to move backwards through the output until the fileset name appears, such as:
  bos.rte.lvm 4.1.0.0   /usr/lib/liblvm.a

Common Storage Management Commands Using AIX Version 3 Syntax

This section looks at the AIX Version 3 commands.

Using Logical Volume Manager Files

The following commands are logical volume manager related.

Usr Part Files which are in the /usr/sbin Directory.

allocp
allocp is an object file command that is used to generate an allocation map that is required when a logical volume is created, extended, reduced or removed.

It is an undocumented command whose usage is:

allocp: [-i LVid] [-t Type] [-c Copies]
        [-s Size] [-k] [-u UpperBound>]
        [-e InterPolicy] [-a InterPolicy]
cfgvg
cfgvg is a Bourne shell script command that is called by /etc/rc to varyon volume groups that have the auto-varyon flag set.

It is an undocumented command that requires no flags.

chlv
chlv is a Bourne shell script command that changes only the characteristics of a logical volume.

It is a documented command whose usage is:

chlv -n NewLVname LVname
chlv [-a IntraPolicy] [-e InterPolicy] [-L Label] [-u UpperBound]
        [-s Strict] [-b BadBlocks] [-d Schedule] [-p Permission]
        [-r Relocate] [-t Type] [-w MirrorWriteConsistency]
        [-v Verify] [-x MaxLPs] LVname...
chps
chps is an object file command that changes the attributes of a paging space.

It is a documented command whose usage is:

chps [-s NewLPs] [-a {y|n}] Psname
chpv
chpv is a Bourne shell script command that changes the characteristics of a physical volume.

It is a documented command whose usage is:

chpv { -a Allocation | -v Availability } PVname
chvg
chvg is a Bourne shell script command that changes the characteristics of a volume group.

It is a documented command whose usage is:

chvg [-a Auto on] [-Q quorum] VGname...

Note that there is a new flag available, -u in AIX Version 4. Please refer to the entry for chvg in AIX Version 4 Specific File Features.

copyrawlv
copyrawlv is an object file command that is used by cplv to do the actual copying on disk.

Extreme caution is required if this executable is used by the systems administrator The strings command suggests that copyrawlv does not contain any built in syntax advice and hence is not likely to be designed to used manually. However, as an example, after some necessary set up work, cplv uses this command as follows:

# Copy one lv to another.
copyrawlv /dev/sRawLVName /dev/dRawLVName Size

Where sRawLVName is the source logical volume, dRawLVName is the destination, and Size is the size.

cplv
cplv is a Bourne shell script command that copies a logical volume.

It is a documented command whose usage is:

cplv [-v VGname] [-y NewName | -Y Prefix] SourceLV
cplv -e [-f] DestinationLV SourceLV.
exportvg
exportvg is a Bourne shell script command that exports the definition of a volume group.

It is a documented command whose usage is:

exportvg VGname

Note that this command does not change any volume group configuration information on any of the disks that belong to it, but the command only removes all configuration information about the volume group (and any associated journalled file systems), from the system on which the exportvg is executed.

extendlv
extendlv is a Bourne shell script command that extends the size of a logical volume.

It is a documented command whose usage is:

extendlv [-a IntraPolicy] [-e InterPolicy] [-m MapFile]
         [-s Strict] [-u UpperBound] LVname NumberOfLPs [PVname...]
extendvg
extendvg is a Bourne shell script command that extends a volume group by adding a physical volume.

It is a documented command whose usage is:

extendvg [-f] VGname PVname...
getlvcb
getlvcb is an object file command that gets information about a logical volume from the logical volume control block.

It is an undocumented command whose usage is: suggested by other high level shell scripts, such as updatelv, that call it. This script tells us that the syntax is like:

getlvcb -aceLrsSPtu LVName
getlvcb -f LVName

Please refer to the entry for getlvcb in AIX Version 4 Specific File Features.

getlvname
cfgvg is an object file command that generates or checks a logical volume name.

It is an undocumented command whose usage is:

getlvname [-Y Prefix] [-n LVname] [Type]
getlvodm
getlvodm is an object file command that obtains volume group and logical volume information from the ODM.

It is an undocumented command whose usage is:

getlvodm [-a LVdescript] [-B LVdesrcript] [-b LVid]
         [-cVid] [-C] [-d VGdescript]
         [-e LVid] [-F] [-g PVid] [-h]
         [-j PVdescript] [-k] [-L VGdescript]
         [-l LVdescript] [-m LVid] [-p PVdescript]
         [-r LVid] [-s VGdescript] [-t VGid]
         [-u VGdescript] [-v VGdescript] [-w VGid]
         [-y LVid]

Please refer to the entry for getlvodm in AIX Version 4 Specific File Features.

getvgname
getvgname is an object file command that is used to return a new unused volume group name.

It is an undocumented command whose usage is:

getvgname [-n VGname]
importvg
importvg is a Bourne shell script command that brings into the system all the configuration details of a volume group from a set of physical volumes.

It is a documented command whose usage is:

importvg [-V MajorNumber] [-y VGname] [-f] PVname

Please refer to the entry for importvg in AIX Version 4 Specific File Features.

ipl_varyon
ipl_varyon is an object file command that is used to vary on the root volume group during system boot processing.

It is an undocumented command whose usage is:

ipl_varyon [-d ipldevice] [-i ] [-v ]
lchangelv
lchangelv is an object file command that changes logical volume attributes in the VGDA on disk.

It is an undocumented command whose usage is:

lchangelv -l LVid [-s MaxPartitions] [-n LVname] [-M SchedulePolicy]
     [-p Permissions] [-r BadBlocks] [-v WriteVerify][-w mirwrt_consist]
lchangepv
lchangepv is an object file command that that changes physical volume attributes in the VGDA on disk.

It is an undocumented command whose usage is:

lchangepv -g VGid -p PVid [-r RemoveMode] [-a AllocateMode]
lcreatelv
lcreatelv is an object file command that creates a logical volume on disk.

It is an undocumented command whose usage is:

lcreatelv -N LVname -g VGid -n MinorNumber [ -M MirrorPolicy]
            [-s MaxLPs] [-p Permissions] [ -r Badblocks] [-v WriteVerify]
            [-w mirwrt_consist]
lcreatevg
lcreatevg is an object file command that creates the volume group on the disk and populates the VGDA.

It is an undocumented command whose usage is:

lcreatevg -a VGname -V MajorNumber -N PVname -n MaxLVs
          -D VGDescriptorSize -s PPSize [-f] [-t]
ldeletelv
ldeletelv is an object file command that removes a logical volume from a volume group.

It is an undocumented command whose usage is:

ldeletelv -l LVid
ldeletepv
ldeletepv is an object file command that removes a physical volume from a volume group.

It is an undocumented command whose usage is:

ldeletepv -g VGid -p PVid
lextendlv
lextendlv is an object file command that extends a logical volume by Size partitions according to the map file Filename and updates the VGDA on disk.

It is an undocumented command whose usage is:

lextendlv -l LVid -s Size Filename
linstallpv
linstallpv is an object file command that adds a physical volume to a volume group and updates the VGDA on disk.

It is an undocumented command whose usage is:

linstallpv -N PVname -g VGid [-f]
lmigratepp
lmigratepp is an object file command that is used by higher level commands such as migratepv to copy a physical partition from one physical volume to another.

It is an undocumented command whose usage is:

lmigratepp -g VGid -p SourcePVid -n SourcePPnumber
       -P DestinationPVid -N DestinationPPnumber
lmktemp
lmktemp is an object file command that is used to create temporary map files for use by allocp during the creation and removal of logical volumes (refer to the contents of the mklv and rmlv scripts).

It is an undocumented command whose usage is:

lmktemp TmpMapFile [size]
lquerylv
lquerylv is an object file command that obtains logical volume information from the VGDA for many other commands.

It is an undocumented command whose usage is:

lquerylv -L LVid [-p PVname] [-NGnMScsPRvoadlArtw]

Please refer to the entry for lquerylv in AIX Version 4 Specific File Features.

For examples on how to use lquerylv, please refer to Using Commands to View AIX Version 4 Logical Volume Manager Information.

lquerypv
lquerypv is an object file command that obtains physical volume information from structures in memory unless the PVname is specified.

It is an undocumented command whose usage is:

lquerypv -p PVid [-g VGid | -N PVname] [-scPnaDdAt]

For examples on how to use lquerypv, please refer to Using Commands to View AIX Version 4 Logical Volume Manager Information.

lqueryvg
lqueryvg is an object file command that obtains volume group information from structures in memory unless the PVname is specified.

It is an undocumented command whose usage is:

lqueryvg [-g VGid | -p PVname] [-NsFncDaLPAvt]

For examples on how to use lqueryvg, please refer to Using Commands to View AIX Version 4 Logical Volume Manager Information.

lqueryvgs
lqueryvgs is an object file command that provides a summary of the volume groups known to the system.

It is an undocumented command whose usage is:

lqueryvgs [-NGAt]
lreducelv
lreducelv is an object file command that reduces the size of a logical volume, not a journaled file system, and updates only the VGDA on disk.

It is an undocumented command whose usage is:

lreducelv -l LVid -s Size Filename
lresynclp
lresynclp is an object file command that synchronizes a stale logical partition in a logical volume.

It is an undocumented command whose usage is:

lresynclp -l LVid -n LPnumber
lresynclv
lresynclv is an object file command that synchronizes all stale logical partitions in a logical volume.

It is an undocumented command whose usage is:

lresynclv -l LVid
lresyncpv
lresyncpv is an object file command that will synchronize all physical partitions on a physical volume with the related copies of the logical partition to which they correspond.

It is an undocumented command whose usage is:

lresyncpv -g VGid -p PVid
lslv
lslv is an object file command that shows you information about a logical volume.

It is a documented command whose usage is:

lslv [-l | -m] [-n DescriptorPV] LVname
lslv: [-n DescriptorPV] -p PVname [LVname]

For examples on how to use lslv, please refer to Using Commands to View AIX Version 4 Logical Volume Manager Information.

Please refer to the entry for lslv in AIX Version 4 Specific File Features.

lsps
lsps is an object file command that shows you information about paging type logical volumes.

It is a documented command whose usage is:

lsps {-s | [-c | -l] {-a | Psname | -t {lv|nfs} } }
lspv
lspv is an object file command that shows you information about a physical volume in a volume group.

It is a documented command whose usage is:

lspv [-M | -l | -p]  [-n DescriptorPV] [-v VGid] [PVname]

For examples on how to use lspv, please refer to Using Commands to View AIX Version 4 Logical Volume Manager Information.

lsvg
lsvg is an object file command that shows you information about the volume groups in your system.

It is a documented command whose usage is:

lsvg [-o] [-n PVname]
       lsvg [-i] [-M | -l | -p] VGname

For examples on how to use lslv, please refer to Using Commands to View AIX Version 4 Logical Volume Manager Information.

lsvgfs
lsvgfs is an object file command that lists the file systems that are in the specified volume group.

It is a documented command whose usage is:

lsvgfs VGname
lvaryoffvg
lvaryoffvg is an object file command that is called by the varyoffvg command to vary off a volume group, and then update the VGDA on disk, but not the ODM.

It is an undocumented command whose usage is:

lvaryoffvg -g VGid [-f]
lvaryonvg
lvaryonvg is an object file command that is called by the mkvg command to vary on a volume group.

It is an undocumented command whose usage is:

lvaryonvg -a VGname -V MajorNumber -g VGid
        [-ornpft] Filename
lvchkmajor
lvchkmajor is an object file command that checks whether a major device number is being used.

It is a documented command whose usage is:

lvchkmajor Majornumber VGname
lvgenmajor
lvgenmajor is an object file command that creates or gets the major number for the logical volumes that belong to the volume group specified as an argument to the redefinevg or mkvg commands.

It is an undocumented command whose usage is:

lvgenmajor VGname
lvgenminor
lvgenminor is an object file command that returns a minor number that is used during the creation of a logical volume.

It is an undocumented command whose usage is:

lvgenminor [-p PreferredNumber] MajorNumber NewDeviceName
lvlstmajor
lvlstmajor is an object file command that lists currently unused major numbers.

It is a documented command whose usage is:

lvlstmajor
lvmmsg
lvmmsg is an object file command that is used by other logical volume manager commands to generate messages.

It is an undocumented command whose usage is:

lvmmsg MessageNumber
lvrelmajor
lvrelmajor is an object file command that frees up the major number of a volume group when its removed from the system.

It is an undocumented command whose usage is:

lvrelmajor VGname
lvrelminor
lvrelminor is an object file command that frees up a minor number for a logical volume or volume group that's removed from the system.

It is an undocumented command whose usage is:

lvrelminor Name
migfix
migfix is an object file command that is used by the reorgvg command to help determine the proper order of physical partition moves.

It is an undocumented command whose usage is:

migfix map_file_names

This command is used by the reorgvg script command.

migratepv
migratepv is a Bourne shell script command that is used to move physical partitions from one physical volume to another.

It is a documented command whose usage is:

migratepv [-i] [-l LVname] SourcePV DestinationPV...

For examples on how to use migratepv, please refer to How to Use the migratepv Command.

mklv
mklv is a Bourne shell script command that creates a logical volume.

It is a documented command whose usage is:

mklv [-a IntraPolicy] [-b BadBlocks] [-c Copies] [-d Schedule]
[-e InterPolicy] [-i] [-L Label] [-m MapFile] [-r Relocate]
[-s Strict] [-t Type] [-u UpperBound] [-v Verify&rbrk [-w MWC]
[-x MaxLPs] [-y LVname] [-Y Prefix] VGname NumberOfLPs [PVname...]

Please refer to the entry for mklv in AIX Version 4 Specific File Features.

mklvcopy
mklvcopy is a Bourne shell script command that makes copies of logical partitions for a logical volume

It is a documented command whose usage is:

mklvcopy [-a IntraPolicy] [-e InterPolicy]
        [-k] [-m MapFile] [-u UpperBound] [-s Strict]
        LVname LPcopies [PVname...]
mkps
mkps is an object file command that creates a paging space using a logical volume or an NFS server.

It is a documented command whose usage is:

mkps [-a] [-n] [-t lv] -s NumLPs Vgname Pvname
mkps [-a] [-n] -t nfs hostname pathname
mkvg
mkvg is a Bourne shell script command that creates a volume group.

It is a documented command whose usage is:

mkvg [-d MaxPVs] [-f] [-i] [-m MaxPVsize]
        [-n] [-s PPsize]
        [-V MajorNumber] [-y VGname] PVname...
putlvcb
putlvcb is an object file command that is used by high-level shell scripts updatelv, rmlvcopy, mklvcopy mklv, extendlv, cplv and chlv to update the logical volume control block. Hence, be very careful when you change logical volume information.

It is an undocumented command whose usage is:

putlvcb [-a IntraPolicy] [-c Copies] [-e InterPolicy] [-i LVid]
        [-n Size] [-r Relocate] [-L Label] [-t Type]
        [-u UpperBound] [-s Strict] LVName
putlvcb [-f FileSystemName] LVName

Please refer to the entry for putlvcb in AIX Version 4 Specific File Features.

putlvodm
putlvodm is an object file command that places logical volume manager information only into the ODM, so it is called by many other logical volume manager commands to help ensure that ODM information is synchronized with data stored in other areas, such as the disk VGDA.

It is an undocumented command whose usage is:

putlvodm [-a IntraPolicy] [-B label] [-c Copies] [-e InterPolicy]
         [-L LVid] [-l LVname] [-n NewLVName] [-r Relocate]
         [-s Strict] [-t Type] [-u UpperBound] [-y Copyflag]
         [-z Size] LVid
putlvodm [-o Auto-on] [-k] [-K] [-q VGstate]
         [-v VGname -m majornum] [-V] VGid
putlvodm [-p VGid] [-P] PVid

Please refer to the entry for putlvodm in AIX Version 4 Specific File Features.

redefinevg
redefinevg is a Bourne shell script command that redefines the set of physical volumes of the specified volume group in the device configuration database.

It is a documented command whose usage is:

redefinevg {-d PVname | -i VGid} [-V MajorNumber] VGname
reducevg
reducevg is a Bourne shell script command that deletes physical volumes from a specified volume group.

It is a documented command whose usage is:

reducevg [-d] [-f] VGname PVname...
reorgvg
reorgvg is a Bourne shell script command that reorganizes the physical partition allocation map for a volume group.

It is a documented command whose usage is:

reorgvg [-i] VGname [LVname...]
rmlv
rmlv is a Bourne shell script command that removes logical volumes from a volume group.

It is a documented command whose usage is:

rmlv [-f] LVname...

Please refer to the entry for rmlv in AIX Version 4 Specific File Features.

rmlvcopy
rmlvcopy is a Bourne shell script command that removes copies from a logical volume.

It is a documented command whose usage is:

rmlvcopy LVname LPcopies [PVname...]
rmps
rmps is an object file command that removes a paging space.

It is a documented command whose usage is:

rmps Psname
synclvodm
synclvodm is a Bourne shell script command that synchronizes logical volume and volume group information.

It is a documented command whose usage is:

synclvodm [-v] VGname [LVname...]
syncvg
syncvg is a Bourne shell script command that synchronizes logical partition copies.

It is a documented command whose usage is:

syncvg [-i] [-f] {-l|-p|-v} Name
tstresp
tstresp is an object file command that is used by the cplv, extendvg, mkvg and rmlv shell scripts to convert a user's response to a question into a return code, so that the calling command can act appropriately.

It is an undocumented command whose usage is:


# tstresp yes
# echo $?
1
# tstresp no
# echo $?
0

updatelv
updatelv is a Bourne shell script command that updates the logical volume control block and the ODM.

It is an undocumented command whose usage is:

updatelv LVname VGname
updatevg
updatevg is a Bourne shell script command that is used to synchronize volume group information in the ODM if the ODM has at least a valid volume group identifier.

It is an undocumented command whose usage is:

updatevg VGname
varyoffvg
varyoffvg is a Bourne shell script command that deactivates a volume group so that it can't be accessed.

It is a documented command whose usage is:

varyoffvg [-s] VGname
varyonvg
varyonvg is an object file command that activates a volume group so that it can be accessed.

It is a documented command whose usage is:

varyonvg [-f] [-n] [-s] [-p] VGname

Usr Part Files which are in the /usr/lib Directory

liblvm.a
This is the Logical Volume Manager Library that is used by many logical volume manager subroutines. Please refer to programming information in AIX Version 4.1 Hypertext Information Base Library.
libsm.a
This is another logical volume manager library. You can use the what command to see which functions are in this library. Please refer to programming information in AIX Version 4.1 Hypertext Information Base Library.
./methods/deflvm
This is a file that is used during device configurations. Again, it is only of interest to programmers.

There are no files in the root or share parts of the bos.rte.lvm fileset.

Using File System Administration Commands

Usr Part Files which are in the /usr/sbin Directory.

chfs
chfs is an object file command that changes file system attributes such as mount point, permissions, and size.

It is a documented command whose usage is:

chfs [-n Nodename] [-m NewMountpoint] [-u Group] [-A {yes|no}]
     [-t {yes|no}] [-p {ro|rw}] [-a Attribute=Value] [-d Attribute]
     FileSystem
chvfs
chvfs is an object file command that changes entries in the /etc/vfs file.

It is a documented command whose usage is:

chvfs VfsEntry
crfs
crfs is an object file command that creates a file system within a previously created logical volume.

It is a documented command whose usage is:

crfs -v Vfs {-g Volumegroup | -d Device} -m Mountpoint
   [-u Mountgroup] [-A {yes|no}] [-t {yes|no}] [-p {ro|rw}]
   [-l Logpartitions] [-n nodename] [-a Attribute=Value]
crvfs
crvfs is an object file command that adds entries to the /etc/vfs file.

It is a documented command whose usage is:

crvfs VfsEntry
dfsck
dfsck is an object file command that checks for file system consistency, and allows interactive repair of file systems.

It is a documented command whose usage is:

dfsck [-Options] Filesystem1 ... [-Options] Filesystem2 ...
dumpfs
dumpfs is an object file command that prints out the superblock, i-node map, and disk map for a file system or special device.

It is a documented command whose usage is:

dumpfs {FileSystem | Device}
fdformat
fdformat is an object file command that formats diskettes or read/write optical media disks.

It is a documented command whose usage is:

fdformat [-h] Device
ff
ff is an object file command that reads i-node information for the specified filesystem, and then writes it to stdout.

It is a documented command whose usage is:

ff [-3MIldsu -V Vfs -i Ilist -p Path -n File
   -a # -m # -c #] /InputDevice
format
format is an object file command that formats diskettes for use by the system.

It is a documented command whose usage is:

format [-fl] [-d Device]
fsck
fsck is an object file command that checks for file system consistency, and allows interactive repair of file systems.

It is a documented command whose usage is:

fsck [-y|-n|-p] [-f] [-V Vfs] [-d #] [-i #]
     [-t File] [-o Options] Filesystem ...
fsdb
fsdb is an object file command that allows the user to examine, alter, and debug the file system specified in the command.

It is a documented command whose usage is:

fsdb FileSystem [-]
fuser
fuser is an object file command that lists the process numbers of local processes that use the file(s) specified.

It is a documented command whose usage is:

fuser [-ku] File ... [-]

See AIX Version 4 Specific File Features for changes in the fuser command.

imfs
imfs is an object file command that is uses information from /etc/filesystems to export or import logical volumes.

It is an undocumented command whose usage is:

imfs [-xlf] vgname ...

See AIX Version 4 Specific File Features for changes in the imfs command.

logform
logform is an object file command that is used to initialize a logical volume for use a journaled file system log.

It is a documented command whose usage is:

logform LogName
logredo
logredo is an object file command that uses the journaled file system log to reestablish consistency in the specified file system.

It is an undocumented command whose usage is:

logredo [-n] filename
lsfs
lsfs is an object file command that displays characteristics of the specified file system such as mount points, permissions, and file system size.

It is a documented command whose usage is:

lsjfs [-q] {-a | -v Vfs| -u Group | Filesystem ...}
lsjfs
lsjfs is a Korn shell script file that processes the output of the lsfs command into a form acceptable by smit.

It is an undocumented command whose usage is:

lsjfs [-q] [-c|-l] {-a | -v vfstype | -u mtgroup | fsname [fsname ...]}
lsvfs
lsvfs is an object file command that lists entries in the /etc/vfs file.

It is a documented command whose usage is:

lsvfs {-a | Vfsname}
mkfs
mkfs is an object file command that makes a new file system on the specified device.

It is a documented command whose usage is:

mkfs [-b BootProgram] [-i Inodes] [-l Label]
     [-o Options] [-p Prototype]
     [-s Size] [-v VolumeLabel] [-V vfs] {Device|Filesystem}
mklost+found
mklost+found is a Bourne shell script that creates a lost and found directory in the current directory for the fsck command.

It is a documented command whose usage is:

mklost+found
mknod
mknod is an object file command that makes a directory entry and creates an i-node for a special file when used by the root user. Otherwise it creates a named pipeline.

It is a documented command whose usage is:

mknod Name {p}
mknod Name {b | p} Major Minor
mkproto
mkproto is a Bourne shell script that constructs a prototype for a new file system.

It is a documented command whose usage is:

mkproto Special Proto
mount
mount is an object file command that instructs the operating system to make the specified file system available for use from the specified point.

It is a documented command whose usage is:

mount [-fipr] [-n Node] [-o Options] [-t Type] [-{v|V} Vfs]
           [-a | all | [[Node:]Device] [Directory]]
ncheck
ncheck is an object file command that displays the path name for files specified by i-node in the specified file system.

It is a documented command whose usage is:

ncheck [ [-a] [-i InodeNumbers ...] | [-s] ] [FileSystem]
proto
proto is an object file command that creates a prototype file for a file system or part of a file system.

It is a documented command whose usage is:

proto Directory [Prefix]
rmfs
rmfs is an object file command that removes a file system.

It is a documented command whose usage is:

rmfs [-r] FileSystem
rmvfs
rmvfs is an object file command that removes entries from the /etc/vfs file.

It is a documented command whose usage is:

rmvfs VfsName
umount
umount is an object file command that unmounts a file system from its mount point.

It is a documented command whose usage is:

umount [-sf] {-a|-n Node|-t Type|all|allr|Device|File|Directory|Filesystem}
unmount
unmount is an object file command that has exactly the same function as the umount command.

It is a documented command whose usage is:

unmount [-sf] {-a|-n Node|-t Type|all|allr|Device|File|Directory|Filesystem}

Usr Part Files which are in the /usr/bin Directory

istat
istat is an object file command that displays information about a particular i-node number.

It is a documented command whose usage is:

istat {FileName | I-NodeNumber Device}

Root Part Files which are in the /etc Directory

filesystem
filesystems is a text file containing file system definitions for all file systems.
vfs
vfs is a text file containing definitions for all file system types.

Root Part Files which are in the /sbin/helpers Directory

v3fshelper
v3fshelper is an object file command that is used by the mount and umount commands to implement file system mounts and unmounts.

There are no files in the share parts of the bos.rte.filesystem fileset.

Using System Backup and BOS Installation Utilities

This section contains backup and installation commands.

Usr Part Files which are in the /usr/lpp/bosinst Directory

bosmenus
bosmenus is an object file command that displays the BOS administration menus. This command has changed in AIX Version 4, please refer to AIX Version 4 Specific File Features for details.

Usr Part Files which are in the /usr/bin Directory

mksysb
mksysb is a Korn shell script that creates an installable image of the root volume group.

It is a documented command whose usage is:

mksysb Device
mkszfile
mkszfile is a Korn shell script that creates the /.fs.size file for use by the mksysb command.

It is a documented command whose usage is:

mkszfile [-f]

Usr Part Files which are in the /usr/sbin Directory

mkinsttape
mkinsttape is a Bourne shell script that creates the BOS install/maintenance tape image.

It is an undocumented command whose usage is:

mkinsttape [/file]

There are no files in the root or share parts of the bos.sysmgt.sysbr fileset.

Using Archive Commands

This section contains the archive commmands.

Usr Part Files which are in the /usr/bin Directory

compress
compress is an object file command that reduces the size of the specified file using the adaptive LZ algorithm.

It is a documented command whose usage is:

compress [-CcdFfnqVv] [-b Bits] [file ...]
cpio
cpio is an object file command that copies files into and out of archive storage.

It is a documented command whose usage is:

cpio -o[acvBC<value> <name-list >collection
cpio -i[bcdmrstuvfBC<value>S6] [pattern ...] <collection>
cpio -p[adlmuv] directory <name-list>
dd
dd is an object file command that reads a file in, converts the data (if required), and copies the file out.

It is a documented command whose usage is:

dd [cbs=BlockSize] [count=InputBlocks] [files= InputFiles]
   [fskip=SkipEOFs] [if=InFile] [of=OutFile] [seek=RecordNumber]
   [skip=SkipInputBlocks] [ibs=InputBlockSize] [obs=OutputBlockSize]
   [bs=BlockSize] [conv=[ascii|ebcdic|lcase|ucase|iblock|ibm|noerror
   |swab|sync|oblock|notrunc|block|unblock]]
mt
mt is an object file command that sends commands to a streaming tape device.

It is a documented command whose usage is:

mt [ -f device ] subcommand [ count ]
valid subcommands are: weof eof fsf bsf fsr bsr rewind offline
                       rewoffl status
pack
pack is an object file command that saves the specified file(s) in a compressed form.

It is a documented command whose usage is:

pack [-] [-f] File ...
pax
pax is object file command that extracts, writes and lists members of archive files. It also copies file and directory hierarchies.

It is a documented command whose usage is:

pax -[cdnv] [-f archive] [-s replstr] [pattern...]
pax -r [-cdiknuvy] [-f archive] [-p string] [-s replstr] [pattern...]
pax -w [-dituvyX] [-b blocking] [[-a] -f archive] [-s replstr]
       [-x format] [pathname...]
pax -r -w [-diklntuvyX] [-p string] [-s replstr] [pathname...] directory

See AIX Version 4 Specific File Features for changes in AIX Version 4.

pcat
pcat is an object file command that unpacks the specified files and writes them to standard output.

It is a documented command whose usage is:

pcat {File|File.Z} ...
tar
tar is an object file command that writes files to, or retrieves files from, archive storage media.

It is a documented command whose usage is:

tar -{crtux} [-BFdhilmpsvw] [-num] [-ffile[-num]]
             [-bblocks] [-S feet] [-S feet@density] [-S blocksb]
             [-Linputlist] [-C directory] [-Nblocks] file ...

See AIX Version 4 Specific File Features for changes in AIX Version 4.

tcopy
tcopy is an object file command that copies information from one tape device to another.

It is a documented command whose usage is:

tcopy Source [Destination]
tctl
tctl is an object file command that sends commands to a streaming tape device.

It is a documented command whose usage is:

tctl [ -Benv ] [ -b num ] [ -p num ]
     [ -f device ] subcommand [ count ]
valid subcommands are: weof eof fsf bsf fsr bsr rewind offline rewoffl
                       erase retension read write status

See AIX Version 4 Specific File Features for changes in AIX Version 4.

uncompress
uncompress is an object file command that restores files compressed by the compress command to their original size.

It is a documented command whose usage is:

uncompress [-cFfnqVv] [file ...]
unpack
unpack is an object file command that expands files that were compressed using the pack command.

It is a documented command whose usage is:

unpack File ...
zcat
zcat is an object file command that will uncompress data in tha same way as the uncompress though always to standard output.

It is a documented command whose usage is:

zcat [-FfnV] [file ...]

See AIX Version 4 Specific File Features for changes in AIX Version 4.

Usr Part Files which are in the /usr/sbin Directory

backbyinode
backbyinode is an object file command that uses the backup command to backup files by i-node.

It is a documented command whose usage is:

backbyinode [-b Number1] [-f Device] [-l Number2]
            [-u] [-?] [-c] [w|W]] [-Level] [Filesystem]
backbyname
backbyname is an object file command that used the backup command to backup files by name.

It is a documented command whose usage is:

backbyname -i [-b Number] [-p [-e RegularExpression]] [-f Device]
              [-INumber] [-o] [-q] [-v]
backup
backup is an object file command that backs up files or file systems by i-node or name.

It is a documented command whose usage is:

backup [-b Number1] [-f Device] [-l Number2]
       [-u] [-?] [-c] [w|W]] [-Level] [Filesystem]
backup -i [-b Number] [-p [-e RegularExpression]] [-f Device]
          [-INumber] [-o] [-q] [-v]
flcopy
flcopy is an object file command that copies information to and from diskettes.

It is a documented command whose usage is:

flcopy [-f Device] [-h] [-r] [-t Number]
rdump
rdump is an object file command that backups local files by i-node number to a remote machine.

It is a documented command whose usage is:

rdump [-b Number1] [-d Density] -f Machine: Device [-sSize]
      [-u] [-?] [-c] [w|W]] [-Level] [Filesystem]
restbyinode
restbyinode is an object file command that uses the restore command to restore files that were backed up by i-node.

It is an undocumented command whose usage is:

restbyinode -[thvy] [-f device] [-s #] [-b #] [file file ...]
restbyinode -[xhmvy] [-f device] [-s #] [-b #] [file file ...]
restbyinode -[ihmvy] [-f device] [-s #] [-b #]
restbyinode -[rvy] [-f device] [-s #] [-b #]
restbyinode -[Rvy] [-f device] [-s #] [-b #]

See AIX Version 4 Specific File Features for changes in AIX Version 4.

restbyname
restbyname is an object file command that uses the restore command to restore files that were backed up by name.

It is a documented command whose usage is:

restbyname -[thvy] [-f device] [-s #] [-b #] [file file ...]
restbyname -[xhmvy] [-f device] [-s #] [-b #] [file file ...]
restbyname -[ihmvy] [-f device] [-s #] [-b #]
restbyname -[rvy] [-f device] [-s #] [-b #]
restbyname -[Rvy] [-f device] [-s #] [-b #]
restore
restore is an object file command that restores files or file systems that were backed up using the backup command.

It is a documented command whose usage is:

For by name backups:
restore -[AxvqMd] [-f device] [-s #] [-b #] [file file ...]
restore -[t | T]vq] [-f device] [-s #] [-b #]
restore [-X # [-d]] [-f device] [-s #] [-b #] [file file ...]
For version 2 inode backups:
restore [-d] -[r] [-f device] [file ...]
For version 3 inode backups:
restore -[t | T]hvyB] [-f device] [-s #] [-b #] [file file ...]
restore -[xhmvyB] [-f device] [-s #] [-b #] [file file ...]
restore -[ihmvy] [-f device] [-s #] [-b #]
restore -[rvyB] [-f device] [-s #] [-b #]
restore -[RvyB] [-f device] [-s #] [-b #]

See AIX Version 4 Specific File Features for changes in AIX Version 4.

rmt
rmt is an object file command that allows control of remote tape devices via subcommands.

It is a documented command whose usage is:

rmt
valid subcommands: O DeviceMode, C Device, L WhenceOffset
                   W Count, R Count, I OperationCount
rrestore
rrestore is an object file command that restores files from a remote machines device that were backed up by i-node.

It is a documented command whose usage is:

rrestore [-b Number] [-h] [-i] [-m] [-r] [-R] [-s Number]
[-t]
         [-v] [-y] [-x] -fMachine: Device [FileSystem ...] [File ...]

See AIX Version 4 Specific File Features for changes in AIX Version 4.

tapechk
tapechk is Korn shell script that performs simple consistency checking for streaming tape drives.

It is a documented command whose usage is:

tapechk [-?] Number1 Number2

There are no files in the share or usr parts of the bos.rte.archive fileset.

Using Other Fileset Commands

Other documented commands that are relevant to AIX storage management that are in the filesets referred to in Major AIX Version 4 Filesets Relevant to Storage Management include:

bootlist boot logical volume
Updates the list of boot devices.
bosboot
Builds a boot logical volume.
bootinfo
Gives information about the boot physical volume.
savebase
Saves ODM information to the boot logical volume.
/sbin/rc.boot
A shell script executed during the system boot.
/etc/rc
A shell script executed during the system boot.
swapspaces
Activates paging devices.
snap
A tool used to gather data for problem analysis.
diag
Used to execute the hardware diagnostics utilities.
lscfg
Gives detailed information about the RISC System/6000* hardware configuration.
quotaon
Starts the disk quota monitor.
errpt
Formats the error log information.
diff
Compares the contents of two text files.
lsdev
Lists the devices known to the system.
lsattr
Lists the attributes of the devices known to the system
mkdev
Configures a device.
rmdev
Removes a device.
lvedit
Used for interactive definition and placement of logical volumes within a volume group. Although this command was part of the optional program product "Extended Commands" (bosext1.extcmds.obj) in AIX V3.2, it is now part of the separate licensed program product known as "Performance Toolbox/6000", product number 5969-623, in AIX Version 4.

AIX Version 4 Specific File Features

This section looks at those commands that are new or changed in AIX Version 4.

Using Logical Volume Manager Files in an AIX Version 4 Environment

This section looks at logical volume manager commands.

Usr Part Files which are in the /usr/sbin Directory

As well as the specific AIX Version 4 noted for each individual file, the files listed in this section no longer have symbolic links to the /etc directory. The current workaround until you change all your pathnames is to install the AIX 3.2 to 4.1 Compatibility Links fileset.

chvg
A new flag, -u allows the systems administrator to unlock a volume group if another logical volume manager operation has abnormally terminated. It is important to ensure that no other process is using this volume group when this process is run.

It is a documented command whose usage is:

chvg [-a Auto on] [-Q quorum] [-u] VGname...
getlvcb
The high level shell script updatelv that calls this command does so with two new flags in AIX Version 4. These flags are
  • -P - stripe width
  • -S - the first physical partition number used on the 2nd disk when P is 2.
  • It is an undocumented command whose usage is:

    getlvcb -aceLrsSPtu LVName
    getlvcb -f LVName
    
    getlvodm
    getlvodm obtains volume group and logical volume information from the ODM. In AIX Version 4, it has a new flag, -G.

    It is an undocumented command whose usage is:

    getlvodm [-a LVdescript] [-B LVdesrcript] [-b LVid]
             [-cVid] [-C] [-d VGdescript]
             [-e LVid] [-F] [-g PVid] [-h]
             [-j PVdescript] [-k] [-L VGdescript]
             [-l LVdescript] [-m LVid] [-p PVdescript]
             [-r LVid] [-s VGdescript] [-t VGid]
             [-u VGdescript] [-v VGdescript] [-w VGid]
             [-y LVid] [-G LVdescript]
    
    importvg
    We found that on the level of AIX Version 4 that we used, an imported volume group was left in a varied on state when importvg completed its execution. This behaviour contradicts the information that we had access to, but we believe that is a reasonable and logical step to want to varyon and access a volume group after you have imported it.
    lquerylv
    A new flag, -b, has been added that tells us the stripe exponent, stripe_exp, so that 2 raised to the power of stripe_exp gives the stripe size.

    It is an undocumented command whose usage is:

    lquerylv -L LVid [-p PVname] [-NGnMScsPRvoadlArtwb]
    
    lslv
    Although this command does not have any new flags, it may have more output if it used to obtain information about a striped logical volume. In this case only, the following are two extra fields in the first column of the output of the command lslv stripedlvname
    STRIPE WIDTH:       2
    STRIPE SIZE:        32K
    

    It is a documented command whose usage is:

    lslv [-l | -m] [-n DescriptorPV] LVname
    lslv [-n DescriptorPV] -p PVname [LVname]
    
    mklv
    This has a new flag if you want to use striping, -S StripeSize

    It is a documented command whose usage is:

    mklv [-a IntraPolicy] [-b BadBlocks] [-c Copies] [-d Schedule]
    [-e InterPolicy] [-i] [-L Label] [-m MapFile] [-r Relocate]
    [-s Strict] [-t Type] [-u UpperBound] [-v Verify&rbrk [-w MWC]
    [-x MaxLPs] [-y LVname] [-Y Prefix] [-Y StripeSize]
    VGname NumberOfLPs [PVname...]
    
    putlvcb
    Use this command with extreme caution, and refer to the updatelv command for some of its flags, including those that are for striping parameters.

    It is an undocumented command whose usage is:

    putlvcb [-a IntraPolicy] [-c Copies] [-e InterPolicy] [-i LVid]
            [-n Size] [-r BBReloc] [-L Label] [-s Strict]
            [-t Type] [-u Upper] [-S StripeExponent]
            [-O StripeWidth] LVName
    putlvcb [-f FileSystemName] LVName
    
    putlvodm
    putlvodm has a new flag in AIX Version 4, the -S flag which specifies the stripe size.

    It is an undocumented command whose usage is:

    putlvodm [-a IntraPolicy] [-B label] [-c Copies] [-e InterPolicy]
             [-L LVid] [-l LVname] [-n NewLVName] [-r Relocate]
             [-s Strict] [-t Type] [-u UpperBound] [-y Copyflag]
             [-z Size] [-S StripeSize] LVid
    putlvodm [-o Auto-on] [-k] [-K] [-q VGstate]
             [-v VGname] [-V] VGid
    putlvodm [-p VGid] [-P] PVid
    

    In addition, the -m majornum flag that was used with a VGid is no longer available.

    rmlv
    The rmlv command allows a physical volume name to be specified. Only logical partitions on this physical volume will be removed, and the logical volume itself will not be removed unless no other partitions exist on other physical volumes.

    It is a documented command whose usage is:

    rmlv [-f] [-p PVname] LVname...
    

    Usr Part Files which are in the /usr/lib Directory

    There are no files that were not in AIX Version 3.

    There are no files in the root or share parts of the bos.rte.lvm fileset.

    Using File System Administration Commands in an AIX Version 4 Environment

    This section contains file system administration commands.

    Usr Part Files which are in the /usr/sbin Directory

    defragfs
    defragfs is an object file command that increases a file systems contiguous free space by reorganizing file fragment allocations.

    It is a documented command whose usage is:

    defragfs [-q | -r] {device | mount-path}
    
    fuser
    The AIX Version 4 version of the fuser command no longer has the - flag. New flags automatically override the old settings.

    It is a documented command whose usage is:

    fuser [-ku] File ...
    
    imfs
    The AIX Version 4 version of the imfs command no longer has the -f flag.

    It is an undocumented command whose usage is:

    imfs [-xl] vgname ...
    
    lsjfs
    In AIX Version 4 the lsjfs Korn shell script has been rewritten slightly so that the lsfs command is now called with the -q command as well.

    It is an undocumented command whose usage is:

    lsfs {-a | -v Vfs| -u Group | Filesystem ...}
    

    Usr Part Files which are in the /usr/bin Directory

    See the AIX Version 3 section for files in this fileset.

    Root Part Files which are in the /etc Directory

    See the section on AIX Version 3 for files in this fileset.

    Root Part Files which are in the /sbin/helpers Directory

    See the section on AIX Version 3 for files in this fileset.

    There are no files in the share parts of the bos.rte.filesystem fileset.

    Using System Backup and BOS Installation Utilities in an AIX Version 4 Environment

    This section contains backup and installation commands.

    Usr Part Files which are in the /usr/lpp/bosinst Directory

    BosMenus
    BosMenus performs the same function as the AIX Version 3 command bosmenus, though it operates slightly differently.
    CheckSize
    CheckSize is used during the installation process to check that there is enough disk space for the operating system.

    It is an undocumented command whose usage is:

    CheckSize [-s] [-p]
    
    Get_RVG_Disks
    Get_RVG_Disks is used during the installation process to create a database of available disks according to the volume groups they are in.

    It is an undocumented command whose usage is:

    Get_RVG_Disks
    
    bicfgsup
    bicfgsup runs the startup script from the installation device before calling the Get_RVG_Disks.

    It is an undocumented command whose usage is:

    bicfgsup
    
    bi_main
    bi_main performs the main operating system installation.
    bosinst.template
    This file defines a template for the flow of the installation process.
    image.template
    This file contains template definitions for the installation process.
    tape
    This directory contains the following file:
    tape/tapefiles1
    This file contains a list of key operating system files.

    Usr Part Files which are in the /usr/bin Directory

    mksysb
    mksysb is a Korn shell script command that creates an installable image of the root volume group.

    It is a documented command whose usage is:

    mksysb [-i] [-m] [-e] [-b blocks] device
    
    mkszfile
    mkszfile is a Korn shell script that saves the system state to a file for use during reinstallation.

    It is a documented command whose usage is:

    mkszfile [-m]
    
    mkvgdata
    mkvgdata is a symbolic link to mkszfile.
    restvg
    restvg is a Korn shell script that restores a user volume group from a backup image created by the savevg command.

    It is a documented command whose usage is:

    restvg [-b Blocks] [-f Device] [-q] [-s] [DiskName ...]
    
    savevg
    savevg is a Korn shell script that finds and backs up all files for a specified volume group.

    It is a documented command whose usage is:

    savevg [-i] [-m] [-e] [-b blocks] [-f device] vgName
    

    This is a symbolic link to the mksysb command.

    Usr Part Files which are in the /usr/sbin Directory

    mkinsttape
    mkinsttape is a Korn shell script command that creates a BOS installation/maintenance tape file image.

    It is an undocumented command whose usage is:

    mkinsttape [/file]
    

    Root Part Files which are in the /etc Directory

    preserve.list
    This file contains a list of files that will be copied during a preservation installation.

    There are no files in the share parts of the bos.sysmgt.sysbr fileset.

    Using Archive Commands in an AIX Version 4 Environment

    This section contains archive commands.

    Usr Part Files which are in the /usr/bin Directory

    pax
    pax has an options flag in AIX Version 4, which was not present in AIX Version 3.

    It is a documented command whose usage is:

    pax -[cdnv] [-f archive] [-s replstr] [pattern...]
    pax -r [-cdiknuvy] [-f archive] [-o options] [-p string] [-s replstr]
           [pattern...]
    pax -w [-dituvyX] [-b blocking] [[-a] -f archive] [-o options]
           [-s replstr] [-x format] [pathname...]
    pax -r -w [-diklntuvyX] [-p string] [-s replstr] [pathname...] directory
    
    tar
    tar is an object file command that enables writing data to, and reading data from, an archive storage medium. There is a new -o options flag that provides backwards compatibility with older (non-AIX) versions of tar. The -S flag has also been enhanced.

    It is a documented command whose usage is:

    tar -{c|r|t|u|x} [-BdFhilmopsvw]
                     [-Number] [-fFile]
                     [-bBlocks] [-S [Feet] [Feet @Density] [Blocksb]]
                     [-LInputList] [-NBlocks] [-C Directory] File ...
    
    tctl
    tctl is an object file command that sends commands to a streaming tape device. In AIX Version 4 the -e flag is no longer used, and there is an extra command, the reset command.

    It is a documented command whose usage is:

    tctl [ -Bnv ] [ -b Blocks ] [ -p Num ] [-f Device] Subcommand [Count]
    valid subcommands are: weof, eof, fsf, bsf, fsr, bsr, rewind, offline,
                           rewoffl, erase, retension, read, write, reset,
                           status
    
    zcat
    zcat is an object file command that expands a file compressed using the compress command to standard out. The AIX Version 4 version of this command no longer uses the -F and -f flags.

    It is a documented command whose usage is:

    zcat [-nV] [File...]
    

    Usr Part Files which are in the /usr/sbin Directory

    restbyinode
    restbyinode is an object file command that uses the restore command to restore files that were backed up by inode.

    It is an undocumented command whose usage is:

    restbyinode -t[Dhvy] [-f Device] [-s Number] [-b Number] [File ...]
    restbyinode -x[Dhmvy] [-f Device] [-s Number] [-b Number] [File ...]
    restbyinode -i[Dhmvy] [-f Device] [-s Number] [-b Number]
    restbyinode -r[Dvy] [-f Device] [-s Number] [-b Number]
    restbyinode -R[Dvy] [-f Device] [-s Number] [-b Number]
    

    There is a new flag in AIX Version 4, -D.

    restore
    restore is an object file command that copies files recently backed up on a local device, onto the system. There have been a number of flag changes in AIX Version 4.

    It is a documented command whose usage is:

    Usage for Backup by Name:ber] [-f Device] [-s Number] [File ...]
    restore -x[Mdqv] [-b Number] [-f Device] [-s Number] [File ...]
            Extracts files by name.[-f Device] [-s Number] [File ...]
    restore -T|-t [-qv] [-b Number] [-f Device] [-s Number]
            Lists a table of contents or information about the backup.
    restore -X Number [-Mdqv] [-b Number] [-f Device] [-s Number] [File ...]
            Extracts beginning at a specified volume number.
    Usage for Version 2 Backup by Inode:
    restore -r[d] [-f Device] [File ...]ce] [-s Number]
    Usage for Backup by Inode: systems.
    restore -t[Bhqvy] [-b Number] [-f Device] [-s Number] [File ...]
            Lists a table of contents.
    restore -x[Bhmqvy] [-b Number] [-f Device] [-s Number] [File ...]
            Extracts files by name.
    restore -i[hmqvy] [-b Number] [-f Device] [-s Number]
            Restores files interactively
    restore -r[Bqvy] [-b Number] [-f Device] [-s Number]
            Restores full file systems.
    restore -R[Bvy] [-b Number] [-f Device] [-s Number]
            Restores full file systems.
    
    rrestore
    rrestore is an object file command that copies previously backed up file systems from a remote machine's device to the local machine. The -D flag is new in AIX Version 4.

    It is a documented command whose usage is:

    rrestore -t[Dhvy] -f Host: Device [-s Number] [-b Number] [File ...]
    rrestore -x[Dhmvy] -f Host: Device [-s Number] [-b Number] [File ...]
    rrestore -i[Dhmvy] -f Host: Device [-s Number] [-b Number]
    rrestore -r[Dvy] -f Host: Device [-s Number] [-b Number]
    rrestore -R[Dvy] -f Host: Device [-s Number] [-b Number]
    

    There are no files in the share or usr parts of the bos.rte.archive fileset.

    Using Commands to View AIX Version 4 Logical Volume Manager Information

    This section discusses sample output from the various options of the following commands:

    1. lsvg
    2. lslv
    3. lspv
    4. lqueryvg
    5. lquerylv
    6. lquerypv

    Some of these commands are discussed further in General AIX Storage Management. You may decide to use the script command to easily record the command syntax and output in one or more files. You can see from the script command timestamps included in the output that we executed these commands sequentially for the same logical volumes and all the physical volumes in the datavg volume group. By comparing the different command output formats, you can both understand the output and decide which commands you prefer. Note that we had to filter the output files to remove control M characters from the end of each line by executing commands like:


    # tr -d '\015' < lsvg.scr > lsvg.txt

    You can see the control M characters when you vi edit the output files.

    First assume the volume group is normal, so run lsvg like:


    Script started on Wed Jul 27 17:26:48 1994
    # lsvg datavg
    VOLUME GROUP: datavg VG IDENTIFIER: 000004467b689da1
    VG STATE: active PP SIZE: 4 megabyte(s)
    VG PERMISSION: read/write TOTAL PPs: 362 (1448 megabytes)
    MAX LVs: 256 FREE PPs: 289 (1156 megabytes)
    LVs: 6 USED PPs: 73 (292 megabytes)
    OPEN LVs: 0 QUORUM: 2
    TOTAL PVs: 2 VG DESCRIPTORS: 3
    STALE PVs: 0 STALE PPs 0
    ACTIVE PVs: 2 AUTO ON: yes
    # lsvg -l datavg
    datavg:
    LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
    datalv1 jfs 10 20 2 closed/syncd /datajfs1
    datalv2 jfs 10 20 2 closed/syncd /datajfs2
    datalv3 jfs 12 12 1 closed/syncd /datajfs3
    datalv4 jfs 10 10 1 closed/syncd /datajfs4
    datalog jfslog 1 1 1 closed/syncd N/A
    datapg paging 5 10 2 closed/syncd N/A
    # lsvg -p datavg
    datavg:
    PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
    hdisk8 active 75 50 15..00..05..15..15
    hdisk1 active 287 239 58..09..57..57..58

    script done on Wed Jul 27 17:28:28 1994

    Figure: Sample lsvg Output

    The first lsvg command quickly tells us how much of the volume group's disk space is used, and how much can be allocated to new or existing logical volumes. The -l flag provides us with a good volume group logical volume summary where we can:

    The -p flag provides a simple indication of how well organized the volume group is; in other words, if one physical volume is empty, and the other is almost full based on the FREE PPs column, then a I/O workload imbalance may result in a performance degradation.

    For more detailed volume group output, execute:


    Script started on Wed Jul 27 17:28:37 1994
    # lsvg -M datavg

    datavg
    hdisk8:1-15
    hdisk8:16 datalv1:1:1
    hdisk8:17 datalv1:2:1
    hdisk8:18 datalv1:3:1
    hdisk8:19 datalv1:4:1
    hdisk8:20 datalv1:5:1
    hdisk8:21 datalv1:6:1
    hdisk8:22 datalv1:7:1
    hdisk8:23 datalv1:8:1
    hdisk8:24 datalv1:9:1
    hdisk8:25 datalv1:10:1
    hdisk8:26 datalv2:1:2
    hdisk8:27 datalv2:2:2
    hdisk8:28 datalv2:3:2
    hdisk8:29 datalv2:4:2
    hdisk8:30 datalv2:5:2
    hdisk8:31 datalv2:6:2
    hdisk8:32 datalv2:7:2
    hdisk8:33 datalv2:8:2
    hdisk8:34 datalv2:9:2
    hdisk8:35 datalv2:10:2
    hdisk8:36 datapg:1:2
    hdisk8:37 datapg:2:2
    hdisk8:38 datapg:3:2
    hdisk8:39 datapg:4:2
    hdisk8:40 datapg:5:2
    hdisk8:41-75
    hdisk1:1-58
    hdisk1:59 datalv1:1:2
    hdisk1:60 datalv1:2:2
    hdisk1:61 datalv1:3:2
    hdisk1:62 datalv1:4:2
    hdisk1:63 datalv1:5:2
    hdisk1:64 datalv1:6:2
    hdisk1:65 datalv1:7:2
    hdisk1:66 datalv1:8:2
    hdisk1:67 datalv1:9:2
    hdisk1:68 datalv1:10:2

    Figure: Sample lsvg -M Output

    and continuing on the next screen:


    hdisk1:69       datalv2:1:1
    hdisk1:70 datalv2:2:1
    hdisk1:71 datalv2:3:1
    hdisk1:72 datalv2:4:1
    hdisk1:73 datalv2:5:1
    hdisk1:74 datalv2:6:1
    hdisk1:75 datalv2:7:1
    hdisk1:76 datalv2:8:1
    hdisk1:77 datalv2:9:1
    hdisk1:78 datalv2:10:1
    hdisk1:79 datalv3:1
    hdisk1:80 datalv3:2
    hdisk1:81 datalv3:3
    hdisk1:82 datalv3:4
    hdisk1:83 datalv3:5
    hdisk1:84 datalv3:6
    hdisk1:85 datalv3:7
    hdisk1:86 datalv3:8
    hdisk1:87 datalv3:9
    hdisk1:88 datalv3:10
    hdisk1:89 datalv3:11
    hdisk1:90 datalv3:12
    hdisk1:91 datalv4:1
    hdisk1:92 datalv4:2
    hdisk1:93 datalv4:3
    hdisk1:94 datalv4:4
    hdisk1:95 datalv4:5
    hdisk1:96 datalv4:6
    hdisk1:97 datalv4:7
    hdisk1:98 datalv4:8
    hdisk1:99 datalv4:9
    hdisk1:100 datalv4:10
    hdisk1:101 datalog:1
    hdisk1:102 datapg:1:1
    hdisk1:103 datapg:2:1
    hdisk1:104 datapg:3:1
    hdisk1:105 datapg:4:1
    hdisk1:106 datapg:5:1
    hdisk1:107-287

    script done on Wed Jul 27 17:28:53 1994


    Figure: Continued Sample lsvg -M Output

    This is the most comprehensive output available from the lsvg command. We can see how it documents the exact use of physical partitions on all physical volumes in the volume group, compared to the summary presented by using the -p flag as shown in Figure - Sample lsvg Output. However, we can see from the lslv -p hdisk1 datalv3 command output shown in Figure - Continued Sample lslv -p Output. and the lspv -p hdisk1 command shown in Figure - Sample lspv -p Output that there are more suitable commands to use to check where the used physical partitions are. The lsvg -M datavg information can be used to create logical volume map files and is hence very useful if a corrupt VGDA needs to be fixed by recreating the datavg volume group.

    Now lets look at the output from the lslv command by executing:


    Script started on Wed Jul 27 17:57:00 1994
    # lslv datapg
    LOGICAL VOLUME: datapg VOLUME GROUP: datavg
    LV IDENTIFIER: 000004467b689da1.6 PERMISSION: read/write
    VG STATE: active/complete LV STATE: closed/syncd
    TYPE: paging WRITE VERIFY: off
    MAX LPs: 128 PP SIZE: 4 megabyte(s)
    COPIES: 2 SCHED POLICY: parallel
    LPs: 5 PPs: 10
    STALE PPs: 0 BB POLICY: relocatable
    INTER-POLICY: minimum RELOCATABLE: yes
    INTRA-POLICY: middle UPPER BOUND: 32
    MOUNT POINT: N/A LABEL: None
    MIRROR WRITE CONSISTENCY: off
    EACH LP COPY ON A SEPARATE PV ?: yes
    # lslv datalv3
    LOGICAL VOLUME: datalv3 VOLUME GROUP: datavg
    LV IDENTIFIER: 000004467b689da1.3 PERMISSION: read/write
    VG STATE: active/complete LV STATE: closed/syncd
    TYPE: jfs WRITE VERIFY: off
    MAX LPs: 128 PP SIZE: 4 megabyte(s)
    COPIES: 1 SCHED POLICY: parallel
    LPs: 12 PPs: 12
    STALE PPs: 0 BB POLICY: relocatable
    INTER-POLICY: minimum RELOCATABLE: yes
    INTRA-POLICY: middle UPPER BOUND: 32
    MOUNT POINT: /datajfs3 LABEL: /datajfs3
    MIRROR WRITE CONSISTENCY: on
    EACH LP COPY ON A SEPARATE PV ?: yes
    # lslv -l datapg
    datapg:n/A
    PV COPIES IN BAND DISTRIBUTION
    hdisk1 005:000:000 100% 000:005:000:000:000
    hdisk8 005:000:000 0% 000:000:005:000:000
    # lslv -l datalv3
    datalv3:/datajfs3
    PV COPIES IN BAND DISTRIBUTION
    hdisk1 012:000:000 100% 000:012:000:000:000

    Figure: Sample lslv Output

    If no flags are used, the logical volume attributes are listed in a format similar to that used for the lsvg command. As expected, the command lslv -l datapg provides a better summary of where the datapg physical partitions are located on disk than does the output of the lsvg command shown in Figure - Sample lsvg Output.

    To check how logical partitions have been mapped to physical partitions, execute:


    # lslv -m datapg
    datapg:n/A
    LP PP1 PV1 PP2 PV2 PP3 PV3
    0001 0102 hdisk1 0036 hdisk8
    0002 0103 hdisk1 0037 hdisk8
    0003 0104 hdisk1 0038 hdisk8
    0004 0105 hdisk1 0039 hdisk8
    0005 0106 hdisk1 0040 hdisk8
    # lslv -m datalv3
    datalv3:/datajfs3
    LP PP1 PV1 PP2 PV2 PP3 PV3
    0001 0079 hdisk1
    0002 0080 hdisk1
    0003 0081 hdisk1
    0004 0082 hdisk1
    0005 0083 hdisk1
    0006 0084 hdisk1
    0007 0085 hdisk1
    0008 0086 hdisk1
    0009 0087 hdisk1
    0010 0088 hdisk1
    0011 0089 hdisk1
    0012 0090 hdisk1

    script done on Wed Jul 27 18:04:36 1994

    Figure: Sample lslv -m Output

    This is probably the best way to check your configuration of a highly available volume group. Since each mirror copy is listed in a separate column, you just have to ensure that each row contains two or three different physical volume names, depending on whether you have two or three copies of a logical volume. In other words, you can quickly confirm that the copies are on different disks.

    For detailed disk layout from lslv to see exact physical partition placement, execute:


    Script started on Wed Jul 27 18:04:58 1994
    # lslv -p hdisk1 datapg
    hdisk1:datapg:n/A
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 1-10
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 11-20
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 21-30
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 31-40
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 41-50
    FREE FREE FREE FREE FREE FREE FREE FREE 51-58

    USED USED USED USED USED USED USED USED USED USED 59-68
    USED USED USED USED USED USED USED USED USED USED 69-78
    USED USED USED USED USED USED USED USED USED USED 79-88
    USED USED USED USED USED USED USED USED USED USED 89-98
    USED USED USED 0001 0002 0003 0004 0005 FREE FREE 99-108
    FREE FREE FREE FREE FREE FREE FREE 109-115

    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 116-125
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 126-135
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 136-145
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 146-155
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 156-165
    FREE FREE FREE FREE FREE FREE FREE 166-172

    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 173-182
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 183-192
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 193-202
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 203-212
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 213-222
    FREE FREE FREE FREE FREE FREE FREE 223-229

    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 230-239
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 240-249
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 250-259
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 260-269
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 270-279
    FREE FREE FREE FREE FREE FREE FREE FREE 280-287

    Figure: Sample lslv -p Output

    For the datapg logical volume on the hdisk8 physical volume, execute:


    # lslv -p hdisk8 datapg
    hdisk8:datapg:n/A
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 1-10
    FREE FREE FREE FREE FREE 11-15

    USED USED USED USED USED USED USED USED USED USED 16-25
    USED USED USED USED USED 26-30

    USED USED USED USED USED 0001 0002 0003 0004 0005 31-40
    FREE FREE FREE FREE FREE 41-45

    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 46-55
    FREE FREE FREE FREE FREE 56-60

    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 61-70
    FREE FREE FREE FREE FREE 71-75

    Figure: Continued Sample lslv -p Output

    For the datalv3 logical volume, execute:


    # lslv -p hdisk1 datalv3
    hdisk1:datalv3:/datajfs3
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 1-10
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 11-20
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 21-30
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 31-40
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 41-50
    FREE FREE FREE FREE FREE FREE FREE FREE 51-58

    USED USED USED USED USED USED USED USED USED USED 59-68
    USED USED USED USED USED USED USED USED USED USED 69-78
    0001 0002 0003 0004 0005 0006 0007 0008 0009 0010 79-88
    0011 0012 USED USED USED USED USED USED USED USED 89-98
    USED USED USED USED USED USED USED USED FREE FREE 99-108
    FREE FREE FREE FREE FREE FREE FREE 109-115

    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 116-125
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 126-135
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 136-145
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 146-155
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 156-165
    FREE FREE FREE FREE FREE FREE FREE 166-172

    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 173-182
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 183-192
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 193-202
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 203-212
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 213-222
    FREE FREE FREE FREE FREE FREE FREE 223-229

    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 230-239
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 240-249
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 250-259
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 260-269
    FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 270-279
    FREE FREE FREE FREE FREE FREE FREE FREE 280-287

    script done on Wed Jul 27 18:08:22 1994

    Figure: Continued Sample lslv -p Output

    This is probably the best character based pictorial representation of the disk regions that shows the exact location of the used and free physical partitions. It will also show you exactly which physical partitions are stale if you have implemented mirroring by printing the word STALE or by printing a ? character next to the logical partition number. The number 0001 in Figure - Continued Sample lslv -p Output indicates that the first logical partition of the datalv3 logical volume uses physical partition 79 on hdisk1, so the word USED on a physical partition refers to the fact that its used by a logical volume other than datalv3. The numbering helps us determine how badly a logical volume is fragmented within a physical volume, which may result in a performance degradation. This is not the case in this example because the physical partitions of each of the copies of the datapg and datalv3 logical volumes have been allocated in a contiguous manner. You may find it easier to notice this contiguity from the output of the lslv -m lvname commands shown in Figure - Sample lslv -m Output.

    As can be seen from the outputs for hdisk1 in Figure - Sample lslv -p Output or in Figure - Continued Sample lslv -p Output and for hdisk8 in Figure - Continued Sample lslv -p Output, it is easy to compare both the size and utilization of the disk regions of different disks. If you have many physical volumes, a summarized view of this information can be obtained from the output of the lspv -l disk_name command presented in Figure - Sample lspv Output. Finally, we can deduce the names of the different disk regions by comparing the numerical ranges presented in Figure - Continued Sample lslv -p Output with those in Figure - Sample lspv -p Output for hdisk1.

    Now, take a look at the lspv command by executing:


    Script started on Wed Jul 27 18:11:12 1994
    # lspv hdisk1
    PHYSICAL VOLUME: hdisk1 VOLUME GROUP: datavg
    PV IDENTIFIER: 00000201dc8b0b32 VG IDENTIFIER 000004467b689da1
    PV STATE: active
    STALE PARTITIONS: 0 ALLOCATABLE: yes
    PP SIZE: 4 megabyte(s) LOGICAL VOLUMES: 6
    TOTAL PPs: 287 (1148 megabytes) VG DESCRIPTORS: 1
    FREE PPs: 239 (956 megabytes)
    USED PPs: 48 (192 megabytes)
    FREE DISTRIBUTION: 58..09..57..57..58
    USED DISTRIBUTION: 00..48..00..00..00
    # lspv hdisk8
    PHYSICAL VOLUME: hdisk8 VOLUME GROUP: datavg
    PV IDENTIFIER: 0002479088f5f347 VG IDENTIFIER 000004467b689da1
    PV STATE: active
    STALE PARTITIONS: 0 ALLOCATABLE: yes
    PP SIZE: 4 megabyte(s) LOGICAL VOLUMES: 3
    TOTAL PPs: 75 (300 megabytes) VG DESCRIPTORS: 2
    FREE PPs: 50 (200 megabytes)
    USED PPs: 25 (100 megabytes)
    FREE DISTRIBUTION: 15..00..05..15..15
    USED DISTRIBUTION: 00..15..10..00..00
    # lspv -l hdisk1
    hdisk1:
    LV NAME LPs PPs DISTRIBUTION MOUNT POINT
    datalv1 10 10 00..10..00..00..00 /datajfs1
    datalv2 10 10 00..10..00..00..00 /datajfs2
    datalv3 12 12 00..12..00..00..00 /datajfs3
    datalv4 10 10 00..10..00..00..00 /datajfs4
    datalog 1 1 00..01..00..00..00 N/A
    datapg 5 5 00..05..00..00..00 N/A
    # lspv -l hdisk8
    hdisk8:
    LV NAME LPs PPs DISTRIBUTION MOUNT POINT
    datalv1 10 10 00..10..00..00..00 /datajfs1
    datalv2 10 10 00..05..05..00..00 /datajfs2
    datapg 5 5 00..00..05..00..00 N/A

    Figure: Sample lspv Output

    Just like the lsvg and lslv commands, you can execute the lspv command with no flags to display the disk attributes. Note that the output from the lspv -l hdisk1 command in Figure - Sample lspv Output is not the same as that from the lsvg -l datavg command shown in Figure - Sample lsvg Output, although both indicate the number of physical partitions and logical partitions whose ratio indicates the extent of any mirroring configuration.

    However, if your logical volumes are not mirrored, then you may prefer to summarize the logical volume information by executing lspv with a -p flag as follows:


    # lspv -p hdisk1
    hdisk1:
    PP RANGE STATE REGION LV ID TYPE MOUNT POINT
    1-58 free outer edge
    59-68 used outer middle datalv1 jfs /datajfs1
    69-78 used outer middle datalv2 jfs /datajfs2
    79-90 used outer middle datalv3 jfs /datajfs3
    91-100 used outer middle datalv4 jfs /datajfs4
    101-101 used outer middle datalog jfslog N/A
    102-106 used outer middle datapg paging N/A
    107-115 free outer middle
    116-172 free center
    173-229 free inner middle
    230-287 free inner edge
    # lspv -p hdisk8
    hdisk8:
    PP RANGE STATE REGION LV ID TYPE MOUNT POINT
    1-15 free outer edge
    16-25 used outer middle datalv1 jfs /datajfs1
    26-30 used outer middle datalv2 jfs /datajfs2
    31-35 used center datalv2 jfs /datajfs2
    36-40 used center datapg paging N/A
    41-45 free center
    46-60 free inner middle
    61-75 free inner edge

    script done on Wed Jul 27 18:13:04 1994

    Figure: Sample lspv -p Output

    Like the lspv -l output shown in Figure - Sample lspv Output, we know:

    However, the lspv -p output shown in Figure - Sample lspv -p Output also tells us:

    If you need to create map files for logical volumes that exist only on one disk, then you can execute lspv -M as shown in:


    Script started on Wed Jul 27 18:13:44 1994
    # lspv -M hdisk1
    hdisk1:1-58
    hdisk1:59 datalv1:1:2
    hdisk1:60 datalv1:2:2
    hdisk1:61 datalv1:3:2
    hdisk1:62 datalv1:4:2
    hdisk1:63 datalv1:5:2
    hdisk1:64 datalv1:6:2
    hdisk1:65 datalv1:7:2
    hdisk1:66 datalv1:8:2
    hdisk1:67 datalv1:9:2
    hdisk1:68 datalv1:10:2
    hdisk1:69 datalv2:1:1
    hdisk1:70 datalv2:2:1
    hdisk1:71 datalv2:3:1
    hdisk1:72 datalv2:4:1
    hdisk1:73 datalv2:5:1
    hdisk1:74 datalv2:6:1
    hdisk1:75 datalv2:7:1
    hdisk1:76 datalv2:8:1
    hdisk1:77 datalv2:9:1
    hdisk1:78 datalv2:10:1

    Figure: Sample lspv -M Output

    On the next screen:


    hdisk1:79       datalv3:1
    hdisk1:80 datalv3:2
    hdisk1:81 datalv3:3
    hdisk1:82 datalv3:4
    hdisk1:83 datalv3:5
    hdisk1:84 datalv3:6
    hdisk1:85 datalv3:7
    hdisk1:86 datalv3:8
    hdisk1:87 datalv3:9
    hdisk1:88 datalv3:10
    hdisk1:89 datalv3:11
    hdisk1:90 datalv3:12
    hdisk1:91 datalv4:1
    hdisk1:92 datalv4:2
    hdisk1:93 datalv4:3
    hdisk1:94 datalv4:4
    hdisk1:95 datalv4:5
    hdisk1:96 datalv4:6
    hdisk1:97 datalv4:7
    hdisk1:98 datalv4:8
    hdisk1:99 datalv4:9
    hdisk1:100 datalv4:10
    hdisk1:101 datalog:1
    hdisk1:102 datapg:1:1
    hdisk1:103 datapg:2:1
    hdisk1:104 datapg:3:1
    hdisk1:105 datapg:4:1
    hdisk1:106 datapg:5:1
    hdisk1:107-287

    Figure: Continued Sample lspv -M Output

    For hdisk8, try:


    # lspv -M hdisk8
    hdisk8:1-15
    hdisk8:16 datalv1:1:1
    hdisk8:17 datalv1:2:1
    hdisk8:18 datalv1:3:1
    hdisk8:19 datalv1:4:1
    hdisk8:20 datalv1:5:1
    hdisk8:21 datalv1:6:1
    hdisk8:22 datalv1:7:1
    hdisk8:23 datalv1:8:1
    hdisk8:24 datalv1:9:1
    hdisk8:25 datalv1:10:1
    hdisk8:26 datalv2:1:2
    hdisk8:27 datalv2:2:2
    hdisk8:28 datalv2:3:2
    hdisk8:29 datalv2:4:2
    hdisk8:30 datalv2:5:2
    hdisk8:31 datalv2:6:2
    hdisk8:32 datalv2:7:2
    hdisk8:33 datalv2:8:2
    hdisk8:34 datalv2:9:2
    hdisk8:35 datalv2:10:2
    hdisk8:36 datapg:1:2
    hdisk8:37 datapg:2:2
    hdisk8:38 datapg:3:2
    hdisk8:39 datapg:4:2
    hdisk8:40 datapg:5:2
    hdisk8:41-75

    script done on Wed Jul 27 18:14:09 1994

    Figure: Continued Sample lspv -M Output

    If you concatenate this lspv -M output from all the physical volumes in your volume group, then the combined file is the same as that obtained from the lsvg -M command, as shown in Figure - Sample lsvg -M Output and in Figure - Continued Sample lsvg -M Output.

    If the volume group is varied off, it is still possible to get some volume group information from lsvg -n hdiskx, and also, all the previous lslv and lspv output, if, in each command, the -N PVName flag is used. Check in infoExplorer for the use of this flag, as the returned data may not be current.

    If the ODM is badly corrupted or if a volume group has not been configured, then the previous commands may fail. However, the following commands will allow the disks in a volume group to be read directly. As well as helping you repair the ODM, you may also be able to determine what information is stored on a disk when the other physical volumes in the disk's volume group are not available. We can simulate these two scenario's by exporting the volume group so that the physical volume assignment by the operating system is:


    # lspv
    hdisk0 0000020158496d72 availvg
    hdisk1 00000201dc8b0b32 None
    hdisk2 000002007bb618f5 availvg
    hdisk3 00000446431550c9 availvg
    hdisk4 000137231982c0f2 stripevg
    hdisk5 00014732b1bd7f57 rootvg
    hdisk6 0001221800072440 stripevg
    hdisk7 00012218da42ba76 rootvg
    hdisk8 0002479088f5f347 None

    Figure: Sample lspv Output to See all Known Physical Volumes and Volume Groups

    First, use lqueryvg on the unassigned disks hdisk1 and hdisk8 to obtain general volume group information; always use the -t flag for field titles.


    Script started on Wed Jul 27 19:13:24 1994
    # lqueryvg -p hdisk1 -Avt
    Max LVs: 256
    PP Size: 22
    Free PPs: 289
    LV count: 6
    PV count: 2
    Total VGDAs: 3
    Logical: 000004467b689da1.1 datalv1 1
    000004467b689da1.2 datalv2 1
    000004467b689da1.3 datalv3 1
    000004467b689da1.4 datalv4 1
    000004467b689da1.5 datalog 1
    000004467b689da1.6 datapg 1
    Physical: 0002479088f5f347 2 0
    00000201dc8b0b32 1 0
    VGid: 000004467b689da1
    # lqueryvg -p hdisk8 -Avt
    Max LVs: 256
    PP Size: 22
    Free PPs: 289
    LV count: 6
    PV count: 2
    Total VGDAs: 3
    Logical: 000004467b689da1.1 datalv1 1
    000004467b689da1.2 datalv2 1
    000004467b689da1.3 datalv3 1
    000004467b689da1.4 datalv4 1
    000004467b689da1.5 datalog 1
    000004467b689da1.6 datapg 1
    Physical: 0002479088f5f347 2 0
    00000201dc8b0b32 1 0
    VGid: 000004467b689da1

    script done on Wed Jul 27 19:14:03 1994

    Figure: Sample lqueryvg Output

    The same VGid proves that they both belong to the same volume group, and we know that there are no other disks since the PV count is two. Since the names of the logical volumes are included in this lqueryvg command output, it is clearly beneficial to give them meaningful names to help you remember the contents of the logical volumes.

    We can use a logical volume identifier and the physical volume name to execute the following two commands to extract more logical volume and physical volume information from the disk VGDA and VGSA:


    Script started on Wed Jul 27 19:14:19 1994
    # lquerylv -p hdisk1 -L000004467b689da1.6 -at
    LVname: datapg
    VGid: 4467b689da1
    MaxLP: 128
    MPolicy: 2
    MWrtConsist: 2
    LVstate: 1
    Csize: 5
    PPsize: 22
    Permissions: 1
    Relocation: 1
    WrVerify: 2
    open_close: 2
    stripe_exp: 0
    striping_wid 0
    # lquerylv -p hdisk1 -L000004467b689da1.6 -rt
    LVMAP: 00000201dc8b0b32 102 1
    LVMAP: 0002479088f5f347 36 1
    LVMAP: 00000201dc8b0b32 103 2
    LVMAP: 0002479088f5f347 37 2
    LVMAP: 00000201dc8b0b32 104 3
    LVMAP: 0002479088f5f347 38 3
    LVMAP: 00000201dc8b0b32 105 4
    LVMAP: 0002479088f5f347 39 4
    LVMAP: 00000201dc8b0b32 106 5
    LVMAP: 0002479088f5f347 40 5

    Figure: Sample lquerylv Output for the Mirrored datapg Logical Volume

    We now know that datapg has two mirror copies, and is configured for high availability since we can see from the physical volume identifiers that each logical partition copy is on a different physical volume. Of course, it was much easier to view this information from the output of the lslv -m datapg command shown in Figure - Sample lslv -m Output.

    For the datalv3 logical volume, execute:


    # lquerylv -p hdisk1 -L000004467b689da1.3 -at
    LVname: datalv3
    VGid: 4467b689da1
    MaxLP: 128
    MPolicy: 2
    MWrtConsist: 1
    LVstate: 1
    Csize: 12
    PPsize: 22
    Permissions: 1
    Relocation: 1
    WrVerify: 2
    open_close: 2
    stripe_exp: 0
    striping_wid 0
    # lquerylv -p hdisk1 -L000004467b689da1.3 -rt
    LVMAP: 00000201dc8b0b32 79 1
    LVMAP: 00000201dc8b0b32 80 2
    LVMAP: 00000201dc8b0b32 81 3
    LVMAP: 00000201dc8b0b32 82 4
    LVMAP: 00000201dc8b0b32 83 5
    LVMAP: 00000201dc8b0b32 84 6
    LVMAP: 00000201dc8b0b32 85 7
    LVMAP: 00000201dc8b0b32 86 8
    LVMAP: 00000201dc8b0b32 87 9
    LVMAP: 00000201dc8b0b32 88 10
    LVMAP: 00000201dc8b0b32 89 11
    LVMAP: 00000201dc8b0b32 90 12

    Script done on Wed Jul 27 19:21:31 1994

    Figure: Sample lquerylv Output for the Non-Mirrored datalv3 Logical Volume

    For more physical volume information, execute lquerypv. You'll need to use the physical volume identifier to specify which disk you want to know about, and then use the volume group identifier and a physical volume name to specify which disk you want to read to get the information.

    Note that you will need a terminal that's about 115 columns wide to view output neatly as follows:


    Script started on Wed Jul 27 19:24:33 1994
    # lquerypv -p 0002479088f5f347 -g 4467b689da1 -N hdisk8 -dt\
    |grep 000004467b689da1.6|pg
    PVMAP: 0002479088f5f347:36 1 ODMtype 000004467b689da1.6 1
    00000201dc8b0b32:102 0000000000000000:0
    PVMAP: 0002479088f5f347:37 1 ODMtype 000004467b689da1.6 2
    00000201dc8b0b32:103 0000000000000000:0
    PVMAP: 0002479088f5f347:38 1 ODMtype 000004467b689da1.6 3
    00000201dc8b0b32:104 0000000000000000:0
    PVMAP: 0002479088f5f347:39 1 ODMtype 000004467b689da1.6 4
    00000201dc8b0b32:105 0000000000000000:0
    PVMAP: 0002479088f5f347:40 1 ODMtype 000004467b689da1.6 5
    00000201dc8b0b32:106 0000000000000000:0
    (EOF):
    # lquerypv -p 00000201dc8b0b32 -g 4467b689da1 -N hdisk1 -at
    PP Size: 22
    PV State: 0
    Total PPs: 287
    Alloc PPs: 48
    Total VGDAs: 1
    # lquerypv -p 0002479088f5f347 -g 4467b689da1 -N hdisk1 -at
    PP Size: 22
    PV State: 0
    Total PPs: 75
    Alloc PPs: 25
    Total VGDAs: 2
    #
    # lspv
    hdisk0 0000020158496d72 availvg
    hdisk1 00000201dc8b0b32 None
    hdisk2 000002007bb618f5 availvg
    hdisk3 00000446431550c9 availvg
    hdisk4 000137231982c0f2 stripevg
    hdisk5 00014732b1bd7f57 rootvg
    hdisk6 0001221800072440 stripevg
    hdisk7 00012218da42ba76 rootvg
    hdisk8 0002479088f5f347 None

    Figure: Sample lquerypv Output

    The first lqueryvg command output has been simplified by being piped into the grep command so that it only includes the lines that refer to the datapg logical volume. The information here agrees with the physical partition allocation map obtained from the lspv -p command that is displayed in Figure - Sample lspv -p Output. The next two lqueryvg command outputs match the information obtained from the lsvg commands as shown in Figure - Sample lsvg Output. In particular, note that:

    Now that we know exactly what these "mystery" physical volumes contain, we can import them and access the data by executing:


    # importvg -y datavg hdisk1
    datavg
    #
    # mount /datajfs1
    # ls -la /datajfs1
    total 16
    drwxr-sr-x 2 sys sys 512 Jul 25 14:33 .
    drwxr-xr-x 35 bin bin 1024 Jul 27 17:33 ..
    script done on Wed Jul 27 19:29:40 1994

    Figure: Accessing a Disk after Reading its VGDA to Check its Contents

    Now we can complete the above steps by a comparison of the output. The main point is that the same data can be obtained from many sources in many different formats, so its up to the systems administrator to decide which format is preferred.

    Using Commands to View AIX Version 4 Journaled File System Information

    This section discusses sample output for some of the options of the following:

    1. Commands included in filesets of AIX Version 4:

      The first two commands discussed, du and df, both produce similar output. Before looking at the commands themselves a brief overview of their differences in implementation will be given to account for the slight differences in output.

      On any given file system, execute:


      # du -sk /filesystem_path

      and then:
      # df /filesystem_path

      If you substract the number of free KB from the number of Total KB, you will get a number of used KB. This number will be higher than that which the du command will report as used on that same file system. The reason is the methodology used by each command.

      The du command basically walks down the directory tree taking the size of each file and rounding it up to the next multiple of the cluster size, which is 4KB under AIX Version 3. The results of the rounding operation is then added together to make a total, which is the number the du command returns. Thus, if you run du -sk in a directory with two files under 4KB each, the number output would be 12; 4KB for each of the two files and another 4KB for the directory entry. If you had a file that was 4097 bytes long (one byte over 4KB) and executed du -sk file then the number returned would be 8 because its size is rounded to the next increment of 4 KB, in this case, 8192 bytes or 8KB. The du command returns an approximation of the size of the file space used and does not include any file system overhead.

      The df command looks at the super block of the file system to determine how many 4KB data blocks are unallocated. Of the allocated storage, some of the space will be allocated for I-nodes. I-nodes are part of the overhead necessary for accessing information in the file system. As a result of this, both files and I-nodes are added into the final total of allocated storage space and a more accurate determination of file system usage is made.

      The amount of space which is used by inodes can be determined from the equation

         kilobyte space = total i-nodes / 8
      

      where the total i-nodes can be determined by running df -v and adding the iused and ifree columns.

      If you were to increase the size of that file system but not add any new files, then the du command would return the same number as before. The df command, however, would show more file system space was allocated than before the file system was increased, because when the file system was increased, more I-nodes were allocated.

    2. Commands included in filesets of other program products:

      As you become familiar with the information discussed in the AIX V3.2 Performance Monitoring and Tuning Guide article "Monitoring and Tuning Disk I/O" in the AIX Version 4.1 Hypertext Information Base Library, it is clear that the following commands provide you with much more journaled file system information. Although these commands were part of the optional program product "Extended Commands" (bosext1.extcmds.obj) in AIX V3.2, they are now part of the separate licensed program product known as "Performance Toolbox/6000 , product number 5696-623" in AIX Version 4. Hence, this product is a wise investment if you really want to fine tune and monitor your journaled file system configuration and performance.