{"id":600,"date":"2014-10-15T00:36:45","date_gmt":"2014-10-15T00:36:45","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=600"},"modified":"2014-10-15T00:38:20","modified_gmt":"2014-10-15T00:38:20","slug":"how-to-create-a-local-storage-repository-for-xenserver","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/how-to-create-a-local-storage-repository-for-xenserver\/","title":{"rendered":"How to Create a Local Storage Repository for XenServer"},"content":{"rendered":"<p>Find your hard drive and or partition.<\/p>\n<pre>cat \/proc\/partitions<\/pre>\n<p>The above command should give you a list of all the HDD&#8217;s and partitions on the system.<\/p>\n<p>Find the UUID of the disk with the following command<\/p>\n<pre>ll \/dev\/disk\/by-id<\/pre>\n<p>Find the UUID of your XenServer.<\/p>\n<pre>xe host-list<\/pre>\n<p>Create the storage repository.<\/p>\n<pre> xe sr-create content-type=user device-config:device=\/dev\/disk\/by-id\/\"Disk UUID\" host-uuid=\"Host UUID\" name-label=\u201dLocal Storage 2\u201d shared=false type=lvm<\/pre>\n<p>example:<\/p>\n<pre>[root@XenServer ~]# cat \/proc\/partitions\r\nmajor minor #blocks name\r\n\r\n3 0 22378 loop0\r\n6 0 285474816 sda   &lt;--- Main HHD is is here, shows total size of disk\r\n8 1 4193297 sda1 \r\n8 2 4193297 sda2       \r\n8 3 244085167 sda3  &lt;--- This is the partition we need\r\n252 0 4096 dm-0\r\n252 1 105070592 dm-1\r\n253 0 104857600 tda\r\n253 1 4363264 tdb\r\n[root@XenServer ~]# ll \/dev\/disk\/by-id\/\r\ntotal 0\r\nlrwxrwxrwx 1 root root 9 Oct 13 20:38 scsi-56234c232c92f371217ce8549f51e0nf1 -&gt; ..\/..\/sda\r\nlrwxrwxrwx 1 root root 10 Oct 13 20:38 scsi-56234c232c92f371217ce8549f51e0ff1-part1 -&gt; ..\/..\/sda1\r\nlrwxrwxrwx 1 root root 10 Oct 13 20:38 scsi-56234c232c92f371217ce8549f51e0ff1-part2 -&gt; ..\/..\/sda2\r\nlrwxrwxrwx 1 root root 10 Oct 13 20:38 scsi-56234c232c92f371217ce8549f51e0ff1-part3 -&gt; ..\/..\/sda3   &lt;-- This is the UUID for the partition\r\nlrwxrwxrwx 1 root root 9 Oct 13 20:38 usb-Dell_Virtual_CDROM_1028_123456 -&gt; ..\/..\/sr1\r\n[root@XenServer ~]# xe host-list\r\nuuid ( RO)                : dce4e7fe-8342-bd11-12c8-83caac124a4b   &lt;--- UUID for XenServer\r\n          name-label ( RW): XenServer001\r\n    name-description ( RW): Default install of XenServer\r\n\r\n[root@XenServer ~]# xe sr-create content-type=user device-config:device=\/dev\/disk\/by-id\/scsi-56234c232c92f371217ce8549f51e0ff1-part3 host-uuid=dce4e7fe-8342-bd11-12c8-83caac124a4b name-label=\"Local Storage\" shared=false type=lvm<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Find your hard drive and or partition. cat \/proc\/partitions The above command should give you a list of all the HDD&#8217;s and partitions on the system. Find the UUID of the disk with the following command ll \/dev\/disk\/by-id Find the &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/how-to-create-a-local-storage-repository-for-xenserver\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,29],"tags":[187,185,275,186],"class_list":["post-600","post","type-post","status-publish","format-standard","hentry","category-linux","category-xenserver","tag-create-storage-repository","tag-storage-repository","tag-xenserver","tag-xenserver-commands"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/600","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=600"}],"version-history":[{"count":5,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/600\/revisions"}],"predecessor-version":[{"id":605,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/600\/revisions\/605"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}