Make your own free website on Tripod.com

BigCalm : AIX UNIX : AIX Disk Help
Search

AIX Disk Overview


You measure a Real Computer by weight and by current it draws. A Real Computer is measured in tons and amps. A Real Computer will weigh at least a ton and suck down enough juice to baroque a rhino. We're talking python cables, raised floors, haylon dumps, and explosive bolt firing power supplies. Real Computers are feared by mere mortals and even the experienced wizard approaches with respect.
Real Computers have disk drives the size of washing machines. When a Real Computer is plugged in the lights dim. Real Computers don't get turned off, just rebooted every few years. The docs for Real Computers come on palet jacks and have been known to kill whole forests.
-- Jeff Whyche (posting on alt.folklore.computers)

OVERVIEW OF DISKS


At the very basic level, all information is held on hard-disks within or attached to the UNIX box. As far as the user is concerned, they just have files, and do not care which disk the file ends up on. Also, we do not want to place a restriction on file size - if someone wishes to have a file 8GB big then this should be possible, even if we only have 2GB disks (say). This functionality is achieved by having physical disks (the actual disks within the drive), volume groups (groups of physical disks) and logical volumes (areas of a fixed size).
At the very bottom level, we have the physical disks themselves. To get a list of the disks in the current machine type 'lspv', which will produce a list like this:
$ lspv
hdisk00009388a0025f169 rootvg
hdisk1000b388d97a3987e imclvg
hdisk200200964953fbe0a extvg2
hdisk300200964953ede8c extvg1
hdisk400200964953ef112 extvg1
hdisk500200964953fd16d extvg2
hdisk600200964953fd934 extvg2
hdisk700200964953fe0f3 extvg2
hdisk800200964953fe8bd extvg2
hdisk900200964953ff081 extvg2

The first column shows the name of the disk, the second column the location and the third column will show which volume group the hard disk is in. To find out more about a particular disk, use the command 'lspv <disk name>' for example:
$ lspv hdisk0
PHYSICAL VOLUME hdisk0 VOLUME GROUP: rootvg
PV IDENTIFIER 0009388a0025f169 VG IDENTIFIER 0009388a0a93fd00
PV STATE active
STALE PARTITIONS 0 ALLOCATABLE: yes
PP SIZE 16 megabyte(s) LOGICAL VOLUMES: 8
TOTAL PPs 542 (8672 megabytes) VG DESCRIPTORS: 2
FREE PPs 439 (7024 megabytes)
USED PPs 103 (1648 megabytes)
FREE DISTRIBUTION 108..63..52..108..108
USED DISTRIBUTION 01..45..56..00..01

Descriptions of the fields:
PHYSICAL VOLUME <name of the disk> VOLUME GROUP: <VG the disk belongs to>
PV IDENTIFIER ? VG IDENTIFIER: ?
PV STATE <shows whether disk is in use>
STALE ? ALLOCATABLE: ?
PP SIZE Physical partition size (very similar to Cluster sizes on DOS)
LOGICAL VOLUMES <How many logical volumes are on each disk>
TOTAL PPs show size of the disk VG DESCRIPTORS: ?
FREE PPs show amount of disk space left
USED PPs show amount of disk space used
DISTRIBUTIONS: relate to the edge, middle, and centre of the disk. Every disk, because it is circular is divided very roughly into 3 rings. Consider the fact that the read-write head of the disk has, on average, less time to travel to the middle of the disk than to the edge or the centre. Therefore, the operating system will try and locate everything along the middle of the disk to ensure best possible speed. The distributions field shows what files are located where (and I apologise for the very poor diagram). On AIX distributions given in lspv, the disk is split into 5 rings and the usage of each is indicated in the 01...45...56...00....01 listing, starting from the edge and working in.
Disk Diagram
Finally, you may see exactly which 'logical volumes'/'file systems' are located on the physical disk by using 'lspv -l <disk name> e.g.
$ lspv -l hdisk0 hdisk0:
LVNAMELPsPPsDISTRIBUTIONMOUNT POINT
hd51101..00..00..00..00 N/A
hd6323200..32..00..00..00 N/A
hd2313100..13..17..00..01 /usr
hd81100..00..01..00..00 N/A
hd42200..00..02..00..00 /
hd9var101000..00..10..00..00 /var
hd3252500..00..25..00..00 /tmp
hd111 00..00..01..00..00 /home

