반응형

1. 고려사항

  • rootvg(OS영역)의 백업 및 복구는 mksysb 명령어를 통해, 데이터를 백업 및 복구가 가능하다.
  • 하지만, 일반 볼륨(User-defined VG, 데이터영역)의 백업 및 복구를 위해서는 savevg / restvg를 통해, 백업 및 복구를 할 수 있다.※ 단, JFS 혹은 JFS2 형태의 파일시스템 정보만 백업 / 복구가 가능하다.

      ※ Raw device 형태의 LV(Logical volume)은 백업되지 않는다.


2. savevg tape images

  • mksysb 형태처럼, savevg로 생성된 이미지는 부팅가능한 형태로 만들수 없다.
  • 테입 혹은 파일형태로 저장할 수 있으며, savevg로 생성한 이밎는 백
  • 하지만, 일반 볼륨(User-defined VG, 데이터영역)의 백업 및 복구를 위해서는 savevg / restvg를 통해, 백업 및 복구를 할 수 있다.※ 단, JFS 혹은 JFS2 형태의 파일시스템 정보만 백업 / 복구가 가능하다.

      ※ Raw device 형태의 LV(Logical volume)은 백업되지 않는다.


3. VG 백업

  0) 테스트 환경

 
OSLEVEL : AIX 7.2 TL04 SP02
테스트 목적 : VG BAckup & Restore
테스트 환경
 
