{"id":118,"date":"2018-04-08T14:52:48","date_gmt":"2018-04-08T14:52:48","guid":{"rendered":"https:\/\/projects-42.nl\/?p=118"},"modified":"2018-04-08T15:15:49","modified_gmt":"2018-04-08T15:15:49","slug":"add-a-local-storage-repository-sr-to-xenserver","status":"publish","type":"post","link":"https:\/\/projects-42.nl\/index.php\/2018\/add-a-local-storage-repository-sr-to-xenserver\/","title":{"rendered":"Add a local storage repository (SR) to Xenserver"},"content":{"rendered":"<p>Recently i added a new SSD to my home lab hypervisor.<\/p>\n<p>Xenserver <span id=\"result_box\" class=\"\" lang=\"en\"><span class=\"\">does not detect new disks by default, so I had to add the drive manual, luckily this is not a complicated process (some command line experience is required).<\/span><\/span><\/p>\n<p>First we need to find the device name of the new drive, for this we use following command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">fdisk -l<\/pre>\n<p>Usually the last shown device is the newly added one, in my case it was \/dev\/nvme0n1 as I was adding a NVME drive, normally it will be something like \/dev\/sdb, where b is the position of the drive (first drive is sda, second is sdb, etc.).<\/p>\n<p>Now we know the which drive we are adding to the system we can <span id=\"result_box\" class=\"short_text\" lang=\"en\"><span class=\"\">choose <\/span><\/span>how we want to format the drive. We can <span id=\"result_box\" class=\"short_text\" lang=\"en\"><span class=\"\">choose between EXT and LVM, in short LVM is faster but less flexible (no thin provisioning). Usually you will want to keep all your local repository&#8217;s the same.<\/span><\/span><\/p>\n<p>In this case I have chosen to go with EXT because i need the flexibility and the speed is good enough for me.<\/p>\n<p>Now we can add the repository, we will use the following command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">xe sr-create name-label=&lt;your SR name&gt; shared=false device-config:device=\/dev\/&lt;device name&gt; type=&lt;lvm|ext&gt; content-type=user<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently i added a new SSD to my home lab hypervisor. Xenserver does not detect new disks by default, so I had to add the drive manual, luckily this is not a complicated process (some command line experience is required). First we need to find the device name of the new drive, for this we [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":123,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[37,38,39,35,33,34,36,32],"class_list":["post-118","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general-ict","tag-local-sr","tag-local-storage","tag-local-storage-repository","tag-repository","tag-sr","tag-storage","tag-storage-repository","tag-xenserver"],"_links":{"self":[{"href":"https:\/\/projects-42.nl\/index.php\/wp-json\/wp\/v2\/posts\/118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/projects-42.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/projects-42.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/projects-42.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/projects-42.nl\/index.php\/wp-json\/wp\/v2\/comments?post=118"}],"version-history":[{"count":1,"href":"https:\/\/projects-42.nl\/index.php\/wp-json\/wp\/v2\/posts\/118\/revisions"}],"predecessor-version":[{"id":120,"href":"https:\/\/projects-42.nl\/index.php\/wp-json\/wp\/v2\/posts\/118\/revisions\/120"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/projects-42.nl\/index.php\/wp-json\/wp\/v2\/media\/123"}],"wp:attachment":[{"href":"https:\/\/projects-42.nl\/index.php\/wp-json\/wp\/v2\/media?parent=118"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/projects-42.nl\/index.php\/wp-json\/wp\/v2\/categories?post=118"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/projects-42.nl\/index.php\/wp-json\/wp\/v2\/tags?post=118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}