*SMIT logical volume menu

# smitty lv

                                Logical Volumes

 

Move cursor to desired item and press Enter.

 

  List All Logical Volumes by Volume Group

  Add a Logical Volume

  Set Characteristic of a Logical Volume

  Show Characteristics of a Logical Volume

  Remove a Logical Volume

  Copy a Logical Volume

 

*Adding a logical volume

# mklv -y datalv -t jfs2 -c 2 \ datavg 10 hdisk2 hdisk3       (or)

#smitty mklv

                              Add a Logical Volume

 

Type or select a value for the entry field.

Press Enter AFTER making all desired changes.  [Entry Fields]

* VOLUME GROUP name                                  [datavg]                +

 Add a Logical Volume

 

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

 

[TOP]                                                   [Entry Fields]

  Logical volume NAME                                [datalv]

* VOLUME GROUP name                                   datavg

* Number of LOGICAL PARTITIONS                       [100]                    #

  PHYSICAL VOLUME names                              [hdisk2 hdisk3]         +

  Logical volume TYPE                                [jfs2]                  +

  POSITION on physical volume                         middle                 +

  RANGE of physical volumes                           minimum                +

  MAXIMUM NUMBER of PHYSICAL VOLUMES                 []                       #

    to use for allocation

  Number of COPIES of each logical                    2                      +

    partition

  Mirror Write Consistency?                           active                 +

  Allocate each logical partition copy                yes                    +

    on a SEPARATE physical volume?

  RELOCATE the logical volume during                  yes                    +

    reorganization?

  Logical volume LABEL                               []

  MAXIMUM NUMBER of LOGICAL PARTITIONS               [512]                    #

  Enable BAD BLOCK relocation?                        yes                    +

  SCHEDULING POLICY for writing/reading               parallel               +

    logical partition copies

  Enable WRITE VERIFY?                                no                     +

  File containing ALLOCATION MAP                     []

  Stripe Size?                                       [Not Striped]           +

  Serialize IO?                                       no                     +

  Mirror Pool for First Copy                                                 +

  Mirror Pool for Second Copy                                                +

  Mirror Pool for Third Copy                                                 +

[BOTTOM]

 

*Show LV characteristics

# lslv fslv01

LOGICAL VOLUME:     fslv01                 VOLUME GROUP:   datavg

LV IDENTIFIER:      00c8c36600004c00000001318491699f.3 PERMISSION:     read/write

VG STATE:           active/complete        LV STATE:       closed/syncd

TYPE:               jfs2                   WRITE VERIFY:   off

MAX LPs:            1200                   PP SIZE:        256 megabyte(s)

COPIES:             1                      SCHED POLICY:   parallel

LPs:                1200                   PPs:            1200

STALE PPs:          0                      BB POLICY:      relocatable

INTER-POLICY:       minimum                RELOCATABLE:    yes

INTRA-POLICY:       middle                 UPPER BOUND:    32

MOUNT POINT:        /pdmdata               LABEL:          /pdmdata

MIRROR WRITE CONSISTENCY: on/ACTIVE

EACH LP COPY ON A SEPARATE PV ?: yes

Serialize IO ?:     NO

# lslv -l fslv01

fslv01:/pdmdata

PV                COPIES        IN BAND       DISTRIBUTION

hdisk4            799:000:000   20%           160:160:159:160:160

hdisk5            401:000:000   39%           082:160:159:000:000

# lslv -m fslv01 |more

fslv01:/pdmdata

LP    PP1  PV1               PP2  PV2               PP3  PV3

0001  0161 hdisk4

0002  0162 hdisk4

0003  0163 hdisk4

0004  0164 hdisk4

0005  0165 hdisk4

0006  0166 hdisk4

0007  0167 hdisk4

0008  0168 hdisk4

0009  0169 hdisk4

Standard input

*Add copies to a logical volume

# mklvcopy -k datalv 3 hdisk4   (or)

# smitty mklvcopy

                         Add Copies to a Logical Volume

 

Type or select values in entry fields.

Press Enter AFTER making all desired changes.   [Entry Fields]

* LOGICAL VOLUME name                                 datelv01

