Ubuntu 24.04
Sponsored Link

OpenStack Caracal : Cinder बैकअप सेवा2024/05/22

 

Cinder ब्लॉक स्टोरेज के लिए Cinder बैकअप सेवा कॉन्फ़िगर करें।

यह उदाहरण बैकअप स्टोरेज के लिए NFS बैकएंड को कॉन्फ़िगर करना दिखाता है।
अन्य बैकएंड के लिए, GlusterFS, Ceph, Object Storage(Swift), और अन्य को कॉन्फ़िगर करना संभव है।

------------+--------------------------+--------------------------+------------
            |                          |                          |
        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  |  |  Neutron L2/L3 Agent  |  |        Libvirt        |
|  Memcached  Nginx     |  |   Neutron Metadata    |  |      Nova Compute     |
|  Keystone   httpd     |  |     Open vSwitch      |  |    Neutron L2 Agent   |
|  Glance     Nova API  |  |     iSCSI Target      |  |      Open vSwitch     |
|  Neutron Server       |  |     Cinder Volume     |  |                       |
|  Neutron Metadata     |  |     Cinder Backup     |  |                       |
|  Cinder API           |  |                       |  |                       |
+-----------------------+  +-----------------------+  +-----------------------+

-----------+-------------------------------------------------------------------
       eth0|10.0.0.35
+----------+-----------+
|   [ nfs.srv.world ]  |
|       NFS Server     |
+----------------------+

[1]

NFS सर्वर का आपके स्थानीय नेटवर्क पर चलना आवश्यक है, यहां देखें
इस उदाहरण पर, [nfs.srv.world] पर [/var/lib/cinder-backup] निर्देशिका को बैकअप निर्देशिका के रूप में कॉन्फ़िगर करें।

[2] संग्रहण नोड कॉन्फ़िगर करें।
root@network:~#
apt -y install cinder-backup nfs-common
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 restart cinder-backup

root@network:~#
chown -R cinder:cinder /var/lib/cinder/backup_nfs

[3] अपने Cinder वॉल्यूम के लिए बैकअप प्राप्त करें। किसी भी नोड पर काम करना ठीक है. (नीचे उदाहरण नियंत्रण नोड पर है)
ubuntu@dlp ~(keystone)$
openstack volume list

+----------------------------------+----------+-----------+------+-------------+
| ID                               | Name     | Status    | Size | Attached to |
+----------------------------------+----------+-----------+------+-------------+
| 049a641b-4340-4158-bace-         | disk-nfs | available |   10 |             |
| 139533f7a759                     |          |           |      |             |
| 142acb22-d62a-4307-b31f-         | disk-lvm | available |   10 |             |
| d0cdfa357b45                     |          |           |      |             |
+----------------------------------+----------+-----------+------+-------------+

# [disk-nfs] के लिए नए नाम [bk-disk-nfs] के रूप में एक बैकअप बनाएं

ubuntu@dlp ~(keystone)$
openstack volume backup create --name bk-disk-nfs disk-nfs

+-----------+--------------------------------------+
| Field     | Value                                |
+-----------+--------------------------------------+
| id        | c8c506e3-4120-4a7d-8808-afdd2c000b56 |
| name      | bk-disk-nfs                          |
| volume_id | 049a641b-4340-4158-bace-139533f7a759 |
+-----------+--------------------------------------+

# निर्माण के दौरान, [Status] है [creating]

ubuntu@dlp ~(keystone)$
openstack volume backup list

+--------------+-------------+-------------+----------+------+-------------+
| ID           | Name        | Description | Status   | Size | Incremental |
+--------------+-------------+-------------+----------+------+-------------+
| c8c506e3-    | bk-disk-nfs | None        | creating |   10 | False       |
| 4120-4a7d-   |             |             |          |      |             |
| 8808-        |             |             |          |      |             |
| afdd2c000b56 |             |             |          |      |             |
+--------------+-------------+-------------+----------+------+-------------+

# निर्माण समाप्त करने के बाद, [Status] [available] में बदल जाता है

ubuntu@dlp ~(keystone)$
openstack volume backup list

+--------------+-------------+-------------+-----------+------+-------------+
| ID           | Name        | Description | Status    | Size | Incremental |
+--------------+-------------+-------------+-----------+------+-------------+
| c8c506e3-    | bk-disk-nfs | None        | available |   10 | False       |
| 4120-4a7d-   |             |             |           |      |             |
| 8808-        |             |             |           |      |             |
| afdd2c000b56 |             |             |           |      |             |
+--------------+-------------+-------------+-----------+------+-------------+
[4] यदि लक्ष्य भंडारण की कोई बैकअप फ़ाइल है जिसे आप बैकअप प्राप्त करना चाहते हैं, तो वृद्धिशील बैकअप प्राप्त करना संभव है।
इसके अलावा, यदि लक्ष्य भंडारण जिसे आप बैकअप प्राप्त करना चाहते हैं, अब एक इंस्टेंस पर संलग्न है, तो बलपूर्वक बैकअप प्राप्त करने के लिए [--force] विकल्प निर्दिष्ट करें।
ubuntu@dlp ~(keystone)$
openstack volume backup list

+--------------+-------------+-------------+-----------+------+-------------+
| ID           | Name        | Description | Status    | Size | Incremental |
+--------------+-------------+-------------+-----------+------+-------------+
| c8c506e3-    | bk-disk-nfs | None        | available |   10 | False       |
| 4120-4a7d-   |             |             |           |      |             |
| 8808-        |             |             |           |      |             |
| afdd2c000b56 |             |             |           |      |             |
+--------------+-------------+-------------+-----------+------+-------------+

