aix擴充套件檔案系統

lsl031發表於2011-08-17

在香港報表庫上想增加檔案系統大小:但是提示超出了lp數目的限制。
檢視lv中lp的描述:

先檢視
datavg2包含的lv

# lsvg -l datavg2
datavg2:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT
。。。。tdblv         jfs2       2430  2430  3    open/syncd    /oracle/app/。。。。。
loglv00             jfs2log    1     1     1    open/syncd    N/A
。。。。archlv       jfs2       400   400   1    open/syncd    /oracle/app/。。。。
。。。。dg              jfs2       2047  2047  3    open/syncd    /oracle/app/。。。。

檢視lv的屬性
# lslv mahkrptdblv
LOGICAL VOLUME:     mahkrptdblv            VOLUME GROUP:   datavg2
LV IDENTIFIER:      000798330000d6000000011b8fee854b.1 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            3048                   PP SIZE:        256 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                2430                   PPs:            2430
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       inner edge             UPPER BOUND:    1024
MOUNT POINT:        /oracle/app/mahkrptdb/oradata LABEL:          /oracle/。。。。。

MIRROR WRITE CONSISTENCY: on/ACTIVE                             
EACH LP COPY ON A SEPARATE PV ?: yes                                   
Serialize IO ?:     NO                                    
DEVICESUBTYPE : DS_LVZ

最大lp大小為3048個,每一個為256M,所以最大大小為780g左右,想要指定為800g當然就會有問題了。

增加lp的大小能起作用嗎?
前提必須是vg有足夠的空間:
於是檢視vg的屬性:
# lsvg datavg2
VOLUME GROUP:       datavg2                  VG IDENTIFIER:  000798330000d6000000011b8fee854b
VG STATE:           active                   PP SIZE:        256 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      5573 (1426688 megabytes)
MAX LVs:            4096                     FREE PPs:       695 (177920 megabytes)
LVs:                4                        USED PPs:       4878 (1248768 megabytes)
OPEN LVs:           4                        QUORUM:         3
TOTAL PVs:          5                        VG DESCRIPTORS: 5
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         5                        AUTO ON:        yes
MAX PPs per VG:     32768                    MAX PVs:        1024
LTG size (Dynamic): 1024 kilobyte(s)         AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable

發現還有170g左右的空間。所以只能在這170g中分配空間了。
可檢視vg時,發現還有一個vg,為appvg。
# lsvg -o
appvg
datavg2
rootvg

# lsvg appvg
VOLUME GROUP:       appvg                    VG IDENTIFIER:  000798330000d6000000013025f15de2
VG STATE:           active                   PP SIZE:        256 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      1092 (279552 megabytes)
MAX LVs:            256                      FREE PPs:       1092 (279552 megabytes)
LVs:                0                        USED PPs:       0 (0 megabytes)
OPEN LVs:           0                        QUORUM:         2
TOTAL PVs:          2                        VG DESCRIPTORS: 3
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         2                        AUTO ON:        yes
MAX PPs per VG:     32512                                    
MAX PPs per PV:     1016                     MAX PVs:        32
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable

這個vg是沒有使用過的。
包括檢視這個vg是否包含lv也可以說明

# lsvg -l appvg
appvg:
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT

但是存在一個問題,這個vg使用的pv是否是本地磁碟還是儲存的磁碟呢?
# lsvg -p appvg
appvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk2            active            546         546         110..109..109..109..109
hdisk3            active            546         546         110..109..109..109..109


該vg包括hdisk2和3這兩個磁碟。

用lsdev的命令更一目瞭然。

# lsdev -Cc disk
hdisk0 Available 0D-08-00-4,0 16 Bit LVD SCSI Disk Drive
hdisk1 Available 0D-08-01-4,0 16 Bit LVD SCSI Disk Drive
hdisk2 Available 0O-08-00-4,0 16 Bit LVD SCSI Disk Drive
hdisk3 Available 0O-08-01-4,0 16 Bit LVD SCSI Disk Drive
hdisk4 Available 0L-08-01     1815     DS4800 Disk Array Device
hdisk5 Available 0L-08-01     1815     DS4800 Disk Array Device
hdisk6 Available 0L-08-01     1815     DS4800 Disk Array Device
hdisk7 Available 0L-08-01     1815     DS4800 Disk Array Device
hdisk8 Available 0L-08-01     1815     DS4800 Disk Array Device


# lscfg -vl hdisk3
  hdisk3           U787B.001.DNWGLBK-P1-T14-L8-L0  16 Bit LVD SCSI Disk Drive (146800 MB)

        Manufacturer................IBM   H0
        Machine Type and Model......ST3146855LC    
        FRU Number..................03N6352    
        ROS Level and ID............43383044
        Serial Number...............000D385F
        EC Level....................D76038   
        Part Number.................03N6351    
        Device Specific.(Z0)........000004129F000136
        Device Specific.(Z1)........0618C80D
        Device Specific.(Z2)........0002
        Device Specific.(Z3)........08136
        Device Specific.(Z4)........0001
        Device Specific.(Z5)........22
        Device Specific.(Z6)........D76038   
        Brand.......................H0

說明是本地磁碟,所以堅決不能適用於資料庫中。

而hdisk9是屬於磁碟陣列的。

# lscfg -vl hdisk9
  hdisk9           U787B.001.DNWGLBK-P1-C4-T1-W202500A0B84720F8-L6000000000000  1815     DS4800 Disk Array Device

 

所以結論就是暫時只能在剩餘的170g中使用了。

 


如何擴充套件ha的檔案系統:
# smitty hacmp

                                 HACMP for AIX

Move cursor to desired item and press Enter.

  Initialization and Standard Configuration
  Extended Configuration
  System Management (C-SPOC)
  Problem Determination Tools


                          System Management (C-SPOC)

Move cursor to desired item and press Enter.

  Manage HACMP Services
  HACMP Communication Interface Management
  HACMP Resource Group and Application Management
  HACMP Log Viewing and Management
  HACMP File Collection Management
  HACMP Security and Users Management
  HACMP Logical Volume Management
  HACMP Concurrent Logical Volume Management
  HACMP Physical Volume Management
  Configure GPFS


  Open a SMIT Session on a Node


                        HACMP Logical Volume Management

Move cursor to desired item and press Enter.

  Shared Volume Groups
  Shared Logical Volumes
  Shared File Systems
  Synchronize Shared LVM Mirrors
  Synchronize a Shared Volume Group Definition

 

                        Shared File Systems

Move cursor to desired item and press Enter.

  Journaled File Systems
  Enhanced Journaled File Systems


                        Enhanced Journaled File Systems

Move cursor to desired item and press Enter.

  Add an Enhanced Journaled File System
  Add an Enhanced Journaled File System on a Previously Defined Logical Volume
  List All Shared File Systems
  Change / Show Characteristics of a Shared Enhanced Journaled File System
  Remove a Shared File System
 
 
  即可完成配置。

否則按照單機的配置需要進行hacmp的配置同步操作。同步到hacmp的備機當中。


從smitty的日誌中可以看出來執行的大致操作都是在
/usr/es/sbin/cluster/sbin/目錄下進行的。

/usr/es/sbin/cluster下包括了基本所有的關於ha的操作命令。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/288166/viewspace-705068/,如需轉載,請註明出處,否則將追究法律責任。

相關文章