AIX Create Volume Group, Logical Volume dan File System From New Disk /LUN

Create Volume Group (VG)

Use the cfgmgr command to scan and identify all installed configurations.

#cfgmgr

Use lspv command to see the pv configuration.

#lspv

root@xxx:/>cfgmgr
root@xxx:/>lspv
hdisk18         00f86d5fa9781a05                    rootvg          active
hdisk27         00f86d5fa99e3994                    datavg          active
hdisk30         none                                None            active

Based on the example above, there is a hdisk30 on the system that has not been configured anything. Use the command bootinfo -s hdiskxx to find out the size of the LUN.

#bootinfo -s hdisk30

root@xxx:/>bootinfo -s hdisk30
3145728

Create a new VG called “backuptmpvg” with the number of PP (physical partition) of 3000 (3TB) with the command:

#mkvg -y backuptmpvg -s 3000 hdisk30

or if you want to add two or more disk

#mkvg -y backuptmpvg -s 3000 hdisk30 hdisk31

If the command can’t be executed because the disk is part of another VG, make sure that you entered the disk settings correctly. If you are going to scratch the disk, you can force it by adding a force condition:

#mkvg -f -y backuptmpvg -s 3000 hdisk30

Run the LSVG command to ensure that the backuptmpvg is created.

#lsvg backuptmpvg

root@xxx:/>lsvg backuptmpvg
VOLUME GROUP:       backuptmpvg              VG IDENTIFIER:  00cb852000004b00000001781272a1ec
VG STATE:           active                   PP SIZE:        1024 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      3071 (3144704 megabytes)
MAX LVs:            256                      FREE PPs:       3071 (3144704 megabytes)
LVs:                2                        USED PPs:       0 (0 megabytes)
OPEN LVs:           2                        QUORUM:         2 (Enabled)
TOTAL PVs:          1                        VG DESCRIPTORS: 2
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         1                        AUTO ON:        yes
MAX PPs per VG:     32512
MAX PPs per PV:     4064                     MAX PVs:        8
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable
PV RESTRICTION:     none                     INFINITE RETRY: no
DISK BLOCK SIZE:    512                      CRITICAL VG:    no
FS SYNC OPTION:     no

Create Logical Volume (LV)

For example, create a logical volume with the condition name LV lvbackuptmp with type jfs2 and size 3000 PP’s

#mklv -y lvbackuptmp -t jfs2 backuptmpvg 3000

To see the LV list in the volume group

#lsvg -l backuptmpvg

Create File System (FS)

Create a file system of type jfs2 with mount point / backuptmp

#crfs -v jfs2 -d lvbackuptmp -m /backuptmp -A yes

To ensure that the logical point has a mount point:

#lsvg -l appdata

Mount the file system so that it can be used

#mount /backtuptmp

To make sure the file system is mounted to the system:

#df -g

Leave a Reply