*/ Physical Disk information /*
[backup:root] /nim_backup] lspv
hdisk0          00c48b55df91a7eb                    rootvg          active      
hdisk1          00c48b55ecd138f4                    testvg          active  
 
*/ Filesystem information /*
[backup:root] /nim_backup] df -gP
Filesystem    GB blocks      Used Available Capacity Mounted on
/dev/hd4           1.00      0.36      0.64      37/
/dev/hd2           5.00      3.01      1.99      61/usr
/dev/hd9var        0.41      0.26      0.15      64/var
/dev/hd3           1.00      0.00      1.00       1/tmp
/dev/hd1          10.00      0.23      9.77       3/home
/proc                 -         -         -       - /proc
/dev/livedump      0.25      0.00      0.25       1/var/adm/ras/livedump
/dev/test_lv       1.00      0.00      1.00       1/nim_backup      
 
*/ Filesystem 내의 파일 /*
[backup:root] /nim_backup] cd /nim_backup
[backup:root] /nim_backup] ls -lrt
total 8
-rw-r--r--    1 root     system            8 Mar 07 11:35 backup_vg_test
drwxr-xr-x    2 root     system          256 Mar 07 11:45 lost+found
 
*/ Filesystem 내의 backup_vg_test /*
[backup:root] /nim_backup] cat backup_vg_test
save me
 
 
 
 

  1) SMIT : VG 백업

  #smitty savevg

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
                                   Back Up a Volume Group to Tape/File or UDFS capable media
 
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
 
                                                        [Entry Fields]
    WARNING:  Execution of the savevg command will
              result in the loss of all material
              previously stored on the selected
              output medium.
 
* Backup DEVICE or FILE                              [/dev/rmt0]      << Backup device 혹은 파일    
* VOLUME GROUP to back up                            [testvg]         << Backup할 VG name      
 List files as they are backed up?                   no
 Generate new vg.data file?                          yes
 Create MAP files?                                   no                                                                        
  Create backup using snapshots?                      no                                                                         
  EXCLUDE files?                                      no                                                                         
  Location of File System Exclusion List             []                                                                          
  EXPAND /tmp if needed?                              no                                                                         
  Disable software packing of backup?                 no                                                                         
  Backup extended attributes?                         yes                                                                        
  Number of BLOCKS to write in a single output       []                                                                          
     (Leave blank to use a system default)
  Verify readability if tape device?                  no                                                                        
 Back up Volume Group information files only?        no                                                                        
 Back up encrypted files?                            yes                                                                       
 Back up DMAPI filesystem files?                     yes               
 
 

 

1
2
3
4
5
6
7
8
9
10
11
12
13
Command: OK            stdout: yes           stderr: no
 
Before command completion, additional instructions may appear below.
 
 
Creating information file for volume group testvg.
 
Creating list of files to back up.
 
Backing up 9 files
 
9 of 9 files (100%)
0512-038 savevg: Backup Completed Successfully.
 

 

  2) 백업 확인

  #smitty lsbackvg

 
                                                List Files in a Volume Group Backup
 
Type or select values in entry fields.       
Press Enter AFTER making all desired changes.
 
* DEVICE or FILE                                   [/dev/rmt0]                                                             
  Number of BLOCKS to read in a single input       []                                                                      
     (Leave blank to use a system default)
  Verify BLOCK size if tape device?                no                                                               
 

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
                                                           COMMAND STATUS
 
Command: OK            stdout: yes           stderr: no
 
Before command completion, additional instructions may appear below.
 
New volume on /dev/rmt0:
Cluster size is 51200 bytes (100 blocks).
The volume number is 1.
The backup date is: Fri Mar 12 22:00:32 KORST 2021
Files are backed up by name.
The user is root.
          11 ./tmp/vgdata/testvg/image.info
         127 ./tmp/vgdata/vgdata.files7602182
         127 ./tmp/vgdata/vgdata.files
        2301 ./tmp/vgdata/testvg/filesystems
        2587 ./tmp/vgdata/testvg/testvg.data
         358 ./tmp/vgdata/testvg/backup.data
           0 ./nim_backup
           8 ./nim_backup/backup_vg_test
           0 ./nim_backup/lost+found
The total size is 5519 bytes.
The number of archived files is 9.                                                        
cs

4. 복구

  • 복구 테스트를 위해, /nim_backup/backup_vg_test 파일 삭제.
  • 기존 testvg 내의 filesystem umount / varyoffvg / exportvg를 수행해준다.
  • 복구가 완료되면, 해당 VG는 자동 varyon / mount까지 자동으로 수행된다.

 

  1) 백업 복구

  #smitty restvg

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
                                                       Remake a Volume Group
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
                                                        [Entry Fields]
* Restore DEVICE or FILE                             [/dev/rmt0]                                                              
  SHRINK the filesystems?                             no                                                                         
  Recreate logical volumes and filesystems only?      no                                                                         
  PHYSICAL VOLUME names                              [hdisk1]                                                                          
     (Leave blank to use the PHYSICAL VOLUMES listed
      in the vgname.data file in the backup image)
  Use existing MAP files?                             yes                                                                        
  Physical partition SIZE in megabytes               []                                                                          
     (Leave blank to have the SIZE determined
      based on disk size)
  Number of BLOCKS to read in a single input         []                                                                           
     (Leave blank to use a system default)
  Alternate vg.data file                             []                                                                           
     (Leave blank to use vg.data stored in
      backup image)
 
 

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Command: OK            stdout: yes           stderr: no
Before command completion, additional instructions may appear below.
Will create the Volume Group:   testvg
Target Disks:   hdisk1
Allocation Policy:
        Shrink Filesystems:     no
        Preserve Physical Partitions for each Logical Volume:   no
testvg
test_lv
loglv00
New volume on /dev/rmt0:
Cluster size is 51200 bytes (100 blocks).
The volume number is 1.
The backup date is: Fri Mar 12 22:00:32 KORST 2021
Files are backed up by name.
The user is root.
x           11 ./tmp/vgdata/testvg/image.info
x          127 ./tmp/vgdata/vgdata.files7602182
x          127 ./tmp/vgdata/vgdata.files
x         2301 ./tmp/vgdata/testvg/filesystems
x         2587 ./tmp/vgdata/testvg/testvg.data
x          358 ./tmp/vgdata/testvg/backup.data
x            0 ./nim_backup
x            8 ./nim_backup/backup_vg_test
x            0 ./nim_backup/lost+found
The total size is 5519 bytes.
The number of restored files is 9.
 
 

 

  2) 복구 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[backup:root] /] lsvg -o
testvg
rootvg
 
[backup:root] /] df -gP
Filesystem    GB blocks      Used Available Capacity Mounted on
/dev/hd4           1.00      0.36      0.64      37/
/dev/hd2           5.00      3.01      1.99      61/usr
/dev/hd9var        0.41      0.26      0.15      64/var
/dev/hd3           1.00      0.00      1.00       1/tmp
/dev/hd1          10.00      0.23      9.77       3/home
/proc                 -         -         -       - /proc
/dev/livedump      0.25      0.00      0.25       1/var/adm/ras/livedump
/dev/test_lv       1.00      0.00      1.00       1/nim_backup
 
[backup:root] /] ls -lrt /nim_backup/backup_vg_test 
-rw-r--r--    1 root     system            8 Mar 07 11:35 /nim_backup/backup_vg_test
 
[backup:root] /] cat /nim_backup/backup_vg_test    
save me
 
 
반응형

'LVM > VG' 카테고리의 다른 글

[AIX] VG 확장 (VG extend)  (0) 2024.08.01
[AIX] VG(Volume Group)에 남아있는 용량 확인하기  (0) 2024.07.31
Posted by 정병욱

반응형

 



 
* Written by Jung Byung Wook

구성환경 
 - 2NODE
- Hostname : gpfs1, gpfs2
- IP Addr : 10.10.10.10, 10.10.10.11
 - Data disk : 5G * 3EA
 - Tie breakers disk : 5G * 3EA
 

0. 사전 준비단계

 1) 노드 구성 계획

  • 몇 개의 노드로 구성할 것인지?

 2) Inter-Connect(Heartbeat) Interface

  • 1G Interface로도 충분하나, 10G 구성도 무방.
  • Heartbeat Interface의 etherchannel은 Active / Standby로 구성하는 것이 일반적.

 3) GPFS 공유파일시스템(MMFS)의 용량과 각 NSD disk(LUN)은 몇개로 가져갈 것인지?

  • GPFS 파일시스템의 증설단위는 1 NSD(LUN)이며, 사용용량에 맞게 NSD를 구성해야한다.
  • NSD disk(LUN)의 갯수는 각 사이트 정책/관행에 따라 갯수가 정해지나, 너무 적은 NSD는 성능저하를 줄수 있다.

 4) Remote GPFS Cluster를 사용할 것인지?

  • 일반적인 사이트에서는 사용하지 않음.

 5) Communication protocol(통신방식)은 어떤 것을 사용할 것인지?

  • SSH / RSH 방식이 있다.
  • RSH의 경우, 보안취약점이 존재하여, SSH 암호화방식을 통한 Communication을 권장한다.

1. 상호 노드간 패스워드 없이 통신할 수 있는 연결구성 및 디스크 속성 설정

  •  권장구성방식인 SSH를 통해, GPFS를 구성하기 위한 방식이며, 이 스텝에서는 각 노드가 Password 없이 접근할 수 있게, 노드 상호간의 공개키(Public key)를 공유한다.

 1) /etc/hosts에 상호 노드 등록

  • gpfs1 node : 10.10.10.10
  • gpfs2 node : 10.10.10.11

 

 2) 각 노드에서 공개키 교환

    • gpfs1 node
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[gpfs1:root] /.ssh] ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (//.ssh/id_rsa): Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in //.ssh/id_rsa.
Your public key has been saved in //.ssh/id_rsa.pub.
The key fingerprint is:
3a:9c:92:c2:d1:64:6d:52:49:dd:08:02:01:82:3d:16 root@gpfs1
The key's randomart image is:
+--[ RSA 2048]----+
|+oE+..++ o       |
|o +  +. o .      |
| . .+ o          |
|   + o           |
|  . .   S        |
| . . o o         |
|  o o =          |
|   . . .         |
|                 |
+-----------------+
[gpfs1:root] /.ssh] cp id_rsa.pub authorized_keys
[gpfs1:root] /.ssh] ssh gpfs2 'cat /.ssh/authorized_keys' >> /.ssh/authorized_keys 
root@gpfs2's password: 
[gpfs1:root] /.ssh] cat authorized_keys 
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDD8R2ZcvjYAos8rDVKFOQ++bzfMAGjOTTRcHhlGLJrvgNzHHm/Ws50QaTDHk8/xKtRUoS+fqf3epBTPCWe3VHa+m4WzDlKLGqLRgM3AuHpYxN/d2ePaeiHV8uxjMG+Cm6WKyTPDbLzmpXYmom50C58oaYz227eJMBLlgUrO+yIVA3/k5rORk4fCEgAReaJyartkEgrkrw/+i48zl/eMj8ZFMx13aIHIzAHAnrTpkFlyIoSHqNDskYpgS7DfxbA64/RBKOqf4h6BCYcxmpCpVrtKCI4SXo6K8M/N2slqrDlVbP4uB4f0mm2y0Fm5q+QZW+QmA/gEI4FDAAAe2tDYjyN root@gpfs1
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN+ePBOlrkT6WPvtsdYoxuMbFcpHmEE5Ao9Rm65eni42ugHZnnMPS9VXyCuZm7FIlm6YAguHJ1mr+q3c+czDjdRzeRzfqAIk/mOdq/LmWlc2J5QsEqISdb+b9vzrv+3kH8c/FqljpO9rGM7Jau78JlWS3Pjx4nunmSs3BLaf6+MTldRW9w21zCH2u4d0D2f9zjks347ounmlNcttaERBwcV44x0Me+aLRfwpfUjhi9krflX1JSiKoGvP2uJdRHoXCXx09i7wOQHO6AWAMGGTEkxOA9PLbGnr9TtpymDvRLy9Ve4EioMLr+RDPeHhXIJDybwDz2CcQJeT1/juQRNWdb root@gpfs2
[gpfs1:root] /.ssh] 
[gpfs1:root] /.ssh] ssh gpfs2
Last unsuccessful login: Fri Feb 19 11:25:55 KORST 2021 on /dev/vty0 from lpar8
Last login: Mon Feb 22 12:05:57 KORST 2021 on ssh from gpfs1
*******************************************************************************
*                                                                             *
*                                                                             *
*  Welcome to AIX Version 7.1!                                                *
*                                                                             *
*                                                                             *
*  Please see the README file in /usr/lpp/bos for information pertinent to    *
*  this release of the AIX Operating System.                                  *
*                                                                             *
*                                                                             *
*******************************************************************************
[YOU HAVE NEW MAIL]
[gpfs2:root] /
cs

 

    • gpfs2 node
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
[gpfs2:root] /.ssh] ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (//.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in //.ssh/id_rsa.
Your public key has been saved in //.ssh/id_rsa.pub.
The key fingerprint is:
de:fe:c7:fe:99:85:0d:92:43:26:80:74:9e:73:33:08 root@gpfs2
The key's randomart image is:
+--[ RSA 2048]----+
|     .E.o        |
|      .+ +       |
|        = = o    |
|         o * .   |
|        S   + .  |
|       . .   o + |
|        . .  .. o|
|         .    o +|
|          ...o.+.|
+-----------------+
[gpfs2:root] /.ssh] cp id_rsa.pub authorized_keys
[gpfs2:root] /.ssh] ssh gpfs1 'cat /.ssh/authorized_keys' >> /.ssh/authorized_keys
The authenticity of host 'gpfs1 (10.10.10.10)' can't be established.
ECDSA key fingerprint is e4:fc:57:46:17:6a:e8:5e:70:5a:c4:34:b9:fc:60:1a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'gpfs1,10.10.10.10' (ECDSA) to the list of known hosts.
[gpfs2:root] /.ssh] cat authorized_keys 
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN+ePBOlrkT6WPvtsdYoxuMbFcpHmEE5Ao9Rm65eni42ugHZnnMPS9VXyCuZm7FIlm6YAguHJ1mr+q3c+czDjdRzeRzfqAIk/mOdq/LmWlc2J5QsEqISdb+b9vzrv+3kH8c/FqljpO9rGM7Jau78JlWS3Pjx4nunmSs3BLaf6+MTldRW9w21zCH2u4d0D2f9zjks347ounmlNcttaERBwcV44x0Me+aLRfwpfUjhi9krflX1JSiKoGvP2uJdRHoXCXx09i7wOQHO6AWAMGGTEkxOA9PLbGnr9TtpymDvRLy9Ve4EioMLr+RDPeHhXIJDybwDz2CcQJeT1/juQRNWdb root@gpfs2
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDD8R2ZcvjYAos8rDVKFOQ++bzfMAGjOTTRcHhlGLJrvgNzHHm/Ws50QaTDHk8/xKtRUoS+fqf3epBTPCWe3VHa+m4WzDlKLGqLRgM3AuHpYxN/d2ePaeiHV8uxjMG+Cm6WKyTPDbLzmpXYmom50C58oaYz227eJMBLlgUrO+yIVA3/k5rORk4fCEgAReaJyartkEgrkrw/+i48zl/eMj8ZFMx13aIHIzAHAnrTpkFlyIoSHqNDskYpgS7DfxbA64/RBKOqf4h6BCYcxmpCpVrtKCI4SXo6K8M/N2slqrDlVbP4uB4f0mm2y0Fm5q+QZW+QmA/gEI4FDAAAe2tDYjyN root@gpfs1
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN+ePBOlrkT6WPvtsdYoxuMbFcpHmEE5Ao9Rm65eni42ugHZnnMPS9VXyCuZm7FIlm6YAguHJ1mr+q3c+czDjdRzeRzfqAIk/mOdq/LmWlc2J5QsEqISdb+b9vzrv+3kH8c/FqljpO9rGM7Jau78JlWS3Pjx4nunmSs3BLaf6+MTldRW9w21zCH2u4d0D2f9zjks347ounmlNcttaERBwcV44x0Me+aLRfwpfUjhi9krflX1JSiKoGvP2uJdRHoXCXx09i7wOQHO6AWAMGGTEkxOA9PLbGnr9TtpymDvRLy9Ve4EioMLr+RDPeHhXIJDybwDz2CcQJeT1/juQRNWdb root@gpfs2
[gpfs2:root] /.ssh]     
[gpfs2:root] /.ssh] ssh gpfs1
Last login: Mon Feb 22 12:06:49 KORST 2021 on ssh from gpfs2
*******************************************************************************
*                                                                             *
*                                                                             *
*  Welcome to AIX Version 7.1!                                                *
*                                                                             *
*                                                                             *
*  Please see the README file in /usr/lpp/bos for information pertinent to    *
*  this release of the AIX Operating System.                                  *
*                                                                             *
*                                                                             *
*******************************************************************************
[YOU HAVE NEW MAIL]
[gpfs1:root] /
cs

 3) 디스크 속성

  • Reservation policy = no_reserve 권장
  • queue_depth = 6이상 (Disk의 queue full이 발생하면, 더 증설요구됨.)
  • algorithm = round_robin 권장 (연결된 모든 패스에 I/O 분산처리됨)
1
2
3
4
5
6
7
8
9
10
11
[gpfs1:root] /home/gpfs] lsattr -El hdisk1
PCM             PCM/friend/vscsi                 Path Control Module        False
algorithm       round_robin                      Algorithm                  True
hcheck_cmd      test_unit_rdy                    Health Check Command       True+
hcheck_interval 0                                Health Check Interval      True+
hcheck_mode     nonactive                        Health Check Mode          True+
max_transfer    0x40000                          Maximum TRANSFER Size      True
pvid            00c48b555f9e08c00000000000000000 Physical volume identifier False
queue_depth     16                                Queue DEPTH                True
reserve_policy  no_reserve                       Reserve Policy             True+
 
 
 

 

2. GPFS 구성

  •  GPFS 설치 및 패스 등록
  • 테스트 환경 설치 경로 : /home/gpfs/

 1) 설치 (모든 노드에서 GPFS 설치)

  • 설치
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[gpfs1:root] /home/gpfs] ls -lrt
total 126576
-rw-r-----    1 root     system     64803443 Feb 22 05:39 Spectrum_Scale_Standard-5.0.3.0-ppc64-AIX-install.tgz
[gpfs1:root] /home/gpfs]
[gpfs1:root] /home/gpfs] gunzip -*
[gpfs1:root] /home/gpfs] ls -lrt
total 249992
-rw-r-----    1 root     system    127989760 Feb 22 05:39 Spectrum_Scale_Standard-5.0.3.0-ppc64-AIX-install.tar
[gpfs1:root] /home/gpfs] tar xvf Spectrum_Scale_Standard-5.0.3.0-ppc64-AIX-install.tar 
x gpfs.base, 79464448 bytes, 155204 media blocks.
x gpfs.compression, 79872 bytes, 156 media blocks.
x gpfs.docs.data, 1835008 bytes, 3584 media blocks.
x gpfs.ext, 7836672 bytes, 15306 media blocks.
x gpfs.gskit, 38384640 bytes, 74970 media blocks.
x gpfs.msg.en_US, 371712 bytes, 726 media blocks.
x gpfs.license.std, 8192 bytes, 16 media blocks.
[gpfs1:root] /home/gpfs] 
[gpfs1:root] /home/gpfs] installp -aYd . all >> 현재 디렉토리에 있는 모든 파일셋 설치
 
 
    • 설치된 GPFS Fileset 확인
1
2
3
4
5
6
7
8
9
[gpfs1:root] /home/gpfs] lslpp -|grep -i gpfs
  gpfs.base                  5.0.3.0  COMMITTED  GPFS File Manager
  gpfs.compression           5.0.3.0  COMMITTED  GPFS Compresson Libraries
  gpfs.ext                   5.0.3.0  COMMITTED  GPFS Extended Features
  gpfs.gskit               8.0.50.86  COMMITTED  GPFS GSKit Cryptography
  gpfs.license.std           5.0.3.0  COMMITTED  IBM Spectrum Scale Standard
  gpfs.msg.en_US             5.0.3.0  COMMITTED  GPFS Server Messages - U.S.
  gpfs.base                  5.0.3.0  COMMITTED  GPFS File Manager
  gpfs.docs.data             5.0.3.0  COMMITTED  GPFS Server Manpages and
 

 

2) 패스 등록(모든 노드에서 패스등록)

  • 모든 경로에서 GPFS Command를 수행할 수 있게, GPFS 명령어 디렉토리는 패스(PATH) 지정해준다.
  • /usr/lpp/mmfs/bin 을 PATH 환경변수에 등록해준다.
  • vi /.profile

     PATH=$PATH:/usr/bin:/usr/dt/bin:/etc:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:/usr/lpp/mmfs/bin:.

 

3. GPFS [Specturm Scale] 구성

  • 구성스탭 : 노드 정의 > NSD(디스크 정의) > 클러스터 생성 > 파일시스템 생성 > 마운트 GPFS
  • GPFS 구성을 위한 Config 파일들은 생성 명령어를 수행할 한쪽 노드에서만 생성하면 된다.

 1) 노드 정의

    • GPFS Node로 동작할 노드에 대한 정의를 Description 파일형태로 만든다.
    • Quorum-manager의 역할 : 클러스터 노드의 Cluster alive condition(생존조건)을 관리하는 매니저.
1
2
3
[gpfs1:root] vi /home/gpfs/node.list
gpfs1:quorum-manager
gpfs2:quorum-manager
 

 2) NSD 정의

      • GPFS 파일시스템 용도 및 Tie Breakers disk로 사용될 디스크를 정의.
      • 테스트 환경에서는 hdisk1~3 파일시스템용, hdisk4~6은 Tie 디스크 용도로 구성함.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[gpfs1:root] /home/gpfs] vi disk.list
%nsd:
device=/dev/hdisk1
nsd=NSD001
usage=dataAndMetadata
pool=system
%nsd:
device=/dev/hdisk2
nsd=NSD002
usage=dataAndMetadata
pool=system
%nsd:
device=/dev/hdisk3
nsd=NSD003
usage=dataAndMetadata
pool=system
 
[gpfs1:root] /home/gpfs] vi tie.list
%nsd:
device=/dev/hdisk4
nsd=TIE_NSD001
usage=descOnly
pool=system
%nsd:
device=/dev/hdisk5
nsd=TIE_NSD002
usage=descOnly
pool=system
%nsd:
device=/dev/hdisk6
nsd=NSD003
usage=descOnly
pool=system
[gpfs1:root] /home/gpfs]
 

 3) GPFS Cluster 생성 

      • --ccr-enable :  구성 및 파일시스템 정보 저장.
      • -r : 접속 communication protocol
      • -R : Copy communication protocol
      • -C : Cluster name  > "-C" 옵션을 주지 않으면, Primary node의 hostname으로 클러스터 이름 지정됨.
      • -U : Domain name   > remote cluster환경에서 사용되는 domain name.
      • -A : Autoload              > AIX 재기동시, 자동 기동옵션
1
2
3
4
5
6
7
8
9
[gpfs1:root] /home/gpfs] mmcrcluster -N ./node.list --ccr-enable -/usr/bin/ssh -/usr/bin/scp -C GPFS.SPECTRUM -U SCALE -A
mmcrcluster: Performing preliminary node verification ...
mmcrcluster: Processing quorum and other critical nodes ...
mmcrcluster: Finalizing the cluster data structures ...
mmcrcluster: Command successfully completed
mmcrcluster: 6027-1254 Warning: Not all nodes have proper GPFS license designations.
    Use the mmchlicense command to designate licenses as needed.
mmcrcluster: 6027-1371 Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.
 
 

 

 4) GPFS 라이센스 동의 및 노드 상태 확인

      • IBM Spectrum scale server licensing agreement 동의.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[gpfs1:root] /home/gpfs] mmchlicense server --accept -N gpfs1,gpfs2       
 
The following nodes will be designated as possessing server licenses:
        gpfs1
        gpfs2
mmchlicense: Command successfully completed
mmchlicense: 6027-1371 Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.
[gpfs1:root] /home/gpfs] mmgetstate -aL
 
 Node number  Node name       Quorum  Nodes up  Total nodes  GPFS state   Remarks    
-------------------------------------------------------------------------------------
       1      gpfs1              0        0          2       down         quorum node
       2      gpfs2              0        0          2       down         quorum node
[gpfs1:root] /home/gpfs] 
 
 

 

 5) GPFS Startup 및 노드 상태 확인

      • startup 명령어 후, 노드 상태 변화 : down > arbitrating > active
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[gpfs1:root] /home/gpfs] mmstartup -a
 
Mon Feb 22 13:38:46 KORST 20216027-1642 mmstartup: Starting GPFS ...
[gpfs1:root] /home/gpfs] 
[gpfs1:root] /home/gpfs] mmgetstate -aL
 
 Node number  Node name       Quorum  Nodes up  Total nodes  GPFS state   Remarks    
-------------------------------------------------------------------------------------
       1      gpfs1              0        0          2       down         quorum node
       2      gpfs2              0        0          2       down         quorum node
 
[gpfs1:root] /home/gpfs] mmgetstate -aL
 Node number  Node name       Quorum  Nodes up  Total nodes  GPFS state   Remarks    
-------------------------------------------------------------------------------------
       1      gpfs1              2        0          2       arbitrating  quorum node
       2      gpfs2              2        0          2       arbitrating  quorum node
[gpfs1:root] /home/gpfs] mmgetstate -aL
mmgetstate
 
 Node number  Node name       Quorum  Nodes up  Total nodes  GPFS state   Remarks    
-------------------------------------------------------------------------------------
       1      gpfs1              2        2          2       active       quorum node
       2      gpfs2              2        2          2       active       quorum node
[gpfs1:root] /home/gpfs] 
 
 

 

 6) NSD 및 파일시스템 생성

      • data용도의 NSD Description : /home/gpfs/disk.list
      • tie용도의 NSD Description : /home/gpfs/tie.list -F /home/gpfs/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[gpfs1:root] /home/gpfs] mmcrnsd -/home/gpfs/disk.list
mmcrnsd: Processing disk hdisk1
mmcrnsd: Processing disk hdisk2
mmcrnsd: Processing disk hdisk3
mmcrnsd: 6027-1371 Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.
[gpfs1:root] /home/gpfs] mmcrnsd -/home/gpfs/tie.list 
mmcrnsd: Processing disk hdisk4
mmcrnsd: Processing disk hdisk5
mmcrnsd: Processing disk hdisk6
mmcrnsd: 6027-1680 Disk name NSD003 is already registered for use by GPFS.
mmcrnsd: 6027-1371 Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.
[gpfs1:root] /home/gpfs] 
[gpfs1:root] /home/gpfs] mmcrfs testFS -/home/gpfs/disk.list -/TEST -A yes -m1 -M2 -r1 -R2 -v yes
 
GPFS: 6027-531 The following disks of testFS will be formatted on node gpfs1:
    NSD001: size 5120 MB
    NSD002: size 5120 MB
    NSD003: size 5120 MB
GPFS: 6027-540 Formatting file system ...
GPFS: 6027-535 Disks up to size 77.49 GB can be added to storage pool system.
Creating Inode File
Creating Allocation Maps
Creating Log Files
  62 % complete on Mon Feb 22 13:49:02 2021
 100 % complete on Mon Feb 22 13:49:04 2021
Clearing Inode Allocation Map
Clearing Block Allocation Map
Formatting Allocation Map for storage pool system
GPFS: 6027-572 Completed creation of file system /dev/testFS.
mmcrfs: 6027-1371 Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.
 
 

 

 

 7) Tie breakers disk 지정

      • GPFS 4.x 부터 온라인상으로 Tie breakers disk를 지정할 수 있다.
1
2
3
4
5
6
7
8
9
10
11
12
[gpfs1:root] /home/gpfs] lspv
hdisk0          00c48b55df919dc1                    rootvg          active      
hdisk1          00c48b555f9e08c0                    NSD001                      
hdisk2          00c48b555f9e09b0                    NSD002                      
hdisk3          00c48b555f9e0aaa                    NSD003                      
hdisk4          00c48b55ecc3ae3f                    TIE_NSD001                  
hdisk5          00c48b55ecc47bd3                    TIE_NSD002                  
hdisk6          00c48b55ecc5310c                    TIE_NSD003   
[gpfs1:root] /home/gpfs] mmchconfig tiebreakerDisks="TIE_NSD001;TIE_NSD002;TIE_NSD003"
mmchconfig: Command successfully completed
mmchconfig: 6027-1371 Propagating the cluster configuration data to all
  affected nodes.  This is an asynchronous process.
 
 

 

 8) GPFS 파일시스템 마운트

  • mmmount all -a : GPFS 전체 노드에 모든 GPFS 파일시스템 마운트
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[gpfs1:root] /home/gpfs] mmmount all -
Mon Feb 22 13:57:54 KORST 20216027-1623 mmmount: Mounting file systems ...
 
[gpfs1:root] /home/gpfs] df -gP
Filesystem    GB blocks      Used Available Capacity Mounted on
/dev/hd4           1.00      0.37      0.63      37/
/dev/hd2           5.00      3.16      1.84      64/usr
/dev/hd9var        0.41      0.26      0.15      64/var
/dev/hd3           1.00      0.00      1.00       1/tmp
/dev/hd1          10.00      0.46      9.54       5/home
/proc                 -         -         -       - /proc
/dev/livedump      0.25      0.00      0.25       1/var/adm/ras/livedump
/dev/testFS       15.00      1.49     13.51      10/TEST
[gpfs1:root] /home/gpfs] 
[gpfs1:root] /home/gpfs] lsfs |grep -i mmfs
/dev/testFS     -          /TEST                  mmfs  --      rw,mtime,relatime,dev=testFS no   no 
 
 
 
반응형
Posted by 정병욱

RAID란?

Storage/concept2020. 1. 26. 09:32
반응형

1. RAID란?

  • Redunant Array of Independent disk의 약자
  • 여러 개의 디스크를 묶어 성능 및 가용성을 높이도록 구성한 기술
  • 하나의 하드 디스크 대신에 여러 개의 일반 하드디스크를 묶어, 어레이를 구성/데이터 분산 저장을 통한 디스크 폴트를 대비하여, 안정성을 높임.
  • RAID 구성시, 구성되는 디스크 맴버들의 종류와 용량이 동일해야함.
  • 현재는 RAID 2/3/4 방식은 사용되지 않음.

2. RAID 0(Striping))

Figure1) RAID 0 동작원리

 1) 동작 방식

RAID 0 어레이로 데이터가 수신(Receive)될 때, RAID 0에 해당하는 디스크 맴버(Disk1, Disk2)에 순차적으로 저장되는 방식.

 2) 특징

  • 데이터 Striping이라고도 불리우며, 빠른 I/O(입출력)이 가능하도록 데이터가 여러 디스크에 분산 저장됨.
  • 성능은 뛰어남, But 디스크 1개라도 폴트(장애)가 발생하면, 데이터 손실.
  • 최소 2개 이상 디스크 필요.

3. RAID 1(Mirroring)

Figure2) RAID 1 동작방식

 1) 동작 방식

데이터가 RAID1 어레이로 수신(Receive)될 때, 해당 RAID 맴버(예제의 Disk1, Disk2)에 동시에 저장되는 방식.

 2) 특징

  • 속도와 안정성 측면에서 우수하나, 비용이 높음.
  • 서버에서 사용하는 운영체제(OS)에서는 필수적으로 구성되는 RAID Level
  • 또한, DBMS 및 고객이 관리하는 데이터등급이 크리티컬한 데이터의 경우, RAID 1으로 구성.
  • 디스크 맴버에 해당하는 디스크 1개가 폴트(장애)가 발생해도, 데이터 손실 없음.
  • 최소 2개 이상 디스크 필요.

4. RAID1+0

Figure3) RAID1+0 동작방식

 1) 동작방식

 
 ▪ 사전정의
  · DISK1 <-> DISK2 는 미러그룹 1
  · DISK3 <-> DISK4 는 미러그룹 2
 
 ▪ 구성순서
 1) 미러그룹 1에 해당하는 DISK1과 DISK2를 RAID로 구성.
 2) 미러그룹 2에 해당하는 DISK3과 DISK4를 RAID로 구성.
 3) 미러그룹1,2을 RAID으로 구성.
 
 ▪ 동작방식
 ·  RAID1+0 어레이에 데이터가 수신(Receive)되면, 미러그룹1과 미러그룹2에 Striping방식으로 순차적으로 데이터를 저장한다.
 

 2) 특징

  • RAID1(Mirroring)과 RAID0(Striping)의 장점인 성능과 안정성을 모두 갖춤.
  • 6개 디스크로 RAID 구성시, 일반적으로 RAID1+0이 안정성이 높다. 

5. RAID5

Figure4) RAID5 동장방식

1) 동작방식

 
  ▪  데이터와 더불러 Parity가 여러 개 디스크에 분산 저장되는 방식.
  ▪  데이터 저장방향은 왼쪽에서 오른쪽(DISK1부터 DISK4)순으로 저장.
 ▪  각 Stripe zone(그림의 DISK1부터 DISK4까지의 가로 라인, 그림에는 총 3개의 가로 라인이 있음.)마다 1개의 Parity bit가 저장됨.
 ▪  만약 1개의 디스크 폴트가 발생하면, 나머지 3개 디스크의 데이터 및 패리티비티를 XOR 연산을 하여, 폴트 디스크의 데이터 복구.
 

 

2) 특징

  • DATA영역의 RAID 구성시, 가장 보편적으로 사용되는 RAID LEVEL으로, Striping + Parity 방식으로 저장.
  • 최소 3개 이상의 디스크로 구성해야함.
  • RAID5로 구성된 어레이 중, 디스크 2장이 폴트(장애)가 발생하면, 데이터 손실 발생

6. RAID6

Figure5) RAID6 동작방식

1) 동작방식

 
데이터와 더불러 각 디스크에 Parity 정보가 두번 독립적으로 분산저장

2) 특징

  • RAID5보다 안정성적인 측면에서 좋다.
  • 최소 4개 이상의 디스크로 구성해야함.
  • RAID6로 구성된 어레이 중, 디스크 3장이 폴트(장애)가 발생하면, 데이터 손실 발생
  • 읽기 성능 우수, but 쓰기 성능 떨어짐.

7. 성능비교

 

RAID0

RAID1

RAID1+0

RAID5

RAID6

사용 가능한 디스크 (N개 기준)

N

N/2

N/2

N-1

N-2

최소 드라이브 개수

2

2

4

3

3

최대 용량

디스크의 수 * 디스크의 용량

(디스크의 수 / 2) * 디스크의 용량

디스크의 수 / (RAID 1로 묶는 디스크 개수) * 디스크 용량

(디스크의 수 -1) * 디스크의 용량

(디스크의 수 2) * 디스크의 용량

장점

빠른 I/O 성능

구성한 디스크 개수만큼 용량 모두를 활용 가능

높은 안정성

읽기 성능에서 비교적 우수한 성능

Striping의 이점과 mirroring의 이점을 동시에 가짐

디스크 장애 시 복구 수월

패리티 연산의 부하를 줄임

패리티를 통한 안정성과 Striping을 통한 성능 우수

하위 level 대비 안정성 증가

두 개의 드라이브 장애까지 허용

단점

낮은 안정성

절반의 디스크밖에 쓰지 못하므로 비용이 높음

기술적으로 구현 난이도가 높음

두 개 이상의 디스크가 손상될 시 데이터 손실

하위 level 대비 비용 증가

반응형

'Storage > concept' 카테고리의 다른 글

AIX MPIO 패스 기본 점검  (0) 2021.03.29
Posted by 정병욱