* NEW TOTAL number of logical partition               3                      +

    copies

  PHYSICAL VOLUME names                              [hdisk4]                +

  POSITION on physical volume                         middle                 +

  RANGE of physical volumes                           minimum                +

  MAXIMUM NUMBER of PHYSICAL VOLUMES                 [1]                      #

    to use for allocation

  Allocate each logical partition copy                yes                    +

    on a SEPARATE physical volume?

  File containing ALLOCATION MAP                     []

  SYNCHRONIZE the data in the new                     no                     +

    logical partition copies?

  Mirror Pool for First Copy                         []                      +

  Mirror Pool for Second Copy                        []                      +

  Mirror Pool for Third Copy                         []                      +

 

*Increasing the size of a logical volume

# extendlv datalv 20        (or)

# smitty extendlv

                     Increase the Size of a Logical Volume

 

Type or select values in entry fields.

Press Enter AFTER making all desired changes.  [Entry Fields]

* LOGICAL VOLUME name                                 datelv01

* Number of ADDITIONAL logical partitions            [20]                     #

  PHYSICAL VOLUME names                              []                      +

  POSITION on physical volume                         middle                 +

  RANGE of physical volumes                           minimum                +

  MAXIMUM NUMBER of PHYSICAL VOLUMES                 [1]                      #

    to use for allocation

  Allocate each logical partition copy                yes                    +

    on a SEPARATE physical volume?

  File containing ALLOCATION MAP                     []

 

*Remove a logical volume

# rmlv -f datalv01       (or)

# smitty rmlv

                            Remove a Logical Volume

 

Type or select values in entry fields.

Press Enter AFTER making all desired changes.   [Entry Fields]

  LOGICAL VOLUME name                                [datalv01]              +

 

*List all logical volumes by volume group

# lsvg -o | lsvg -i -l

datavg:

LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT

datelv01            jfs2       600     600     1    closed/syncd  N/A

loglv00             jfs2log    1       1       1    closed/syncd  N/A

fslv01              jfs2       1200    1200    2    closed/syncd  /pdmdata

rootvg:

LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT

hd5                 boot       1       2       2    closed/syncd  N/A

hd6                 paging     44      88      2    open/syncd    N/A

hd8                 jfs2log    1       2       2    open/syncd    N/A

hd4                 jfs2       148     296     2    open/syncd    /

hd2                 jfs2       20      40      2    open/syncd    /usr

hd9var              jfs2       20      40      2    open/syncd    /var

hd3                 jfs2       20      40      2    open/syncd    /tmp

hd1                 jfs2       79      158     2    open/syncd    /home

hd10opt             jfs2       20      40      2    open/syncd    /opt

hd11admin           jfs2       1       2       2    open/syncd    /admin

fwdump              jfs2       2       4       2    open/syncd    /var/adm/ras/platform

lg_dumplv           sysdump    4       4       1    open/syncd    N/A

livedump            jfs2       1       2       2    open/syncd    /var/adm/ras/livedump

fslv00              jfs2       200     200     1    open/syncd    /ptc

fslv02              jfs2       120     120     1    open/syncd    /oracle

fslv03              jfs2       20      20      1    open/syncd    /ftp 

*Mirroring volume groups

!Mirroring rootvg is very important.

# mirrorvg rootvg hdisk1   (or)

# smitty mirrorvg

                             Mirror a Volume Group

 Type or select values in entry fields.

Press Enter AFTER making all desired changes.    [Entry Fields]

* VOLUME GROUP name                                   rootvg

  Mirror sync mode                                   [Foreground]            +

  PHYSICAL VOLUME names                              [hdisk1]                +

  Number of COPIES of each logical                    2                      +

    partition

  Keep Quorum Checking On?                            no                     +

  Create Exact LV Mapping?                            no                     +

Additional steps required for rootvg

# bosboot -a -d /dev/hdisk1

# bootlist -m normal hdisk0 hdisk1

# shutdown -Fr (not required with AIX6 and later)

 *SMIT physical volumes menu

# smitty pv

                                Physical Volumes

 Move cursor to desired item and press Enter.

   List All Physical Volumes in System

  Add a Disk

  Change Characteristics of a Physical Volume

  List Contents of a Physical Volume

  Move Contents of a Physical Volume

 *List physical volume information

# lspv        //List all physical volume information

hdisk0          00c8c36668f5f9f9                    rootvg          active

hdisk1          00c8c3666dbe2331                    rootvg          active

hdisk2          00c8c36684916305                    datavg          active

hdisk3          00c8c366849163bd                    datavg          active

hdisk4          00c8c36684916478                    datavg          active

