Académique Documents
Professionnel Documents
Culture Documents
1
Student Notebook
Uempty
References
SG24-7559 Online AIX Version 6.1 Differences Guide AIX 6.1 Operating System and device management
Note: References listed as Online above are available at the following address: http://publib.boulder.ibm.com/infocenter/pseries/v6r1/index.jsp
8-1
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Unit objectives
After completing this unit, you should be able to: Describe the terminology and concepts associated with:
Physical volumes Volume groups Logical volumes Physical partitions Logical partitions
AU1412.0
Notes:
8-2
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
AU1412.0
Notes: Components
The basic components or building blocks of AIX storage are: - Files - Directories - File systems - Logical storage - Physical storage - Logical Volume Manager (LVM) As a user, you work with files and directories. As a system administrator, you work with the others as well.
8-3
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
PROBLEMS: Fixed partitions Expanding size of the partition Limitation on size of a file system and a file Contiguous data requirement Time and effort required in planning ahead
Copyright IBM Corporation 2008
AU1412.0
8-4
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
AU1412.0
8-5
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
PP20
PP42
Physical volume
Copyright IBM Corporation 2008
AU1412.0
Notes: Introduction
The AIX Logical Volume Manager controls disk storage resources by mapping data between a simple and flexible logical view of storage space and the actual physical disks. This visual and these notes provide a brief overview of the basic components of LVM.
Components
A hierarchy of structures is used to manage disk storage: 8-6
Volume groups Physical volumes Physical partitions Logical volumes Logical partitions
Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
8-7
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Physical storage
Volume group A
PV1
Volume group B
PV2
PPn
Big volume groups Normal volume groups -t factor Disks (PVs) PPs per PV Disks (PVs) -t factor 1 32 1016 128 1 2 16 2032 64 2 4 8 4064 32 4 8 4 8128 16 8 16 2 16256 8 16 N/A N/A 32512 4 32 N/A N/A 65024 2 64
Copyright IBM Corporation 2008
AU1412.0
Notes: Introduction
Disk space on a physical volume (PV) is allocated to logical volumes (LVs) in chunks called physical partitions (PPs). Each physical partition size is the same across all the disks in a volume group (VG). The PP size is set at the time the VG is created. The size is set in megabytes on power of two boundaries (for example: 4 MB, 8 MB, 16 MB, and so forth). The default is 4 MB. In AIX 5L V5.2 and later, LVM defaults the PP size of a new VG to the smallest PP size (equal or greater than 4 MB) which allows full addressing of the largest disk in the VG given the selected maximum number of PPs per PV (defaults to 1016). The smallest PP size is 1 MB, which is supported by using a larger number of PPs per PV. When a PV is added to a system, a file called hdiskn is added to the /dev directory. n is a number allocated by the operating system. It is usually the next available number. This file may be used to access the device directly but this is not often done.
8-8
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
8-9
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Volume groups
Volume group types: Normal Big Scalable Limits
Volume Group Type Max PVs 32 128 1024 Max LVs 256 512 4096 Max PPs per VG 32512 (1016 * 32) 130048 (1016 * 128) 2097152 Max PP Size 1 GB 1 GB 128 GB
rootvg
PV1
datavg
PV2
PV3
PV4
AU1412.0
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
- Scalable volume groups Scalable volume groups were introduced with AIX 5L V5.3. A scalable VG can accommodate a maximum of 1024 PVs and raises the limit for the number of LVs to 4096. The -t factor does not apply to the scalable VG type. The maximum number of PPs is no longer defined on a per disk basis but applies to the entire VG. This opens up the prospect to configure VGs with a relatively small number of disks but fine grained storage allocation options through a large number of PPs which are small in size. The scalable VG can hold up to 2097152 (2048 KB) PPs. Optimally, the size of a physical partition can also be configured for a scalable VG. A scalable volume group is be created using the line command mkvg -S.
8-11
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
VGDA VGDA
VGDA VGDA
VGDA
VGDA
AU1412.0
Quorum
There must be a quorum of VGDAs available to activate the volume group and make it available for use (with the varyonvg command). A quorum of VGDA copies is needed to ensure the data integrity of management data that describes the logical and physical volumes in the volume group. A quorum is equal to 51% or more of the VGDAs available.
8-12 AIX System Administration I Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
A system administrator can force a volume group to varyon without a quorum. This is not recommended and should only be done in an emergency.
8-13
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Logical storage
Physical volumes
1 7 13 19 25 31 35 41 47 2 8 14 20 26 32 36 42 48 3 9 15 21 27 33 37 43 49 4 10 16 22 28 34 38 44 50 1 7 13 19 25 31 35 41 47 2 8 14 20 26 32 36 42 48 3 9 15 21 27 33 37 43 49 4 10 16 22 28 34 38 44 50
Logical Partitions
Logical volume
Figure 8-9. Logical storage
Logical volume
Copyright IBM Corporation 2008
AU1412.0
Logical volume
A logical volume consists of one or more logical partitions within a volume group. Logical volumes may span physical volumes if the volume group consists of more than one physical volume. Logical volumes do not need to be contiguous within a physical volume because the logical partitions within the logical volume are maintained to be contiguous. The view the system sees is the logical one. Thus, the physical partitions they point to can reside anywhere on the physical volumes in the volume group.
8-14 AIX System Administration I Copyright IBM Corp. 1997, 2008
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
Logical volumes may be increased in size at any time, assuming that there are sufficient free physical partitions within the volume group. This can be done dynamically through SMIT even when users are doing work in that logical volume. However, logical volumes cannot easily be decreased and require a file system backup and restore to a re-created smaller logical volume. The mapping of which logical partition corresponds to which physical partition is maintained in the VGDA for the volume group. It is both a physical view and a logical view.
LVM mapping
The Logical Volume Manager (LVM) consists of the logical volume device driver (LVDD) and the LVM subroutine interface library. The LVM controls disk resources by mapping data between a more simple and flexible logical view of storage space and the actual physical disks. The LVM does this using a layer of device driver code that runs above traditional disk device drivers.
8-15
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
AU1412.0
Notes: Introduction
When you install the system, you automatically create one volume group (rootvg) which consists of a base set of logical volumes required to start the system. rootvg contains such things as paging space, the journal log, and boot data, each usually in its own separate logical volume. You can create additional logical volumes with the mklv command or go through the SMIT menus. This command allows you to specify the name of the logical volume and to define its characteristics.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
Journal log
The journal log is the logical volume where changes made to the file system structure are written until such time as the structures are updated on disk. Journaled file systems and enhanced journaled file systems is discussed in greater detail later in the course.
Paging space
Paging space is fixed disk storage for information that is resident in virtual memory but is not currently being maintained in real memory.
Dump device
When you install the operating system, the dump device is automatically configured for you. By default, the primary device is /dev/hd6, which is the paging logical volume, and the secondary device is /dev/sysdumpnull. For systems migrated from versions of AIX earlier than V4.1, the primary dump device is what it formerly was, /dev/hd7.
8-17
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Different file systems are connected together via directories to form the view of files users see
AU1412.0
Notes: Introduction
A file system is a directory hierarchy for storing files. It has a root directory and subdirectories. In an AIX system, the various file systems are joined together so that they appear as a single file tree with one root. Many file systems of each type can be created. Because the available storage is divided into multiple file systems, data in one file system could be on a different area of the disk than data of another file system. Because file systems are of a fixed size, file system full errors can occur when that file system has become full. Free space in one file system cannot automatically be used by an alternate file system that resides on the same physical volume.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
8-19
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
AU1412.0
Notes: Benefits
A file system is a structure that allows you to organize your data. It is one level in the hierarchy of you data. By placing data in separate file systems, it allows for ease of control and management of the data. File systems can be placed on the disk in areas that provide the best performance. Many times, backups and recoveries are done at a file system level.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
8-21
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
home
sbin
opt
lpp
proc
usr
mnt
etc tmp
hd1
hd10opt
hd2
hd9var
hd3
/
csm freeware bin
/
lib sbin
/
spool adm tmp
AU1412.0
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
- /var = /dev/hd9var Variable spool and log files. The files in this file system vary considerably depending on system activity. - /home = /dev/hd1 Users' home directories (was /u in earlier versions of AIX). This is traditionally where user data files are stored. - /tmp = /dev/hd3 Space accessible to all users for temporary files and work space. Should be cleared out frequently. - /opt = /hd10opt Special file system to store freeware files. - /proc = /proc Special pseudo file system kept in memory to support threads, or light weight processes. This file system is not designed to store user files. It is a type of file system which is different from a journal file system. - /admin = /hd11admin There are two empty directories: lost_found and tmp. The permissions on this /admin/tmp directory is 755 and is owned by root. This tmp directory has more security for applications to use.
8-23
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Lets review
1. V______ G______ D ______ A______
VGDA
5. V______ G______
6. P______ V______
2. P______ P ______
3. L_____ P______
4. L______ V_______
Copyright IBM Corporation 2008
AU1412.0
Notes: Instructions
Label the items shown in the picture above.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
/etc/filesystems
/:
dev vol mount check vfs log type = = = = = = = = = = = = = = = = = = = /dev/hd4 root automatic false jfs2 /dev/hd8 bootfs /dev/hd1 /home true true jfs2 /dev/hd8 /dev/fslv00 jfs2 /dev/loglv00 true rw false
Copyright IBM Corporation 2008
/home:
dev vol mount check vfs log dev vfs log mount options account
Figure 8-15. /etc/filesystems
/home/team01:
AU1412.0
8-25
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
vol mount
Used by the mkfs command when initiating the label on a new file system. Used by the mount command to determine whether a file system should be mounted by default. Possible values are: automatic true File system mounted automatically at system startup. File system mounted by the mount all command. This command is issued during system initialization to automatically mount such file systems. File system is not automatically mounted.
Used by the fsck command to determine the default file systems to be checked. True enables checking. Specifies the type of mount. For example, vfs=jfs2. The device to which log data is written, as the file system is modified. (This option is only valid for journaled file systems). Used to group together related file systems which can all be mounted with the mount -t command. Used to determine the file systems to be processed by the accounting system. A component of traditional UNIX systems. Its is totally ignored by all AIX commands. Allows system administrator to control the number of files and data blocks that can be allocated to a user or group.
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
Mount
mount is the glue that logically connects file systems to the directory hierarchy File systems are associated with devices represented by special files in /dev (the logical volume) When a file system is mounted, the logical volume and its contents are connected to a directory in the hierarchical tree structure
# mount /dev/lv00 /home/patsie
What to mount
Figure 8-16. Mount
Where to mount it
Copyright IBM Corporation 2008
AU1412.0
Mount points
Full path names must be used when specifying the mount point. If SMIT is used to create the file system, the mount point is created automatically.
8-27
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
After...
home
liz
john
patsie
liz
john
patsie
data
doc
data
doc
AU1412.0
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
After...
home
liz
john
patsie
liz
john
patsie
reports
pgms
.profile .exrc
data
doc
AU1412.0
8-29
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Mount Pt / /home /usr /var /tmp /infocd /home/john /proc /opt /admin
VFS jfs2 jfs2 jfs2 jfs2 jfs2 cdrfs jfs2 procfs jfs2 jfs2
Size Options 294912 -32768 -3309568 -65536 -131072 --ro 32768 rw --65536 -262144 --
Auto Accounting yes no yes no yes no yes no yes no yes no yes no yes no yes no yes no
AU1412.0
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
# lsvg -l rootvg LVNAME TYPE hd6 paging hd5 boot hd8 jfslog hd4 jfs2 hd2 jfs2 hd9var jfs2 hd3 jfs2 hd1 jfs2 hd10opt jfs2 hd11adminjfs2
LPs 32 2 1 9 101 2 4 1 5 8
PPs 32 2 1 9 101 2 4 1 5 8
PVs 1 1 1 1 1 1 1 1 1 1
LV STATE open/syncd closed/syncd open/syncd open/syncd open/syncd open/syncd open/syncd open/syncd open/syncd open/syncd
MOUNT POINT N/A N/A N/A / /usr /var /tmp /home /opt /admin
AU1412.0
8-31
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Checkpoint (1 of 3)
1. How many different physical partition (PP) sizes can be set within a single VG? ____________ 2. By default, how big are PPs?
____________________________________________ ____________________________________________
3. How many volume groups (VGs) can a physical volume (PV) belong to? a) Depends on what you specify through SMIT b) Only one c) As many VGs as exist on the system 4. True or False? All VGDA information on your system is identical, regardless of how many volume groups (VGs) exist.
Copyright IBM Corporation 2008
AU1412.0
Notes:
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
Checkpoint (2 of 3)
Use the following output to answer the questions below:
# lsfs Name Nodename Mount Pt /dev/hd4 -/ /dev/hd1 -/home /dev/hd2 -/usr /dev/hd9var -/var /dev/hd3 -/tmp /dev/hd10opt -/opt /dev/cd0 -/infocd /dev/lv00 -/home/john /dev/hd11admin-/admin VFS jfs2 jfs2 jfs2 jfs2 jfs2 jfs2 cdrfs jfs2 jfs2 Size Options 294912 -32768 -3309568 -65536 -131072 -163840 -ro 32768 rw 262144 -Auto yes yes yes yes yes yes yes yes yes Accounting no no no no no no no no no
5. 6. 7. 8. 9.
With which logical volume is the /home file system associated? __________ What type of file systems are being displayed? ________________________
_______________________________________________________________
What is the mount point for the file system located on the /dev/lv00 logical volume? ________________________ Which are the system supplied logical volumes and their associated file systems? ______________________________________________________
_______________________________________________________________
Which file system is used primarily to hold user data and home directories?
____________________
Copyright IBM Corporation 2008
AU1412.0
Notes:
8-33
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Checkpoint (3 of 3)
Use the following output to answer the question below:
# lsvg -l rootvg LVNAME hd6 hd5 hd8 hd9var hd3 lv00 TYPE paging boot jfslog jfs2 jfs2 jfs2 LPs 8 1 1 1 2 1 PPs 8 1 1 1 2 1 PVs 1 1 1 1 1 1 LV State open/syncd closed/syncd open/syncd open/syncd open/syncd closed/syncd MOUNT POINT N/A N/A N/A /var /tmp /home/john
10. Which of the logical volumes above are examples of logical volumes with journaled file systems on them?
_____________________________________________
AU1412.0
Notes:
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V4.1
Student Notebook
Uempty
Display information about your file systems List the LVM information on your system
AU1412.0.
Notes: Introduction
This exercise can be found in your Student Exercise Guide.
8-35
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Student Notebook
Unit summary
The LVM is organized as follows:
A volume group consists of one or more physical volumes Each physical volume is divided into physical partitions A logical volume is made up of logical partitions Logical partitions are mapped to physical partitions JFS or JFS2 file systems Journal log Paging space Dump space Boot logical volume Raw space
The most common use of logical volumes is to contain JFS or JFS2 file systems
Copyright IBM Corporation 2008
AU1412.0
Notes:
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.