OpenStack Caracal : Manila का उपयोग कैसे करें2024/05/22 |
OpenStack साझा फ़ाइल सिस्टम (Manila) का उपयोग कैसे करें यह इस प्रकार है। यह उदाहरण निम्न प्रकार से पर्यावरण पर आधारित है।
उदाहरण के लिए, स्टोरेज नोड पर एक साझा स्टोरेज के रूप में एक स्थानीय ब्लॉक डिवाइस को कॉन्फ़िगर करें और इसे इंस्टेंस पर उपयोग करें। ------------+--------------------------+--------------------------+------------ | | | 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 | | Manila Share | | | | Cinder API Manila API | | | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | संग्रहण नोड कॉन्फ़िगर करें। |
root@network:~#
apt -y install lvm2 nfs-kernel-server # निःशुल्क ब्लॉक डिवाइस पर Manila के लिए एक वॉल्यूम बनाएं root@network:~# pvcreate /dev/sdc1 Physical volume "/dev/sdc1" successfully created root@network:~# vgcreate manila-volumes /dev/sdc1 Volume group "manila-volumes" successfully created
root@network:~#
vi /etc/manila/manila.conf # [DEFAULT] अनुभाग में अनुसरण जोड़ें
enabled_share_backends = lvm
# अंत में जोड़ें [lvm] share_backend_name = LVM share_driver = manila.share.drivers.lvm.LVMShareDriver driver_handles_share_servers = False lvm_share_volume_group = manila-volumes lvm_share_export_ips = $my_ip systemctl restart manila-share nfs-server root@network:~# systemctl enable manila-share nfs-server
|
[2] | एक डिफ़ॉल्ट शेयर प्रकार बनाएँ. किसी भी नोड पर काम करना ठीक है. (नीचे उदाहरण नियंत्रण नोड पर है) |
root@dlp ~(keystone)# openstack share type create default_share_type False +----------------------+--------------------------------------+ | Field | Value | +----------------------+--------------------------------------+ | id | cdc655ee-ab12-4b13-8c50-d74702224e44 | | name | default_share_type | | visibility | public | | is_default | True | | required_extra_specs | driver_handles_share_servers : False | | optional_extra_specs | | | description | None | +----------------------+--------------------------------------+root@dlp ~(keystone)# openstack share type list +----------+----------+------------+------------+----------------------+----------------------+-------------+ | ID | Name | Visibility | Is Default | Required Extra Specs | Optional Extra Specs | Description | +----------+----------+------------+------------+----------------------+----------------------+-------------+ | cdc655ee | default_ | public | True | driver_handles_share | | None | | -ab12- | share_ty | | | _servers : False | | | | 4b13- | pe | | | | | | | 8c50- | | | | | | | | d7470222 | | | | | | | | 4e44 | | | | | | | +----------+----------+------------+------------+----------------------+----------------------+-------------+ |
[3] | Manila NFS शेयर बनाने के लिए एक सामान्य उपयोगकर्ता के रूप में लॉगिन करें। |
ubuntu@dlp ~(keystone)$ openstack share create NFS 10 --name share01 --share-type default_share_type +---------------------------------------+--------------------------------------+ | Field | Value | +---------------------------------------+--------------------------------------+ | access_rules_status | active | | availability_zone | None | | create_share_from_snapshot_support | False | | created_at | 2024-05-22T04:37:27.349014 | | description | None | | has_replicas | False | | id | fc397679-6eae-486d-980f-bbb5eff7087a | | is_public | False | | is_soft_deleted | False | | metadata | {} | | mount_snapshot_support | False | | name | share01 | | progress | None | | project_id | 18ede7365bdc430093e8fd4a90f77369 | | replication_type | None | | revert_to_snapshot_support | False | | scheduled_to_be_deleted_at | None | | share_group_id | None | | share_network_id | None | | share_proto | NFS | | share_type | cdc655ee-ab12-4b13-8c50-d74702224e44 | | share_type_name | default_share_type | | size | 10 | | snapshot_id | None | | snapshot_support | False | | source_backup_id | None | | source_share_group_snapshot_member_id | None | | status | creating | | task_state | None | | user_id | b9371d015e0d43dca74f29161448ffd2 | | volume_type | default_share_type | +---------------------------------------+--------------------------------------+ # ठीक है यदि स्थिति कुछ मिनटों के बाद [available] में बदल जाती है ubuntu@dlp ~(keystone)$ openstack share list +----------+---------+------+-------------+----------+-----------+-----------------+------+-------------------+ | ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | +----------+---------+------+-------------+----------+-----------+-----------------+------+-------------------+ | fc397679 | share01 | 10 | NFS | availabl | False | default_share_t | | nova | | -6eae- | | | | e | | ype | | | | 486d- | | | | | | | | | | 980f- | | | | | | | | | | bbb5eff7 | | | | | | | | | | 087a | | | | | | | | | +----------+---------+------+-------------+----------+-----------+-----------------+------+-------------------+ |
[4] | यह ठीक है, आप निम्न प्रकार से अपने उदाहरणों पर Manila साझा फ़ाइल सिस्टम का उपयोग कर सकते हैं। |
ubuntu@dlp ~(keystone)$ openstack server list +--------------+-------------+---------+--------------+------------+----------+ | ID | Name | Status | Networks | Image | Flavor | +--------------+-------------+---------+--------------+------------+----------+ | 7fbc24c1- | Ubuntu-2404 | SHUTOFF | private=10.0 | Ubuntu2404 | m1.small | | c0d1-43d6- | | | .0.208, 192. | | | | 87aa- | | | 168.100.130 | | | | 68df83597b57 | | | | | | +--------------+-------------+---------+--------------+------------+----------+ # पहले एक्सेस अनुमति सेट करें ubuntu@dlp ~(keystone)$ openstack share access create share01 ip 10.0.0.0/24 --access-level rw +--------------+--------------------------------------+ | Field | Value | +--------------+--------------------------------------+ | id | 4f9e6ca4-d6e7-4cb5-9c59-3fd9aeee2ae2 | | share_id | fc397679-6eae-486d-980f-bbb5eff7087a | | access_level | rw | | access_to | 10.0.0.0/24 | | access_type | ip | | state | queued_to_apply | | access_key | None | | created_at | 2024-05-22T04:39:04.207265 | | updated_at | None | | properties | | +--------------+--------------------------------------+ # यदि राज्य [active] में बदल जाए तो ठीक है ubuntu@dlp ~(keystone)$ openstack share access list share01 +----------+-------------+-----------+--------------+--------+------------+------------+------------+ | ID | Access Type | Access To | Access Level | State | Access Key | Created At | Updated At | +----------+-------------+-----------+--------------+--------+------------+------------+------------+ | 4f9e6ca4 | ip | 10.0.0.0/ | rw | active | None | 2024-05- | 2024-05- | | -d6e7- | | 24 | | | | 22T04:39:0 | 22T04:39:0 | | 4cb5- | | | | | | 4.207265 | 5.401375 | | 9c59- | | | | | | | | | 3fd9aeee | | | | | | | | | 2ae2 | | | | | | | | +----------+-------------+-----------+--------------+--------+------------+------------+------------+
ubuntu@dlp ~(keystone)$
openstack server start Ubuntu-2404 # पहुंच पथ की पुष्टि करें ubuntu@dlp ~(keystone)$ openstack share show share01 | grep path | cut -d'|' -f3 path = 10.0.0.50:/var/lib/manila/mnt/share-5b95e88a-4283-4440-844b-30e8cff01a47ubuntu@dlp ~(keystone)$ ssh ubuntu@10.0.0.208 Welcome to Ubuntu 24.04 LTS (GNU/Linux 6.8.0-31-generic x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/pro ..... ..... # माउंट Manila साझा भंडारण ubuntu@ubuntu-2404:~$ sudo mount -t nfs \ 10.0.0.50:/var/lib/manila/mnt/share-5b95e88a-4283-4440-844b-30e8cff01a47 /mnt ubuntu@ubuntu-2404:~$ df -hT Filesystem Type Size Used Avail Use% Mounted on tmpfs tmpfs 392M 1.1M 391M 1% /run /dev/vda1 ext4 8.7G 1.4G 7.3G 16% / tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock /dev/vda16 ext4 881M 61M 758M 8% /boot /dev/vda15 vfat 105M 6.1M 99M 6% /boot/efi tmpfs tmpfs 392M 12K 392M 1% /run/user/1001 10.0.0.50:/var/lib/manila/mnt/share-5b95e88a-4283-4440-844b-30e8cff01a47 nfs4 9.8G 0 9.3G 0% /mnt |
Sponsored Link |
|