OpenStack Caracal : Cinder バックアップサービスを利用2024/08/07 |
Cinder が提供するブロックストレージのバックアップサービスを設定します。
当例ではバックアップ用ストレージのバックエンドとして NFS を利用します。 ------------+--------------------------+--------------------------+------------ | | | eth0|10.0.0.30 eth0|10.0.0.50 eth0|10.0.0.51 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [ dlp.srv.world ] | | [ network.srv.world ] | | [ node01.srv.world ] | | (Control Node) | | (Network Node) | | (Compute Node) | | | | | | | | MariaDB RabbitMQ | | Open vSwitch | | Libvirt | | Memcached Nginx | | Neutron Server | | Nova Compute | | Keystone httpd | | OVN-Northd | | Open vSwitch | | Glance Nova API | | Nginx iSCSI Target | | OVN Metadata Agent | | Cinder API | | Cinder Volume/Backup | | OVN-Controller | +-----------------------+ +-----------------------+ +-----------------------+ -----------+------------------------------------------------------------------- eth0|10.0.0.35 +----------+-----------+ | [ nfs.srv.world ] | | NFS Server | +----------------------+ |
[1] |
こちらを参考に、ローカルネットワーク内に NFS サーバーを稼働させておきます。 |
[2] | Storage ノードの設定です。 |
[root@network ~]#
dnf -y install nfs-utils
[root@network ~]#
vi /etc/idmapd.conf # 5行目 : コメント解除して自ドメイン名に変更 Domain = srv.world
[root@network ~]#
vi /etc/cinder/cinder.conf # [DEFAULT] セクション内の任意の場所へ追記
backup_driver = cinder.backup.drivers.nfs.NFSBackupDriver
backup_mount_point_base = $state_path/backup_nfs backup_share = nfs.srv.world:/var/lib/cinder-backup
[root@network ~]#
systemctl enable --now openstack-cinder-backup [root@network ~]# chown -R cinder:cinder /var/lib/cinder/backup_nfs
# Firewalld 稼働中の場合はサービス許可 [root@network ~]# firewall-cmd --add-service=nfs [root@network ~]# firewall-cmd --runtime-to-permanent |
[3] | 任意のユーザーで自身が所有するボリュームのバックアップを取得します。作業場所はどこでもよいですが、当例では Control ノード上で行います。 |
[cent@dlp ~(keystone)]$ openstack volume list +--------------------------------------+----------+-----------+------+-------------+ | ID | Name | Status | Size | Attached to | +--------------------------------------+----------+-----------+------+-------------+ | 66fc2bf2-4169-4935-9a16-f58d43bd93a1 | disk-nfs | available | 10 | | | 8beeb472-0a18-47c7-9b9b-20bca739e628 | disk-lvm | available | 10 | | +--------------------------------------+----------+-----------+------+-------------+ # [disk-nfs] のバックアップを [bk-disk-nfs] という名称で作成 [cent@dlp ~(keystone)]$ openstack volume backup create --name bk-disk-nfs disk-nfs +-----------+--------------------------------------+ | Field | Value | +-----------+--------------------------------------+ | id | 6875a938-8beb-4e10-a567-5951da6b3f64 | | name | bk-disk-nfs | | volume_id | 66fc2bf2-4169-4935-9a16-f58d43bd93a1 | +-----------+--------------------------------------+ # 作成中は [Status] が [creating] 状態 [cent@dlp ~(keystone)]$ openstack volume backup list +--------------------------------------+-------------+-------------+----------+------+-------------+ | ID | Name | Description | Status | Size | Incremental | +--------------------------------------+-------------+-------------+----------+------+-------------+ | 6875a938-8beb-4e10-a567-5951da6b3f64 | bk-disk-nfs | None | creating | 10 | False | +--------------------------------------+-------------+-------------+----------+------+-------------+ # 作成完了すると [Status] が [available] となる [cent@dlp ~(keystone)]$ openstack volume backup list +--------------------------------------+-------------+-------------+-----------+------+-------------+ | ID | Name | Description | Status | Size | Incremental | +--------------------------------------+-------------+-------------+-----------+------+-------------+ | 6875a938-8beb-4e10-a567-5951da6b3f64 | bk-disk-nfs | None | available | 10 | False | +--------------------------------------+-------------+-------------+-----------+------+-------------+ |
[4] | バックアップ対象ボリュームのバックアップがすでに存在する場合、インクリメンタルバックアップが利用できます。 また、バックアップ対象のボリュームが特定のインスタンスにアタッチされている場合は、[--force] オプションを付加することでバックアップ実行可能です。 |
[cent@dlp ~(keystone)]$ openstack volume backup list +--------------------------------------+-------------+-------------+-----------+------+-------------+ | ID | Name | Description | Status | Size | Incremental | +--------------------------------------+-------------+-------------+-----------+------+-------------+ | 6875a938-8beb-4e10-a567-5951da6b3f64 | bk-disk-nfs | None | available | 10 | False | +--------------------------------------+-------------+-------------+-----------+------+-------------+[cent@dlp ~(keystone)]$ openstack volume list +--------------------------------------+----------+-----------+------+-------------+ | ID | Name | Status | Size | Attached to | +--------------------------------------+----------+-----------+------+-------------+ | 66fc2bf2-4169-4935-9a16-f58d43bd93a1 | disk-nfs | available | 10 | | | 8beeb472-0a18-47c7-9b9b-20bca739e628 | disk-lvm | available | 10 | | +--------------------------------------+----------+-----------+------+-------------+[cent@dlp ~(keystone)]$ openstack volume backup create --name bk-disk-nfs-01 --incremental --force disk-nfs +-----------+--------------------------------------+ | Field | Value | +-----------+--------------------------------------+ | id | 3412da29-2d65-4ca9-9568-e8cf711884ca | | name | bk-disk-nfs-01 | | volume_id | 66fc2bf2-4169-4935-9a16-f58d43bd93a1 | +-----------+--------------------------------------+[cent@dlp ~(keystone)]$ openstack volume backup list +--------------------------------------+----------------+-------------+-----------+------+-------------+ | ID | Name | Description | Status | Size | Incremental | +--------------------------------------+----------------+-------------+-----------+------+-------------+ | 3412da29-2d65-4ca9-9568-e8cf711884ca | bk-disk-nfs-01 | None | available | 10 | False | | 6875a938-8beb-4e10-a567-5951da6b3f64 | bk-disk-nfs | None | available | 10 | False | +--------------------------------------+----------------+-------------+-----------+------+-------------+ |
[5] | バックアップボリュームのリストアです。 リストア時はリストア対象ボリュームがインスタンスからデタッチされている必要があります。 |
[cent@dlp ~(keystone)]$ openstack volume backup list +--------------------------------------+----------------+-------------+-----------+------+-------------+ | ID | Name | Description | Status | Size | Incremental | +--------------------------------------+----------------+-------------+-----------+------+-------------+ | 3412da29-2d65-4ca9-9568-e8cf711884ca | bk-disk-nfs-01 | None | available | 10 | False | | 6875a938-8beb-4e10-a567-5951da6b3f64 | bk-disk-nfs | None | available | 10 | False | +--------------------------------------+----------------+-------------+-----------+------+-------------+[cent@dlp ~(keystone)]$ openstack volume list +--------------------------------------+----------+-----------+------+-------------+ | ID | Name | Status | Size | Attached to | +--------------------------------------+----------+-----------+------+-------------+ | 66fc2bf2-4169-4935-9a16-f58d43bd93a1 | disk-nfs | available | 10 | | | 8beeb472-0a18-47c7-9b9b-20bca739e628 | disk-lvm | available | 10 | | +--------------------------------------+----------+-----------+------+-------------+ # リストア実行 [cent@dlp ~(keystone)]$ openstack volume backup restore bk-disk-nfs-01 disk-nfs_restored # リストア中は [restoring-backup] ステータス [cent@dlp ~(keystone)]$ openstack volume list +--------------------------------------+-------------------+------------------+------+-------------+ | ID | Name | Status | Size | Attached to | +--------------------------------------+-------------------+------------------+------+-------------+ | d2176143-7468-4480-8263-1d168659b185 | disk-nfs_restored | restoring-backup | 10 | | | 66fc2bf2-4169-4935-9a16-f58d43bd93a1 | disk-nfs | available | 10 | | | 8beeb472-0a18-47c7-9b9b-20bca739e628 | disk-lvm | available | 10 | | +--------------------------------------+-------------------+------------------+------+-------------+ # リストア完了すると [available] ステータスになる [cent@dlp ~(keystone)]$ openstack volume list +--------------------------------------+-------------------+-----------+------+-------------+ | ID | Name | Status | Size | Attached to | +--------------------------------------+-------------------+-----------+------+-------------+ | d2176143-7468-4480-8263-1d168659b185 | disk-nfs_restored | available | 10 | | | 66fc2bf2-4169-4935-9a16-f58d43bd93a1 | disk-nfs | available | 10 | | | 8beeb472-0a18-47c7-9b9b-20bca739e628 | disk-lvm | available | 10 | | +--------------------------------------+-------------------+-----------+------+-------------+ |
Sponsored Link |
|