{"id":3683,"date":"2022-01-17T17:09:43","date_gmt":"2022-01-17T17:09:43","guid":{"rendered":"https:\/\/wiki.thomasandsofia.com\/?p=3683"},"modified":"2022-01-17T22:48:23","modified_gmt":"2022-01-17T22:48:23","slug":"openstack-essentials-11-12","status":"publish","type":"post","link":"https:\/\/wiki.thomasandsofia.com\/?p=3683","title":{"rendered":"OpenStack Essentials 11 \u2013 12"},"content":{"rendered":"<h1>Section 11: Block Storage Service &#8211; Cinder<\/h1>\n<h2>35. Overview of Storage in Openstack<\/h2>\n<p>https:\/\/www.udemy.com\/course\/openstack\/learn\/lecture\/6729394#overview<\/p>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/storage-types.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3681\" src=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/storage-types.png\" alt=\"\" width=\"1261\" height=\"550\" srcset=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/storage-types.png 1261w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/storage-types-300x131.png 300w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/storage-types-1024x447.png 1024w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/storage-types-768x335.png 768w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/storage-types-150x65.png 150w\" sizes=\"auto, (max-width: 1261px) 100vw, 1261px\" \/><\/a><\/p>\n<h3>Ephemeral<\/h3>\n<ul>\n<li>Type: Block<\/li>\n<li>VM File systems<\/li>\n<li>Persistent across reboots<\/li>\n<li>Deleted when the VM is destroyed<\/li>\n<\/ul>\n<h3>Block<\/h3>\n<ul>\n<li>Type: Block<\/li>\n<li>Persistent<\/li>\n<li>Can only be attached to a single instance at a time\n<ul>\n<li>But can be unmounted and remounted to another instance<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Object<\/h3>\n<ul>\n<li>Type: Object<\/li>\n<li>Used for storing binary objects (files, etc.)\n<ul>\n<li>Like S3 or DropBox<\/li>\n<\/ul>\n<\/li>\n<li>Managed by Swift<\/li>\n<li>Images are stored as Objects<\/li>\n<\/ul>\n<h3>Shared File system<\/h3>\n<ul>\n<li>Good for sharing file systems in a multi-tenant environment<\/li>\n<li>Can be mounted on multiple instances at the same time.<\/li>\n<li>Managed by the Manilla project<\/li>\n<\/ul>\n<h1>36. Cinder &#8211; Introduction and Capabilities<\/h1>\n<p>https:\/\/www.udemy.com\/course\/openstack\/learn\/lecture\/6729402#overview<\/p>\n<h3>Cinder Block Storage<\/h3>\n<ul>\n<li>Persistent block level storage devices for use with compute instances<\/li>\n<li>Block device lifecycle management<\/li>\n<li>One to one relationship between instances\n<ul>\n<li>Like a usb drive.<\/li>\n<li>Can only be in one server at a time<\/li>\n<li>but can be moved.<\/li>\n<\/ul>\n<\/li>\n<li>managed snapshots<\/li>\n<li>Managed volume types\n<ul>\n<li>Mostly Linux LVM<\/li>\n<li>Others available<\/li>\n<\/ul>\n<\/li>\n<li>Fully integrated into Nova and Horizon allowing self service.\n<ul>\n<li>create. resize, migrate, delete, etc.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Volumes<\/h3>\n<ul>\n<li>Persistent R\/W block storage<\/li>\n<li>Attach as secondary volumes\n<ul>\n<li>Good for Databases<\/li>\n<\/ul>\n<\/li>\n<li>Can be used as root volumes to boot instances<\/li>\n<li>Lifecycle management\n<ul>\n<li>Create, delete, extend<\/li>\n<li>Attach \/ detach<\/li>\n<\/ul>\n<\/li>\n<li>Manages volume management<\/li>\n<\/ul>\n<h3>Snapshots<\/h3>\n<ul>\n<li>Read only copy of a volume<\/li>\n<li>Create \/ delete snapshots<\/li>\n<li>Create a volume out of snapshot<\/li>\n<li>An instance can use a snapshot as a boot source<\/li>\n<\/ul>\n<h3>Backup<\/h3>\n<ul>\n<li>Admin operation<\/li>\n<li>Done from CLI<\/li>\n<li>Stored in Swift\n<ul>\n<li>Needs a container<\/li>\n<\/ul>\n<\/li>\n<li>Create\/restore<\/li>\n<li>`cinder backup-create &#8220;volumeid&#8221;`<\/li>\n<\/ul>\n<h3>Quotas<\/h3>\n<ul>\n<li>Enforced per project\n<ul>\n<li>Number of volumes<\/li>\n<li>storage space in GB<\/li>\n<li>Number of Snapshots<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>37. Cinder Architecture<\/h2>\n<p>https:\/\/www.udemy.com\/course\/openstack\/learn\/lecture\/6729408#overview<\/p>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/cinder-architecture.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3688\" src=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/cinder-architecture.png\" alt=\"\" width=\"839\" height=\"550\" srcset=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/cinder-architecture.png 839w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/cinder-architecture-300x197.png 300w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/cinder-architecture-768x503.png 768w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/cinder-architecture-150x98.png 150w\" sizes=\"auto, (max-width: 839px) 100vw, 839px\" \/><\/a><\/p>\n<h3>Example of Data and Control Traffic for Cinder<\/h3>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/cinder-data-control-example.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3689\" src=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/cinder-data-control-example.png\" alt=\"\" width=\"806\" height=\"550\" srcset=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/cinder-data-control-example.png 806w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/cinder-data-control-example-300x205.png 300w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/cinder-data-control-example-768x524.png 768w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/cinder-data-control-example-150x102.png 150w\" sizes=\"auto, (max-width: 806px) 100vw, 806px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>38. Managing Cinder from CLI<\/h2>\n<p>https:\/\/www.udemy.com\/course\/openstack\/learn\/lecture\/6738324#overview<\/p>\n<h3>Cinder direct commands<\/h3>\n<pre>cinder service-list\r\ncinder service-disable\r\ncinder service-enable<\/pre>\n<h3>Openstack Unified Client commands<\/h3>\n<pre>openstack command list | grep openstack.volume -A 40<\/pre>\n<ul>\n<li>backup (create \/ delete \/ list \/ restore\/ set \/ show)\n<ul>\n<li>Deprecated for volume backup commands<\/li>\n<\/ul>\n<\/li>\n<li>consistency group<\/li>\n<li>volume backup (create \/ delete \/ list \/ restore\/ set \/ show)<\/li>\n<li>volume (create \/ delete \/ host set \/ list \/ migrate \/ set \/ show)<\/li>\n<li>volume qos *\n<ul>\n<li>Limit iops and writes per second<\/li>\n<\/ul>\n<\/li>\n<li>volume service (list \/ set)<\/li>\n<li>volume snapshot (create \/ delete \/ list \/ set \/ show \/ unset)<\/li>\n<li>volume transfer request accept<\/li>\n<li>volume type (create \/ delete \/ list \/ restore\/ set \/ show)\n<ul>\n<li>Logical constructs<\/li>\n<li>Example can create volume type for top performance for SSD<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Create Volume<\/h3>\n<pre>openstack volume create --size &lt;GB&gt; &lt;name&gt;<\/pre>\n<h3>Attach<\/h3>\n<ul>\n<li>Can be attached on the fly!<\/li>\n<\/ul>\n<h1>Section 12: Object Storage Service &#8211; Swift<\/h1>\n<h2>39. Introduction to Swift Object Storage Service<\/h2>\n<p>https:\/\/www.udemy.com\/course\/openstack\/learn\/lecture\/6731472#overview<\/p>\n<h3>Swift Object Overview<\/h3>\n<ul>\n<li>Scalable, distributed, replicated object storage<\/li>\n<li>Simple, powerful REST API\n<ul>\n<li>HTTP<\/li>\n<\/ul>\n<\/li>\n<li>Supports many users<\/li>\n<li>Pooled Storage capacity<\/li>\n<\/ul>\n<h3>What is an Object<\/h3>\n<ul>\n<li>File<\/li>\n<li>Metadata\n<ul>\n<li>tags<\/li>\n<li>location<\/li>\n<li>anything else<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Why Swift<\/p>\n<ul>\n<li>Accessible from almost everywhere<\/li>\n<li>Pure software based<\/li>\n<\/ul>\n<h2>40. Characteristics of Swift<\/h2>\n<p>https:\/\/www.udemy.com\/course\/openstack\/learn\/lecture\/6731476#overview<\/p>\n<h3>Data Consistency<\/h3>\n<ul>\n<li>Strict consistency (Block)\n<ul>\n<li>All replicas are written to completion in all regions and zones before the write operation is considered successful<\/li>\n<li>Failure to write ANY replicas \/ parity results in a failed transaction<\/li>\n<\/ul>\n<\/li>\n<li>Eventual Consistency (object)\n<ul>\n<li>All replicas written at the same time but only most (&gt;50%) needed to be declared successful<\/li>\n<li>Failed replicas handed separately<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Durability with Replicas<\/h3>\n<ul>\n<li>Swift stored multiple replicas<\/li>\n<li>3 replicas is default\n<ul>\n<li>Good balance between durability and cost<\/li>\n<li>Can be changed<\/li>\n<\/ul>\n<\/li>\n<li>Stores Md5 checksums with each object\n<ul>\n<li>returned in header so client can verify<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Data Placement<\/h3>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/swift-data.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3691\" src=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/swift-data.png\" alt=\"\" width=\"1082\" height=\"500\" srcset=\"https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/swift-data.png 1082w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/swift-data-300x139.png 300w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/swift-data-1024x473.png 1024w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/swift-data-768x355.png 768w, https:\/\/wiki.thomasandsofia.com\/wp-content\/uploads\/2022\/01\/swift-data-150x69.png 150w\" sizes=\"auto, (max-width: 1082px) 100vw, 1082px\" \/><\/a><\/p>\n<ul>\n<li>Tries to be as far away as possible<\/li>\n<\/ul>\n<h2>41. Swift Architecture<\/h2>\n<p>https:\/\/www.udemy.com\/course\/openstack\/learn\/lecture\/6731478#overview<\/p>\n<h3>Swift API<\/h3>\n<ul>\n<li>PUT and GET<\/li>\n<li>Can even use a web browser<\/li>\n<\/ul>\n<h3>Components<\/h3>\n<ul>\n<li>Can be load balanced<\/li>\n<li>Proxy<\/li>\n<li>Account Service<\/li>\n<li>Container Service<\/li>\n<li>Object Service<\/li>\n<li>Replication and consistency tools<\/li>\n<\/ul>\n<h2>42. Managing Swift from CLI<\/h2>\n<p>https:\/\/www.udemy.com\/course\/openstack\/learn\/lecture\/6738326#overview<\/p>\n<p>Can be deployed on an Openstack cluster or even stand alone.\u00a0 Does not require Openstack to function.<\/p>\n<h3>View object storage accounts<\/h3>\n<pre>openstack object store account show\r\n+------------+---------------------------------------+\r\n| Field      | Value                                 |\r\n+------------+---------------------------------------+\r\n| Account    | AUTH_a5444c1b501c4bc882871fbdc93e883f |\r\n| Bytes      | 0                                     |\r\n| Containers | 0                                     |\r\n| Objects    | 0                                     |\r\n+------------+---------------------------------------+\r\n<\/pre>\n<h3>List containers<\/h3>\n<pre>openstack container list\r\n&lt; empty &gt;\r\n<\/pre>\n<p>Create 2 containers<\/p>\n<pre>openstack container create container1\r\n+---------------------------------------+------------+------------------------------------+\r\n| account                               | container  | x-trans-id                         |\r\n+---------------------------------------+------------+------------------------------------+\r\n| AUTH_a5444c1b501c4bc882871fbdc93e883f | container1 | txfb49336776ee4fcc84928-0061e5eed7 |\r\n+---------------------------------------+------------+------------------------------------+\r\n\r\nopenstack container create container2\r\n+---------------------------------------+------------+------------------------------------+\r\n| account                               | container  | x-trans-id                         |\r\n+---------------------------------------+------------+------------------------------------+\r\n| AUTH_a5444c1b501c4bc882871fbdc93e883f | container2 | tx9da0771e5eef45b2bb333-0061e5ef40 |\r\n+---------------------------------------+------------+------------------------------------+\r\n\r\nopenstack container list\r\n+------------+\r\n| Name       |\r\n+------------+\r\n| container1 |\r\n| container2 |\r\n+------------+\r\n<\/pre>\n<h3>Create an Object<\/h3>\n<pre># openstack object create &lt;container_name&gt; &lt;file_name&gt;\r\nopenstack object create container1 keystonerc_admin\r\n+------------------+------------+----------------------------------+\r\n| object           | container  | etag                             |\r\n+------------------+------------+----------------------------------+\r\n| keystonerc_admin | container1 | eeb224b479b7c3f2ed4f7fbcc9666b43 |\r\n+------------------+------------+----------------------------------+\r\n<\/pre>\n<h3>Accessing your files<\/h3>\n<ul>\n<li>CLI &#8211; Hard Way\n<ul>\n<li>Meh, lots of work<\/li>\n<\/ul>\n<\/li>\n<li>Create via Horizon and make public<\/li>\n<\/ul>\n<h3>CLI Commands<\/h3>\n<pre>openstack command list | grep object_store -A 20<\/pre>\n<ul>\n<li>container (create \/ delete \/ list \/ save \/ set \/ show \/ unset)<\/li>\n<li>object (create \/ delete \/ list \/ save \/ set \/ show \/ unset)<\/li>\n<li>object store account (set \/ show \/ unset)\n<ul>\n<li>managing the account<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Section 11: Block Storage Service &#8211; Cinder 35. Overview of Storage in Openstack https:\/\/www.udemy.com\/course\/openstack\/learn\/lecture\/6729394#overview Ephemeral Type: Block VM File systems Persistent across reboots Deleted when the VM is destroyed Block Type: Block Persistent Can only be attached to a single instance at a time But can be unmounted and remounted to another instance Object Type: ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/?p=3683\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[75,76],"tags":[],"class_list":["post-3683","post","type-post","status-publish","format-standard","hentry","category-openstack","category-openstack-essentials"],"_links":{"self":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/3683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3683"}],"version-history":[{"count":4,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/3683\/revisions"}],"predecessor-version":[{"id":3692,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/3683\/revisions\/3692"}],"wp:attachment":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}