감사합니다.
RHEL6 - Multipath 설정 정리하기 본문
RHEL6 버전에서 FC Adapter의 Multipath 설정 하는 방법을 정리한다.
Step 1. 설치된 FC Adapter 확인
[root@RHEL6/]# lspci | grep Fibre
1b:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
1b:00.1 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
=> Qlogic 어댑터 2개가 보인다.
Step 2. FC HBA의 WWN 확인하기
[root@RHEL6/]# ls -la /sys/class/fc_host
total 0
drwxr-xr-x. 2 root root 0 Apr 10 16:45 .
drwxr-xr-x. 41 root root 0 Apr 10 10:52 ..
lrwxrwxrwx. 1 root root 0 Apr 10 16:45 host1 -> ../../devices/pci0000:00/0000:00:18.0/0000:1b:00.0/host1/fc_host/host1
lrwxrwxrwx. 1 root root 0 Apr 10 16:45 host2 -> ../../devices/pci0000:00/0000:00:18.0/0000:1b:00.1/host2/fc_host/host2
[root@RHEL6/]#
[root@RHEL6/]# cat /sys/class/fc_host/host1/port_name
0x21000024ff76dace
[root@RHEL6/]# cat /sys/class/fc_host/host2/port_name
0x21000024ff76dacf
Step 3. San Switch Zoning, Storage Volume Assign
Step 4. Multipath 패키지 설치
1) yum -y install devicedevice-mapper-multipath*
2) rpm -ivh device-mapper-multipath*
Step 5. Multipath Config
mpathconf --enable ##Config 파일 생성
service multipathd start
Step 6. 스토리 볼륨 할당 후 디바이스 스캔
echo "- - -" > /sys/class/scsi_host/host1/scan
echo "- - -" > /sys/class/scsi_host/host2/scan
Step 7. Multipath 확인
[root@RHEL6/]# multipath -ll
mpatha (36000d3100021e8000000000000000007) dm-2 COMPELNT,Compellent Vol
size=100G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 1:0:1:1 sdc 8:32 active ready running
|- 1:0:0:1 sdb 8:16 active ready running
|- 2:0:0:1 sdd 8:48 active ready running
`- 2:0:1:1 sde 8:64 active ready running
=> 100G 볼륨, 4개의 패스가 보인다.
Step 8. IGNORING LOCAL DISKS
..
..
Step 9. ext4 file system
[root@RHEL6/]# mkfs.ext4 /dev/mapper/mpatha
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=512 blocks, Stripe width=512 blocks
6553600 inodes, 26214400 blocks
1310720 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
800 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Step 10. Mount Volume
[root@RHEL6/]# mkdir /volume1
[root@RHEL6/]#
[root@RHEL6/]# mount /dev/mapper/mpatha /volume1
[root@RHEL6/]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_rheltemplate-lv_root
14G 2.0G 11G 16% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/sda1 485M 35M 425M 8% /boot
/dev/mapper/mpatha 99G 188M 94G 1% /volume1
Step 11. /etc/fstab 등록
1. UUID 등록하기
[root@RHEL6host1]# blkid | grep mpatha
/dev/mapper/mpatha: UUID="a34e2480-6f40-41fa-ab15-e3ee7a0ab618" TYPE="ext4"
vi /etc/fstab
UUID="a34e2480-6f40-41fa-ab15-e3ee7a0ab618" /test ext4 defaults,discard 0 0
Step 12. 2TB 이상인 경우
parted 사용하여 GPT로 변경
parted /dev/mapper/mpatha
GPT
mklabel GPT
mkpart
name
0%
100%
quit
mkfs.ext4 /dev/mapper/mpathap1
Step 13. LVM 생성하기
...
Step 14. Multipath 설정 파일 점검
/etc/multipath.conf
/etc//etc/multipath/wwids
/etc/multipath/bindings
##Step 15. Multipath LUN Expand
1) 스토리지 용량 확장
2) 서버 작업
현재 상태 확인 : multipath -ll => 증설하려고 하는 LUN 정보 확인
[root@RHEL6/]# multipath -ll
mpathb (36000d3100021e800000000000000000a) dm-2 COMPELNT,Compellent Vol
size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 1:0:0:2 sdc 8:32 active ready running
|- 1:0:1:2 sde 8:64 active ready running
|- 2:0:1:2 sdi 8:128 active ready running
`- 2:0:0:2 sdg 8:96 active ready running
mpatha (36000d3100021e8000000000000000007) dm-3 COMPELNT,Compellent Vol
size=100G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 1:0:0:1 sdb 8:16 active ready running
|- 1:0:1:1 sdd 8:48 active ready running
|- 2:0:1:1 sdh 8:112 active ready running
`- 2:0:0:1 sdf 8:80 active ready running
디바이스 Rescan :
[root@RHEL6/]# echo 1 > /sys/block/sdc/device/rescan
[root@RHEL6/]# echo 1 > /sys/block/sde/device/rescan
[root@RHEL6/]# echo 1 > /sys/block/sdi/device/rescan
[root@RHEL6/]# echo 1 > /sys/block/sdg/device/rescan
Multipath device resize
[root@RHEL6/]# multipathd -k
multipathd> resize map mpathb
ok
multipathd> exit
[root@RHEL6/]#
[root@RHEL6/]# multipath -ll
mpathb (36000d3100021e800000000000000000a) dm-2 COMPELNT,Compellent Vol
size=4.0T features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 1:0:0:2 sdc 8:32 active ready running
|- 1:0:1:2 sde 8:64 active ready running
|- 2:0:1:2 sdi 8:128 active ready running
`- 2:0:0:2 sdg 8:96 active ready running
mpatha (36000d3100021e8000000000000000007) dm-3 COMPELNT,Compellent Vol
size=100G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 1:0:0:1 sdb 8:16 active ready running
|- 1:0:1:1 sdd 8:48 active ready running
|- 2:0:1:1 sdh 8:112 active ready running
`- 2:0:0:1 sdf 8:80 active ready running
[root@RHEL6/]#
Resize the File System
'Linux' 카테고리의 다른 글
CentOS 7.6 Local Repository (0) | 2019.04.22 |
---|---|
Storsimple & Linux : iSCSI - MPIO 구성 (0) | 2018.06.19 |
2TB 이상의 디스크 사용하기 (0) | 2018.06.19 |
iSCSI Mount (0) | 2018.06.18 |
vmstat 성능 수집하기 (0) | 2018.06.14 |
sysbench 사용법 (0) | 2018.02.23 |