{"id":838,"date":"2015-02-28T09:06:19","date_gmt":"2015-02-28T14:06:19","guid":{"rendered":"http:\/\/xfloyd.net\/blog\/?p=838"},"modified":"2017-03-19T20:05:13","modified_gmt":"2017-03-20T01:05:13","slug":"add-additional-local-disks-to-xenserver-host","status":"publish","type":"post","link":"https:\/\/xfloyd.net\/blog\/?p=838","title":{"rendered":"Add additional local disks to XenServer host"},"content":{"rendered":"<h2 id=\"HowtoaddadditionaldiskstoXenServerhost-CreateLinuxLVMpartition\">Create Linux LVM partition<\/h2>\n<p>The first step is to write a new partition table on the second disk drive using the <code>fdisk<\/code> command.<\/p>\n<p><code>Device Boot Start End Blocks Id System<br \/>\n\/dev\/sdb1 1 182401 1465136001 8e Linux LVM<\/code><\/p>\n<h2 id=\"HowtoaddadditionaldiskstoXenServerhost-AddnewdisktoXenServerLVM\">Add new disk to XenServer LVM<\/h2>\n<p><!--more--><\/p>\n<p>The next step is to make the new disk partition known to the LVM using the <code>pvcreate<\/code> command. The <code>pvdisplay<\/code> command lists all physical volumes associated with LVM. The first physical volume is the original XenServer LVM partition on the first disk, the second entry is our new one.<\/p>\n<p><code># pvcreate \/dev\/sdb1 --config global{metadata_read_only=0}<br \/>\nPhysical volume \"\/dev\/sdb1\" successfully created<br \/>\n# pvdisplay<br \/>\n--- Physical volume ---<br \/>\nPV Name \/dev\/sda3<br \/>\nVG Name VG_XenStorage-506b833c-f239-ad9a-350f-a7287ed3e259<br \/>\nPV Size 1.36 TB \/ not usable 7.77 MB<br \/>\nAllocatable yes<br \/>\nPE Size (KByte) 4096<br \/>\nTotal PE 355739<br \/>\nFree PE 340336<br \/>\nAllocated PE 15403<br \/>\nPV UUID 5bhPOM-r7J0-2cSV-2CnR-WKpI-Vzue-AJorZZ<br \/>\n-<br \/>\n\"\/dev\/sdb1\" is a new physical volume of \"1.36 TB\"<br \/>\n--- NEW Physical volume ---<br \/>\nPV Name \/dev\/sdb1<br \/>\nVG Name VG_XenStorage-f6bce4ea-0bff-74f0-7a35-55238d517bd4<br \/>\nPV Size 1.36 TB \/ not usable 7.25 MB<br \/>\nAllocatable yes<br \/>\nPE Size (KByte) 4096<br \/>\nTotal PE 357696<br \/>\nFree PE 132<br \/>\nAllocated PE 357564<br \/>\nPV UUID 2z9UKx-eTRo-I42j-O120-4F37-i5Is-edTbX8<br \/>\n#<\/code><\/p>\n<p>Complete the following procedure to create a Storage Repository (SR) on a new local hard drive (HDD):<br \/>\nNote: The stored data in the server will be lost.<\/p>\n<p><code>xe sr-create name-label=\"Locale Storage 1.36 TB HDD\" shared=false device-config:device=\/dev\/sdb1 type=lvm content-type=user<\/code><br \/>\nRun the following command to find the disk ID of the new device:<br \/>\n# cat \/proc\/partitions<br \/>\nA list of HDDs and partitions are displayed. Find out which device is your new local disk. Locate it by size. (This is probably \u201csdb\u201d or \u201c\/cciss\/c0d1p0\u201d)<br \/>\n# ll \/dev\/disk\/by-id<\/p>\n<p>Find the disk ID of the \u201csdb\u201d or \u201ccciss\/c0d1\u201ddisk. The \u201cscsi-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\u201d or \u201ccciss-xxxxxxxxxxxxxxxxxxxxxxxxxx\u201dformat is required.<\/p>\n<p>Run the following command to create an SR:<br \/>\n# xe sr-create content-type=user device-config:device=\/dev\/disk\/by-id\/ host-uuid= name-label=\u201dLocal Storage 2\u201d shared=false type=lvm<br \/>\nOr<br \/>\n# xe sr-create content-type=user device-config:device=\/dev\/disk\/by-id\/ host-uuid= name-label=\u201dLocal Storage 2\u201d shared=false type=lvm<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create Linux LVM partition The first step is to write a new partition table on the second disk drive using the fdisk command. Device Boot Start End Blocks Id System \/dev\/sdb1 1 182401 1465136001 8e Linux LVM Add new disk to XenServer LVM<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28],"tags":[],"_links":{"self":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/838"}],"collection":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=838"}],"version-history":[{"count":3,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/838\/revisions"}],"predecessor-version":[{"id":1000,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/838\/revisions\/1000"}],"wp:attachment":[{"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xfloyd.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}