an121g07

Upload: dharmareddyr

Post on 04-Jun-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 AN121g07

    1/28

    Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 5.2 Copyright IBM Corporation 2009

    Unit 7

    System storage overview

  • 8/13/2019 AN121g07

    2/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    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

    Describe how file systems and logical volumes are related

  • 8/13/2019 AN121g07

    3/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Components of AIX storage

    Managed by

    Logical Volume Manager (LVM)

    Physical storage

    Logical storage

    File systems

    Directories

    Files

  • 8/13/2019 AN121g07

    4/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Traditional UNIX disk storage

    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

    Partition 1

    Partition 2

    Partition 3

    Partition 5

    Partition 4

  • 8/13/2019 AN121g07

    5/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Benefits of the LVM

    Solves noncontiguous space problems

    Data can span disks

    Sizes can be dynamically increased

    Data can be mirrored for availability

    New disks are easily added to the system

    Data can be relocated

    LVM (data) statistics can be collected

    These tasks can be performed dynamically!

  • 8/13/2019 AN121g07

    6/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Logical Volume Manager components

    Logical

    volume (LVs)

    write(data);

    Application

    Logical

    partitions (LPs)

    Physical

    partitions (PPs)

    Volume group

    Physical

    volumes (PVs)

    12

    3456xyz

  • 8/13/2019 AN121g07

    7/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Physical storage

    Volumegroup A

    Volume

    group B

    PV1

    PV2 PV3 PV4 PV5

    Physical

    volume

    /dev/hdiskn

    PPn

    PP3PP4PP5PP6

    PP1PP2

    -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

    Original volume groups Big volume groups

  • 8/13/2019 AN121g07

    8/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Volume groups

    AIX contains one mandatory Volumes Group: rootvg rootvg is created on system install

    Contains the AIX Operating System

    Why create new volume groups? Separate user data from operating system files.

    Disaster recovery

    Data portability

    Data integrity and security

    Volume GroupType MaxPVs Max LVs Max PPs perVG Max PPSize

    Original 32 256 32512

    (1016 * 32)

    1 GB

    Big 128 512 130048

    (1016 * 128)

    1 GB

    Scalable 1024 4096 2097152 128 GB

    rootvg datavgPV1 PV2 PV3

    Volume group types: Original Big

    Scalable

    Limits

  • 8/13/2019 AN121g07

    9/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Volume group descriptor area

    VGDA VGDA

    VGDA VGDA

    VGDAVGDAVGDA

    VGDAVGDA

    One-disk VG

    Two-disk VG Three-disk or more

    VG

  • 8/13/2019 AN121g07

    10/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Physical volumes1713192531354147

    28

    14202632364248

    3 49 10

    15 1621 2227

    2833 3437 3843 4449 50

    Logical Volume Manager

    1713192531354147

    28

    14202632364248

    3 49 10

    15 1621 2227

    2833 3437 3843 4449 50

    Logical storage

    1 2 3 4 1 2 3 4

    Logicalvolume

    Logical

    partitionsLogicalvolume

  • 8/13/2019 AN121g07

    11/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Uses of logical volumes

    A logical volume may contain one of the following:

    Journaled (JFS) or enhanced journaled file system (JFS2)

    Journal log (/dev/hd8)

    Paging space (/dev/hd6)

    Boot logical volume (/dev/hd5)

    Dump device

    Nothing (raw logical volume)

    Examples of JFS/JFS2 logical volumes:

    /dev/hd1 /home

    /dev/hd2 /usr/dev/hd3 /tmp

    /dev/hd4 /

    /dev/hd9var /var

    /dev/hd10opt /opt

    /dev/hd11admin /admin/dev/lv00 /myfilesystem

  • 8/13/2019 AN121g07

    12/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    What is a file system?

    A file system is:

    Method of storing data

    Hierarchy of directories

    Seven types supported:

    Journaled File System (JFS)

    Enhanced Journaled File System (JFS2)

    CD-ROM File System (CDRFS)

    DVD-ROM File System (UDFS)

    Network File System (NFS)

    Common Internet Filesystem (CIFS) Proc File System (PROCFS)

    Different file systems are connected together throughdirectories to form the view of files that users see.

  • 8/13/2019 AN121g07

    13/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Why have multiple file systems?

    Can strategically place it on disk for improved performance

    Some tasks are performed more efficiently on a file systemthan on each directory within the file system, for example, backup, move, secure an entire file system.

    Can limit disk usage of users by file system through quotas Maintain integrity of the entire file system structure, for

    example, if one file system is corrupted, the others are notaffected

    Special security situations

    Organize data and programs into groups for ease of filemanagement and better performance

  • 8/13/2019 AN121g07

    14/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Standard file systems in AIX

    home sbin opt lpp proc usr dev tftpboot var mnt etc tmp

    / (root)

    hd4

    hd1 hd9var hd3/ / /

    hd2/libbin sbin spool adm tmp

    /hd10opt

    csm freeware

    Note:The drawing depicts logical, not physical volumes.

  • 8/13/2019 AN121g07

    15/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    /etc/filesystems

    /:dev = /dev/hd4vol = rootmount = automaticcheck = falsevfs = jfs2log = /dev/hd8type = bootfs

    /home:dev = /dev/hd1vol = /homemount = truecheck = truevfs = jfs2

    log = /dev/hd8/home/team01:dev = /dev/fslv00vfs = jfs2log = /dev/loglv00mount = true

    options = rwaccount = false

  • 8/13/2019 AN121g07

    16/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Mount

    mountis 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 treestructure.

    What to

    mount

    Where to

    mount it

    # mount /dev/fslv00 /home/patsie

  • 8/13/2019 AN121g07

    17/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Mounting over an empty directory

    Before

    patsieliz john

    docdata.profile.exrcmyscript

    After

    liz john

    docdata.profile.exrcmyscript

    home home

    /

    patsie

  • 8/13/2019 AN121g07

    18/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Mounting over files

    Before After

    liz

    john

    liz

    john

    docdata.profile.exrcmyscript

    docdata.profile.exrcmyscript

    .profile

    .exrcreports pgms

    home home

    /

    patsiepatsie

  • 8/13/2019 AN121g07

    19/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Listing file systems

    # lsfsName Nodename Mount Pt VFS Size Options Auto Accounting

    /dev/hd4 -- / jfs2 1966080 -- yes no

    /dev/hd1 -- /home jfs2 131072 -- yes no

    /dev/hd2 -- /usr jfs2 4587520 -- yes no

    /dev/hd9var -- /var jfs2 655360 -- yes no

    /dev/hd3 -- /tmp jfs2 393216 -- yes no

    /proc -- /proc procfs -- -- yes no

    /dev/hd10opt -- /opt jfs2 524288 -- yes no/dev/hd11admin -- /admin jfs2 262144 -- yes no

    /dev/fslv00 -- /db2 jfs2 262144 rw no no

  • 8/13/2019 AN121g07

    20/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Listing logical volume information

    List all logical volumes for a volume group

    # lsvg -l rootvg

    rootvg:

    LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT

    hd5 boot 1 2 2 closed/syncd N/A

    hd6 paging 8 16 2 open/syncd N/Ahd8 jfs2log 1 2 2 open/syncd N/A

    hd4 jfs2 15 30 2 open/syncd /

    hd2 jfs2 35 70 2 open/syncd /usr

    hd9var jfs2 5 10 2 open/syncd /var

    hd3 jfs2 3 6 2 open/syncd /tmp

    hd1 jfs2 1 2 2 open/syncd /home

    loglv00 jfs2log 1 2 2 closed/syncd N/A

    hd11admin jfs 2 4 2 open/syncd /adminfslv00 jfs2 2 4 2 closed/syncd /db2

  • 8/13/2019 AN121g07

    21/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Checkpoint (1 of 3)

    VGDA

    1. V______ G______

    D ______ A______

    2. P______ P ______

    3. L_____ P______

    4. L______ V_______

    6. P______ V______

    5. V______ G______

  • 8/13/2019 AN121g07

    22/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Checkpoint solutions (1 of 3)

    VGDA

    1. Volume Group___

    Descriptor Area__

    2. Physical Partition

    3. Logical Partition

    4. Logical Volume

    6. Physical Volume

    5. Volume Group

  • 8/13/2019 AN121g07

    23/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Checkpoint (2 of 3)

    7. How many different physical partition (PP) sizes can be set within

    a single VG? ____________

    8. By default, how big are PPs?____________________________________________

    ____________________________________________

    9. 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

    10. True or False: All VGDA information on your system is identical,regardless of how many volume groups (VGs) exist.

  • 8/13/2019 AN121g07

    24/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Checkpoint solutions (2 of 3)

    7. How many different physical partition (PP) sizes can be set within

    a single VG? One

    8. By default, how big are PPs? Traditionally 4 MB, but LVMchooses an optimal size based on the #PPs/PV and the sizeof largest PV in the VG.

    9. 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

    10. True or False: All VGDA information on your system is identical,regardless of how many volume groups (VGs) exist. All VGDAswithin a VG are the same.

  • 8/13/2019 AN121g07

    25/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Checkpoint (3 of 3)

    Use the following output to answer the questions below:

    11. With which logical volume is the /home file system associated?_____________________________________________________

    12. What type of file systems are being displayed?_____________________________________________________

    13. What is the mount point for the file system located on the /dev/hd4 logicalvolume? _____________________________________________

    14. Which file system is used primarily to hold user data and home directories?_____________________________________________________

    # lsfsName Nodename Mount Pt VFS Size Options Auto Accounting

    /dev/hd4 -- / jfs2 294912 -- yes no

    /dev/hd1 -- /home jfs2 32768 -- yes no

    /dev/hd2 -- /usr jfs2 3309568 -- yes no

    /dev/hd9var -- /var jfs2 65536 -- yes no

    /dev/hd3 -- /tmp jfs2 131072 -- yes no

    /dev/hd10opt -- /opt jfs2 163840 -- yes no

    /dev/cd0 -- /infocd cdrfs ro yes no

    /dev/lv00 -- /home/john jfs2 32768 rw yes no

    /dev/hd11admin -- /admin jfs2 262144 -- yes no

  • 8/13/2019 AN121g07

    26/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Checkpoint solutions (3 of 3)

    Use the following output to answer the questions below:

    11. With which logical volume is the /home file system associated?/dev/hd1

    12. What type of file systems are being displayed?Enhanced journaled file systems (JFS2), and CD-ROM (CDRFS)

    13. What is the mount point for the file system located on the /dev/hd4 logicalvolume?

    /

    14. Which file system is used primarily to hold user data and home directories?

    /home

    # lsfsName Nodename Mount Pt VFS Size Options Auto Accounting

    /dev/hd4 -- / jfs2 294912 -- yes no

    /dev/hd1 -- /home jfs2 32768 -- yes no

    /dev/hd2 -- /usr jfs2 3309568 -- yes no

    /dev/hd9var -- /var jfs2 65536 -- yes no

    /dev/hd3 -- /tmp jfs2 131072 -- yes no

    /dev/hd10opt -- /opt jfs2 163840 -- yes no

    /dev/cd0 -- /infocd cdrfs ro yes no

    /dev/lv00 -- /home/john jfs2 32768 rw yes no

    /dev/hd11admin-- /admin jfs2 262144 -- yes no

  • 8/13/2019 AN121g07

    27/28

    IBM Power Systems

    Copyright IBM Corporation 2009

    Exercise 7

    System

    storage

  • 8/13/2019 AN121g07

    28/28

    IBM Power Systems

    Unit summary

    Having completed this unit, you should be able to:

    Describe the terminology and concepts associated with:

    Physical volumes

    Volume groups

    Logical volumes

    Physical partitions

    Logical partitions

    Describe how file systems and logical volumes are

    related