The above shows that which logical volumes are located on hdisk0, and also their distributions with the disk, and how much space is allocated to each filesystem on this particular disk (seen by viewing # of PPs).


To view all the volume groups that exist, use the command:
$ lsvg
rootvg
extvg1
imclvg
extvg2

To view specific characteristics of a volume group, use the command
lsvg -l <volume group name> . e.g.
$ lsvg -l rootvg
rootvg:
LVNAMETYPELPsPPsPVsLV STATEMOUNT POINT
hd6paging32321open/syncd N/A
hd5boot111closed/syncdN/A
hd8jfslog111open/syncd N/A
hd4jfs221open/syncd /
hd2jfs31311open/syncd /usr
hd9varjfs1101open/syncd /var
hd3jfs25251open/syncd /tmp
hd1jfs111open/syncd /home
This list shows all the logical volumes within the volume group. LV NAME gives the name referred to by the operating system of the logical volume. TYPE can be paging (i.e. Swap space, used by UNIX as an overflow from memory), boot (contains the boot block, and is not accessible normally), jfs (stands for journalled file system, and is the place generally where files are kept) and jfslog (shrug. Don't know what this is). LPs - stands for Logical Partitions and is almost always the same as PPs unless the volume is mirrored on a seperate disk. e.g.
$ lsvg -l extvg1
extvg1:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv01 jfslog 1 2 2 open/syncd N/A
lv01 jfs 368 736 2 open/syncd /usr/live
$ This is a mirrored drive, so the number of PPs (Physical Partitions) is double the number of LPs (Logical Partitions). PVs stands for 'Physical Volumes' and is the number of disks within this particular volume group. LV STATE?. MOUNT POINT is the directory and sub-directories (though not all of them if they are a different logical volume) that the user sees and places files in.

So, if I create a file '/usr/live/x.txt', it goes into the logical volume lv01, and lv01 is in the volume group extvg1 which contains two disks, and as this file system is mirrored, it ends up on both disks (hdisk3 and hdisk4).

Finally to check the status of your logical volumes, just type the command 'df -k' to see the usage of logical volumes:
$ df -k
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 32768 20468 38% 1144 7% /
/dev/hd2 507904 105736 80% 29708 24% /usr
/dev/hd9var 163840 153436 7% 486 2% /var
/dev/hd3 409600 216836 48% 3140 4% /tmp
/dev/hd1 16384 7368 56% 2859 70% /home
/dev/c2000 2048000 640436 69% 9140 2% /usr/c2000
/dev/lv01 3014656 578564 81% 6123 1% /usr/live
/dev/data 1540096 823104 47% 876 1% /usr/live/data
/dev/arch01 1638400 251320 85% 787 1% /usr/arch01
/dev/arch02 1638400 996852 40% 785 1% /usr/arch02
/dev/arch03 1638400 103672 94% 791 1% /usr/arch03
/dev/arch04 1638400 374068 78% 820 1% /usr/arch04
/dev/arch05 1638400 334680 80% 832 1% /usr/arch05
/dev/arch06 1638400 315140 81% 828 1% /usr/arch06
/dev/arch07 1638400 164240 90% 850 1% /usr/arch07
/dev/arch08 1638400 371612 78% 852 1% /usr/arch08
/dev/arch09 1744896 240084 87% 873 1% /usr/arch09
/dev/arch10 1638400 145508 92% 809 1% /usr/arch10
/dev/arch11 1638400 108084 94% 784 1% /usr/arch11
/dev/arch12 1638400 229056 87% 812 1% /usr/arch12
/dev/usr2 1343488 256024 81% 6278 2% /usr2
/dev/t2000 2007040 557744 73% 7205 2% /usr2/t2000
/dev/arc 819200 211696 75% 1609 1% /usr2/arc
/dev/arch1996 73728 5132 94% 304 2% /usr/arch1996
/dev/arch1997 155648 56316 64% 368 1% /usr/arch1997
/dev/progs 368640 25784 94% 2311 3% /usr/live/progs
/dev/demo 2048000 788820 62% 3843 1% /usr/demo
/dev/clones 2949120 1678260 44% 4247 1% /usr/clones

The filesystem is the name of the logical volume, the total size is in the field '1024-blocks'. Most fields here are self explanatory.

Paging space can be looked at using 'lsps':
$ lsps -a
Page Space Physical Volume Volume Group Size %Used Active Auto Type
hd6 hdisk0 rootvg 512MB 32 yes yes lv

This shows all the paging spaces on the disks. Again, paging spaces are simply overflows from memory, and is also called (normally by windows users) swap space or virtual memory.

Please use SMIT to change anything to do with disks

When changing any volume groups it is imperative that you immediately create a system boot tape (mksysb). To create this, use smit mksysb -> Backup DEVICE or FILE = /dev/rmt0, Create MAP files: yes, EXCLUDE files?: no, Make BOOTABLE backup? yes, EXPAND /tmp if needed? yes

It is also wise to include a listing of the current volume groups, and their placings on various disks by using the above commands. If you do not make a boot tape after changing volume groups, it is unlikely that you will be able to recover the system if it crashes.

To increase the size of a volume group:
smit -> System Storage Manager (Physical & Logical Storage) -> Logical Volume Manager -> Logical Volumes -> Set Characteristics of a logical volume -> Change characteristics of a logical volume -> enter logical volume name -> Increase the value of 'MAXIMUM NUMBER OF LOGICAL PARTITIONS'
F3 -> Increase the size of a Logical Volume -> enter logical volume name -> Place a value in 'Number of ADDITIONAL logical partitions'




----------- End of DiskHelp Page ------------


Valid HTML 4.0!
This Page Was Last updated 28/09/01 Copyright Jonathan Daniel 2001