ubuntu@dlp ~(keystone)$
openstack volume list

+----------------------------------+----------+-----------+------+-------------+
| ID                               | Name     | Status    | Size | Attached to |
+----------------------------------+----------+-----------+------+-------------+
| 049a641b-4340-4158-bace-         | disk-nfs | available |   10 |             |
| 139533f7a759                     |          |           |      |             |
| 142acb22-d62a-4307-b31f-         | disk-lvm | available |   10 |             |
| d0cdfa357b45                     |          |           |      |             |
+----------------------------------+----------+-----------+------+-------------+

ubuntu@dlp ~(keystone)$
openstack volume backup create --name bk-disk-nfs-01 --incremental --force disk-nfs

+-----------+--------------------------------------+
| Field     | Value                                |
+-----------+--------------------------------------+
| id        | 685e818b-0b24-4d3b-8f08-60b8ebe782e0 |
| name      | bk-disk-nfs-01                       |
| volume_id | 049a641b-4340-4158-bace-139533f7a759 |
+-----------+--------------------------------------+

ubuntu@dlp ~(keystone)$
openstack volume backup list

+--------------+--------------+-------------+-----------+------+-------------+
| ID           | Name         | Description | Status    | Size | Incremental |
+--------------+--------------+-------------+-----------+------+-------------+
| 685e818b-    | bk-disk-     | None        | available |   10 | False       |
| 0b24-4d3b-   | nfs-01       |             |           |      |             |
| 8f08-        |              |             |           |      |             |
| 60b8ebe782e0 |              |             |           |      |             |
| c8c506e3-    | bk-disk-nfs  | None        | available |   10 | False       |
| 4120-4a7d-   |              |             |           |      |             |
| 8808-        |              |             |           |      |             |
| afdd2c000b56 |              |             |           |      |             |
+--------------+--------------+-------------+-----------+------+-------------+
[5] बैकअप से पुनर्स्थापित करने के लिए, निम्नानुसार कमांड चलाएँ।
पुनर्स्थापित करने के लिए, लक्ष्य वॉल्यूम को किसी भी उदाहरण से अलग किया जाना चाहिए।
ubuntu@dlp ~(keystone)$
openstack volume backup list

+--------------+--------------+-------------+-----------+------+-------------+
| ID           | Name         | Description | Status    | Size | Incremental |
+--------------+--------------+-------------+-----------+------+-------------+
| 685e818b-    | bk-disk-     | None        | available |   10 | False       |
| 0b24-4d3b-   | nfs-01       |             |           |      |             |
| 8f08-        |              |             |           |      |             |
| 60b8ebe782e0 |              |             |           |      |             |
| c8c506e3-    | bk-disk-nfs  | None        | available |   10 | False       |
| 4120-4a7d-   |              |             |           |      |             |
| 8808-        |              |             |           |      |             |
| afdd2c000b56 |              |             |           |      |             |
+--------------+--------------+-------------+-----------+------+-------------+

ubuntu@dlp ~(keystone)$
openstack volume list

+----------------------------------+----------+-----------+------+-------------+
| ID                               | Name     | Status    | Size | Attached to |
+----------------------------------+----------+-----------+------+-------------+
| 049a641b-4340-4158-bace-         | disk-nfs | available |   10 |             |
| 139533f7a759                     |          |           |      |             |
| 142acb22-d62a-4307-b31f-         | disk-lvm | available |   10 |             |
| d0cdfa357b45                     |          |           |      |             |
+----------------------------------+----------+-----------+------+-------------+

# पुनर्स्थापना चलाएँ

ubuntu@dlp ~(keystone)$
openstack volume backup restore bk-disk-nfs-01 disk-nfs-restore


# पुनर्स्थापना के दौरान, स्थिति है [restoreing-backup]

ubuntu@dlp ~(keystone)$
openstack volume list

+------------------+------------------+------------------+------+-------------+
| ID               | Name             | Status           | Size | Attached to |
+------------------+------------------+------------------+------+-------------+
| 0e0ac6ed-a037-   | disk-nfs-restore | restoring-backup |   10 |             |
| 42e6-ab53-       |                  |                  |      |             |
| 05750d49299b     |                  |                  |      |             |
| 049a641b-4340-   | disk-nfs         | available        |   10 |             |
| 4158-bace-       |                  |                  |      |             |
| 139533f7a759     |                  |                  |      |             |
| 142acb22-d62a-   | disk-lvm         | available        |   10 |             |
| 4307-b31f-       |                  |                  |      |             |
| d0cdfa357b45     |                  |                  |      |             |
+------------------+------------------+------------------+------+-------------+

# पुनर्स्थापना समाप्त करने के बाद, स्थिति [available] में बदल जाती है

ubuntu@dlp ~(keystone)$
openstack volume list

+----------------------+------------------+-----------+------+-------------+
| ID                   | Name             | Status    | Size | Attached to |
+----------------------+------------------+-----------+------+-------------+
| 0e0ac6ed-a037-42e6-  | disk-nfs-restore | available |   10 |             |
| ab53-05750d49299b    |                  |           |      |             |
| 049a641b-4340-4158-  | disk-nfs         | available |   10 |             |
| bace-139533f7a759    |                  |           |      |             |
| 142acb22-d62a-4307-  | disk-lvm         | available |   10 |             |
| b31f-d0cdfa357b45    |                  |           |      |             |
+----------------------+------------------+-----------+------+-------------+
मिलान सामग्री