본문 바로가기
Tech/Linux

NFS와 SMB를 동시 지원하는 Oracle Storage Appliance

by 타이호 2020. 4. 20.
반응형

CIFS와 NFS 둘다 사용하기 위해서 솔루션을 찾아보던 중 Oracle Storage Appliance라는 것이 지원한다고 해서 구성해 본다.

 

1. Oracle Storage Appliance

오라클 클라우드의 Market Place에서 손 쉽게 생성 할 수 있다. (On-Premise환경에서도 사용 가능할 듯)

Oracle Linux Storage Appliance 1.8을 선택하고 들어가서 사용할 Compartment를 고른 뒤 Launch를 하면

기존에 VM을 생성하듯 만들 수 있다.

2. Storage Appliance 설정

  • 이 Storage Appliance가 좋은 점은 리눅스에서 명령어로 제어하는 것이 아니라 GUI를 통해 설정 등을 할 수 있는 점이다.
  • https://<VM_IP> 로 접속하면 아래와 같은 화면이 나오고 비밀번호를 설정한다.

  • 비밀번호를 설정 한 다음 로그인 화면으로 전환된다

  • Volume을 생성하지 않았기 때문에 아래와 같이 아무것도 없는 화면을 볼 수 있다.

3. Storage Appliance의 Volume 설정

  • Block Storage를 생성해서 해당 VM에 Attach를 한다. 볼륨은 storage로 사용할 것이기 때문에 제일 저렴한 것으로 성능을 설정한다.(이번에 나온 기능임!!)

  • Compute 화면에서 생성한 Block Volume을 attach 한다

  • VM으로 들어가서 생성한 Block volume을 마운트 한다. 마운트는 콘솔 화면에서 iSCSI Commands & Information을 선택하면 명령어가 나오는데 서버에 접속하여 복사해서 붙여 넣으면 된다.

  • 다시 Appliance 웹 화면에서 리프레쉬를 하면 아래와 같이 적용된 block 볼륨이 나타난다.

  • Volume Pool 생성

생성하고 나면 아래와 같이 관리 Dashboard가 나타난다.

4. SMB Access 하기

  • SMB Export 생성

  • 계정 생성 : smbuser1이라는 계정을 생성하고 비밀번호를 생성한다.

  • 그리고 나서 smbuser에 추가한다.

  • Ubuntu에서 SMB 마운트 하기

     

sudo apt-get install cifs-utils
sudo mkdir /mnt/smbshare
sudo mount -t cifs -o user=smbuser1 //<oracle_storage_appliance>/<export_share> /mnt/<local_share>

  • 마운트 하고 나면 아래와 같이 확인할 수 있다.

  • 참고로 Security List에 포트 445(SMB)를 오픈해야 한다.

스토리지 추가

기존에 1개였던 Block 볼륨에 추가로 하나 더 Attach한다.

그리고 iscsi로 Oracle Storage Appliance VM에서 볼륨을 붙인다.

스토리지 용량 확장

Block Volume을 Attach해서 공유 File Storage로 사용하기 때문에 용량을 늘이고 테스트를 해본다.

순서는 Oracle Linux Storage Appliance를 정지하고, 붙어 있는 볼륨을 detach 한 다음 볼륨을 resize한다. 그리고 나서 다시 attach 한 뒤 VM에 접속하여 PV(Physical Volume)을 resize한 용량 만큼 늘려주면 된다.

스토리지 2개 붙여보기

Oracle Linux Storage Appliance Instance에 Block volume 2개를 Attatch한다.

[opc@instance-20200220-1429 ~]$ sudo fdisk -l
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.

Disk /dev/sda: 50.0 GB, 50010783744 bytes, 97677312 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes
Disk label type: gpt
Disk identifier: A39982D6-1653-4409-81BF-FA642FBEFF63


#         Start          End    Size  Type            Name
 1         2048       411647    200M  EFI System      EFI System Partition
 2       411648     17188863      8G  Linux swap
 3     17188864     97675263   38.4G  Microsoft basic

Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes


Disk /dev/mapper/lsa-__lsa: 67 MB, 67108864 bytes, 131072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes


Disk /dev/sdc: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 1048576 bytes

 

용량 다른 디스크 두개를 선택을 하고 하나의 스토리지를 생성한다.

[root@instance-20200220-1429 ~]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sdb
  VG Name               lsa
  PV Size               50.00 GiB / not usable 4.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              12799
  Free PE               12783
  Allocated PE          16
  PV UUID               276OtP-aNeq-ERkA-ooXk-jMfW-3gNc-sp8Fet

  --- Physical volume ---
  PV Name               /dev/sdc
  VG Name               lsa
  PV Size               100.00 GiB / not usable 4.00 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              25599
  Free PE               25599
  Allocated PE          0
  PV UUID               W94lCv-mgOh-E086-zpRZ-ZvK5-Fiwp-J2ucop

[root@instance-20200220-1429 ~]# vgdisplay
  --- Volume group ---
  VG Name               lsa
  System ID
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               149.99 GiB
  PE Size               4.00 MiB
  Total PE              38398
  Alloc PE / Size       16 / 64.00 MiB
  Free  PE / Size       38382 / <149.93 GiB
  VG UUID               66If72-Y4PV-87kN-pLzg-27Jx-nd1u-06eYD0

[root@instance-20200220-1429 ~]# lvdisplay
  --- Logical volume ---
  LV Path                /dev/lsa/__lsa
  LV Name                __lsa
  VG Name                lsa
  LV UUID                X8jgNC-99xV-lh30-Dd0A-6Apn-XTpe-xHtlOr
  LV Write Access        read/write
  LV Creation host, time instance-20200220-1429, 2020-02-20 06:05:02 +0000
  LV Status              available
  # open                 1
  LV Size                64.00 MiB
  Current LE             16
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:0

 

반응형