﻿{"id":66,"date":"2012-05-01T10:41:32","date_gmt":"2012-05-01T13:41:32","guid":{"rendered":"http:\/\/binsfeld.com.br\/wp\/?p=66"},"modified":"2012-10-14T15:41:48","modified_gmt":"2012-10-14T18:41:48","slug":"adicionar-disco-storage-xenserver","status":"publish","type":"post","link":"http:\/\/binsfeld.com.br\/wp\/?p=66","title":{"rendered":"Adicionar Disco (Storage) Xenserver"},"content":{"rendered":"<div>Adding new hard-drive in XenServer is a bit different from the traditional Linux process. For XenServer, you need to create a container called a &#8216;storage repository&#8217; to define a particular storage target (such as a hard disk), in which Virtual Disk Images (VDIs) of VMs are stored. A VDI is nothing but an abstracted storage space which acts as the hard-disk for VMs.<\/div>\n<p>Xen storage repository supports IDE, SATA, SCSI and SAS drives\u00a0 when locally connected, apart from iSCSI, NFS, SAS and fiber channel in case of a remote storage.<\/p>\n<p>Steps to create an SR in a XenServer.<\/p>\n<p>1. SSH to the XenServer as root.<br \/>\n2. Find the disk ID of the new device using the following commands:<\/p>\n<p># cat \/proc\/partitions<\/p>\n<p>You will see list of all the HDDs and partitions. Find which device is your new local disk. This is probably \u201csdx\u201d(most probably sdb) or \u201c\/cciss\/c0d1p0\u201d.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"border: 0px;\" src=\"http:\/\/binsfeld.com.br\/wp\/wp-content\/uploads\/2012\/10\/1.png\" alt=\"\" width=\"646\" height=\"237\" align=\"Baseline\" border=\"0\" \/><\/p>\n<p># ll \/dev\/disk\/by-id<\/p>\n<p>This command will list the disk ids for all the partitions\/HDDs present in the server as shown in the image below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"border: 0px;\" src=\"http:\/\/binsfeld.com.br\/wp\/wp-content\/uploads\/2012\/10\/2.png\" alt=\"\" width=\"650\" height=\"106\" align=\"Baseline\" border=\"0\" \/><\/p>\n<p>Find the disk ID of the \u201csdx\u201d or \u201ccciss\/c0d1\u201ddisk. The \u201cscsi-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\u201d or \u201ccciss-xxxxxxxxxxxxxxxxxxxxxxxxxx\u201dformat is what you need.<\/p>\n<p>3. Find out the &#8216;host-uuid&#8217; in the XenSserver using the following command.<\/p>\n<p>#xe host-list<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" style=\"border: 0px;\" src=\"http:\/\/binsfeld.com.br\/wp\/wp-content\/uploads\/2012\/10\/3.png\" alt=\"\" width=\"646\" height=\"129\" align=\"Baseline\" border=\"0\" \/><\/p>\n<p>The uuid (RO) is the &#8216;host-uuid&#8217;\u00a0 you need.<\/p>\n<p>4.Create a Storage Repository (SR):<\/p>\n<p># xe sr-create content-type=user device-config:device=\/dev\/disk\/by-id\/&lt;scsi-xxxxxxxxxxxxxxxxxxxxxxxxx&gt; host-uuid=&lt;host-uuid&gt; name-label=\u201dLocal Storage 2\u201d shared=false type=lvm<br \/>\n&#8211; Or &#8211;<br \/>\n# xe sr-create content-type=user device-config:device=\/dev\/disk\/by-id\/&lt;cciss-xxxxxxxxxxxxxxxxxxxxxxxxx&gt; host-uuid=&lt;host-uuid&gt; name-label=\u201dLocal Storage 2\u201d shared=false type=lvm<br \/>\n&#8211; Or &#8211;<br \/>\n# xe sr-create content-type=user device-config:device=\/dev\/&lt;sdx&gt; host-uuid=&lt;host-uuid&gt; name-label=\u201dLocal Storage 2\u201d shared=false type=lvm<\/p>\n<p>You can verify it from XenCenter with the following steps:<\/p>\n<p>1. Connect to the XenCenter.<br \/>\n2. Go to the &#8216;Storage tab&#8217;. You will find the details of all storage repositories here. You can see the storage &#8216;Local Storage2&#8217; in the list.<br \/>\nThis signifies that the disk has been added successfully. Now, you can start creating VDIs on it.<\/p>\n<p>Cr\u00e9ditos : http:\/\/knowledgelayer.softlayer.com\/questions\/534\/Adding+a+hard+drive+to+Citrix+XenServer<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding new hard-drive in XenServer is a bit different from the traditional Linux process. For XenServer, you need to create a container called a &#8216;storage repository&#8217; to define a particular<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-66","post","type-post","status-publish","format-standard","hentry","category-virtualizacao"],"_links":{"self":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts\/66"}],"collection":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=66"}],"version-history":[{"count":15,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts\/66\/revisions"}],"predecessor-version":[{"id":368,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts\/66\/revisions\/368"}],"wp:attachment":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}