openstack cinder-backup 설치(nfs 백엔드 사용)

| 2020년 9월 22일 | 0 Comments

오픈 스택 볼륨 서비스엔 백업을 위한 cinder-backup 서비스가 존재 합니다.

주로 오픈 스택 볼륨 서비스엔 ceph 백엔드를 많이 사용하는데 현재 사용하는 볼륨 서비스가 cinder-backup 서비스로 ceph로 구축시 증본 백업이 안되는 문제가 있습니다.

그래서 iwinv 공유 스토리지 서비스중 nfs 백엔드와 연동하여 볼륨 서비스 백업하는 cinder-backup을 설치 해보겠습니다.

 


 

  • 오픈 스택 기본 패키지 설치

root@cinder-backup:~# apt install software-properties-common

root@cinder-backup:~# add-apt-repository cloud-archive:queens
Ubuntu Cloud Archive for OpenStack Queens
More info: https://wiki.ubuntu.com/OpenStack/CloudArchive
Press [ENTER] to continue or Ctrl-c to cancel adding it.

root@cinder-backup:~# apt update && apt dist-upgrade

root@cinder-backup:~# apt install python-openstackclient

 

  • ceph 패키지 설치

root@cinder-backup:~# wget -q -O- ‘https://download.ceph.com/keys/release.asc’ | sudo apt-key add –
OK

root@cinder-backup:~# echo deb https://download.ceph.com/debian-nautilus/ $(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/ceph.list
deb https://download.ceph.com/debian-nautilus/ bionic main

root@cinder-backup:~# apt update

root@cinder-backup:~# apt install ceph-common

root@controller:~# scp /etc/ceph/* root@cinder-backup:/etc/ceph/

root@cinder-backup:~# ceph osd lspools
9 .rgw.root
10 default.rgw.control
11 default.rgw.meta
12 default.rgw.log
13 default.rgw.otp
14 default.rgw.buckets.index
15 default.rgw.buckets.data
16 default.rgw.buckets.non-ec
17 slow.rgw.buckets.index
18 slow.rgw.buckets.data
19 slow.rgw.buckets.non-ec
20 default.rgw.cold.data
21 default.rgw.gc
22 images
23 volumes

 

  • cinder-backup 관련 패키지 설치 & 설정

root@cinder-backup:~# apt install cinder-backup nfs-common nfs-kernel-server

root@cinder-backup:~# vi /etc/cinder/cinder.conf
[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper = tgtadm
volume_name_template = volume-%s
volume_group = cinder-volumes
verbose = True
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes

transport_url = rabbit://openstack:{패스워드}@controller

auth_strategy = keystone

my_ip = {아이피}

enable_force_upload = True

backup_driver = cinder.backup.drivers.nfs.NFSBackupDriver
backup_mount_point_base = $state_path/backup_nfs
backup_share = share-volumes.na.iwinv.net:{nfs 주소}

[oslo_messaging_notifications]
driver = messagingv2

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = {패스워드}

[oslo_concurrency]
lock_path = /var/lib/cinder/tmp

root@cinder-backup:~# mkdir /var/lib/cinder/backup_nfs

root@cinder-backup:~# chown cinder.cinder /var/lib/cinder/backup_nfs

 

  • 서비스 실행 & 확인

root@cinder-backup:~# systemctl restart cinder-backup.service

root@cinder-backup:~# df -Th
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 7.9G 0 7.9G 0% /dev
tmpfs tmpfs 1.6G 6.8M 1.6G 1% /run
/dev/vda1 ext4 25G 2.7G 22G 12% /
tmpfs tmpfs 7.9G 0 7.9G 0% /dev/shm
tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup
/dev/vda15 vfat 105M 3.4M 102M 4% /boot/efi
tmpfs tmpfs 1.6G 0 1.6G 0% /run/user/0
share-volumes.na.iwinv.net:/{nfs 주소} nfs4 4.9T 0 4.9T 0% /var/lib/cinder/backup_nfs/{nfs uuid}

root@controller:~# cinder service-list | grep “cinder-backup”
| cinder-backup | cinder-backup | nova | enabled | up | 2020-09-22T02:08:05.000000 | – |

Category: 가상화/클라우드

장영호

About the Author ()