hdisk5          00c8c36684916530                    datavg          active

hdisk6          00c8c366849165e4                    datavg          active

hdisk7          00c8c3668491669b                    datavg          active

hdisk8          00c8c36684916747                    datavg          active

hdisk9          00c8c366849167f6                    datavg          active

hdisk10         00c8c366849168a6                    datavg          active

hdisk11         00c8c36684916955                    datavg          active

# lspv hdisk3           //List the attributes of a PV

PHYSICAL VOLUME:    hdisk3                   VOLUME GROUP:     datavg

PV IDENTIFIER:      00c8c366849163bd VG IDENTIFIER     00c8c36600004c00000001318491699f

PV STATE:           active

STALE PARTITIONS:   0                        ALLOCATABLE:      yes

PP SIZE:            256 megabyte(s)          LOGICAL VOLUMES:  1

TOTAL PPs:          799 (204544 megabytes)   VG DESCRIPTORS:   1

FREE PPs:           798 (204288 megabytes)   HOT SPARE:        no

USED PPs:           1 (256 megabytes)        MAX REQUEST:      256 kilobytes

FREE DISTRIBUTION:  160..159..159..160..160

USED DISTRIBUTION:  00..01..00..00..00

MIRROR POOL:        None

# lspv -l hdisk0          //List logical volumes on a physical volume

hdisk0:

LV NAME               LPs     PPs     DISTRIBUTION          MOUNT POINT

hd1                   79      79      00..21..19..39..00    /home

hd10opt               20      20      00..00..20..00..00    /opt

hd9var                20      20      00..00..20..00..00    /var

hd3                   20      20      00..00..20..00..00    /tmp

livedump              1       1       00..01..00..00..00    /var/adm/ras/livedump

lg_dumplv             4       4       00..04..00..00..00    N/A

hd5                   1       1       01..00..00..00..00    N/A

fslv02                120     120     88..32..00..00..00    /oracle

hd4                   148     148     11..00..20..72..45    /

hd2                   20      20      00..00..10..00..10    /usr

fslv03                20      20      00..20..00..00..00    /ftp

hd6                   44      44      12..32..00..00..00    N/A

hd8                   1       1       00..00..01..00..00    N/A

fwdump                2       2       00..02..00..00..00    /var/adm/ras/platform

hd11admin             1       1       00..00..01..00..00    /admin

# lspv -p hdisk0            //List a physical volume partition map

hdisk0:

PP RANGE  STATE   REGION        LV NAME             TYPE       MOUNT POINT

  1-1     used    outer edge    hd5                 boot       N/A

  2-12    used    outer edge    hd4                 jfs2       /

 13-100   used    outer edge    fslv02              jfs2       /oracle

101-112   used    outer edge    hd6                 paging     N/A

113-113   used    outer middle  hd6                 paging     N/A

114-115   used    outer middle  fwdump              jfs2       /var/adm/ras/platform

116-119   used    outer middle  lg_dumplv           sysdump    N/A

120-120   used    outer middle  livedump            jfs2       /var/adm/ras/livedump

121-152   used    outer middle  fslv02              jfs2       /oracle

153-172   used    outer middle  fslv03              jfs2       /ftp

173-203   used    outer middle  hd6                 paging     N/A

204-224   used    outer middle  hd1                 jfs2       /home

225-225   used    center        hd8                 jfs2log    N/A

226-226   used    center        hd4                 jfs2       /

227-227   used    center        hd2                 jfs2       /usr

228-228   used    center        hd9var              jfs2       /var

229-229   used    center        hd3                 jfs2       /tmp

230-230   used    center        hd1                 jfs2       /home

231-231   used    center        hd10opt             jfs2       /opt

232-232   used    center        hd11admin           jfs2       /admin

233-233   used    center        hd4                 jfs2       /

234-237   used    center        hd2                 jfs2       /usr

*Add or move contents of physical volumes

- Today , virtually all disks are configured to AIX through configuration manager (cfgmgr).

- Move the contents of a physical volume:

        migratepv [ -l lvname] sourcePV targetPV ..

# migratepv -l lv02 hdisk0 hdisk6

*Documenting the disk storage setup

  - List the volume groups:

     # lsvg

  - List the disks on the system (PVID and volume group):

     # lspv

  - List which logical volumes are contained in each volume group:

     # lsvg -l vgname

  - List the logical volumes on each disk:

     # lspv -l pvname