{"id":7,"date":"2021-04-11T15:57:00","date_gmt":"2021-04-11T14:57:00","guid":{"rendered":""},"modified":"2022-01-30T14:40:40","modified_gmt":"2022-01-30T14:40:40","slug":"dell-r210-ii-server-part-3-swapping","status":"publish","type":"post","link":"https:\/\/blog.hslracing.com\/myhome\/2021\/04\/dell-r210-ii-server-part-3-swapping.html","title":{"rendered":"Dell R210 ii Server Part 3 &#8211; Swapping Hardware, OS Mirroring and Creating Zpools"},"content":{"rendered":"<p>As mentioned previously, I ordered my Dell R210 ii with a Pentium G620, the replacement Intel Xeon E3-1280 arrived from China after only 13 days.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/6\/2021\/04\/e3-1280-v1jpg.jpeg\"><img decoding=\"async\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/6\/2021\/04\/e3-1280-v1jpg-300x300.jpeg\" height=\"320\" border=\"0\" data-original-height=\"1600\" data-original-width=\"1600\" \/><\/a><\/div>\n<p>The swap-out was pretty straightforward, the seller <a href=\"https:\/\/www.ebay.co.uk\/usr\/a-zada\">a-zada<\/a> had included a small pack of thermal paste which saved me from searching for some.<\/p>\n<p>Three of the four SDSA5AK 64GB half slim SSDs from <a href=\"https:\/\/webuy.com\/\">CEX<\/a> had also arrived, but the sata power cable was still making its way to me from China, so I could not install them all yet.<\/p>\n<p>I disconnected 2 of the 300GB SAS drives and installed the 64GB SSDs in their place.<\/p>\n<p>I was able to install <a href=\"https:\/\/xcp-ng.org\/\">XCP-NG<\/a> on a software Raid 1 configuration of the two 64GB SSDs, however the new install did not show in the BIOS boot (F11 or fn + F11) as an option.<\/p>\n<p>After closer inspection of how the Raid 1 setup had been done, I was also not mad on the implementation.<\/p>\n<p>What it had done was to create a mdadm device, md127, using the entire disk for each of the 64GB SSDs and then create a number of partitions on this meta device.<\/p>\n<p>What I wanted was partitioned disks where each partition was mirrored between the disks.<\/p>\n<p>I then struggled to remove the md127 device as the <a href=\"https:\/\/xcp-ng.org\/\">XCP-NG<\/a> installer did not have an option to remove it.<\/p>\n<p>Even after removing all of the partitions and writing zeros over the various disks, it still would not go!<\/p>\n<p>Eventually I installed Ubuntu over the top of one of the disks and this finally removed it, although I still could not persuade the server to boot from or even list the 64GB disk.<\/p>\n<p>I started looking at a possible firmware upgrade for the Dell PERC H200 card, however I found that it was already at the latest version.<\/p>\n<p>While looking at the Dell PERC H200 controller configuration, (Ctrl-C on startup) I noticed there was an option for selectcing a boot device (alt + b or option + b).<\/p>\n<p>Selecting the first 64GB SSD finally caused the disk to show in the BIOS boot (F11 or fn + F11) and the server would now finally boot from this device.<\/p>\n<p>Unfortunately, my intentions for software mirroring were doomed to failure because of how <a href=\"https:\/\/xcp-ng.org\/\">XCP-NG<\/a> partitions up the disk and what the partitions are used for.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/6\/2021\/04\/Screenshot-2B2021-04-11-2Bat-2B13.32.40.png\"><img decoding=\"async\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/6\/2021\/04\/Screenshot-2B2021-04-11-2Bat-2B13.32.40-300x149.png\" width=\"320\" border=\"0\" data-original-height=\"428\" data-original-width=\"862\" \/><\/a><\/div>\n<p>Partition 1 is the \/ file system for the OS, partition 2 is a backup partition used when upgrading, partition 4 is the BIOS boot area, partition 5 is used for \/var\/log, partition 6 is used for swap and partition 3 is all the remaining space on the disk.<\/p>\n<p>Whist it would be possible to create metadevices for each of these, there is no guarantee that <a href=\"https:\/\/xcp-ng.org\/\">XCP-NG<\/a> would know how to use them in the event of an upgrade.<\/p>\n<p>I have also chosen to ignore hardware Raid using the Dell PERC H200 as several people have proven more IOPS against software Raid and SSDs than the same disks Raid 1 using one of these older controllers.<\/p>\n<p>Setting up the zpools, I will add the other disks later once the sata power cable arrives.<\/p>\n<p>Install and enable zfs (<span style=\"font-family: courier;\">yum install -y zfs; modprobe zfs<\/span>)<\/p>\n<p>Obtain device by-id names for the disks (<span style=\"font-family: courier;\">ls -l \/dev\/disk\/by-id<\/span>) Linux has a tendency to rename \/dev\/sdX disks on a reboot which in turn plays havoc with zpools.<\/p>\n<p>I created a mirrored zpool on the two 300GB SAS drives (<span style=\"font-family: courier;\">zpool create datapool mirror \/dev\/disk\/by-id\/wwn-0x5000c5001d33cd03 \/dev\/disk\/by-id\/wwn-0x5000c5001d7efdbb<\/span>)<\/p>\n<p>Obtain Server UUID (<span style=\"font-family: courier;\">source \/etc\/xensource-inventory; echo $INSTALLATION_UUID)<\/span><\/p>\n<p>1611c0a7-86a6-47cf-aa60-4bf70045f3ab is returned for me<\/p>\n<p>Register the new zpool as an SR (<span style=\"font-family: courier;\">xe sr-create host-uuid=1611c0a7-86a6-47cf-aa60-4bf70045f3ab name-label=&#8221;Local ZFS Data Pool&#8221; type=file device-config:location=\/datapool<\/span>)<\/p>\n<p>9d72e07e-9b1a-5d82-348a-2364f32725bc is returned as the new UUID.<\/p>\n<p>Next I wanted to replace the 18GB EXT3 LVM based SR &#8216;Local Storage&#8217; with a ZFS one (this is the default SR created at install time using the remainder of the OS disk).<\/p>\n<p>Obtain the SR uuid (<span style=\"font-family: courier;\">xe sr-list<\/span>)<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/6\/2021\/04\/Screenshot-2B2021-04-11-2Bat-2B15.01.49.png\"><img decoding=\"async\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/6\/2021\/04\/Screenshot-2B2021-04-11-2Bat-2B15.01.49-300x56.png\" width=\"320\" border=\"0\" data-original-height=\"174\" data-original-width=\"924\" \/><\/a><\/div>\n<p>e893db52-7db4-13c5-694d-098530a3a10d in this case<\/p>\n<p>Obtain the PBD associated with this SR (<span style=\"font-family: courier;\">xe pbd-list sr-uuid=e893db52-7db4-13c5-694d-098530a3a10d<\/span>)<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/6\/2021\/04\/Screenshot-2B2021-04-11-2Bat-2B15.03.57.png\"><img decoding=\"async\" src=\"https:\/\/blog.hslracing.com\/wp-content\/uploads\/sites\/6\/2021\/04\/Screenshot-2B2021-04-11-2Bat-2B15.03.57-300x38.png\" width=\"320\" border=\"0\" data-original-height=\"144\" data-original-width=\"1150\" \/><\/a><\/div>\n<p>66e109a3-7c77-0d37-9daa-21bdeca8309b in this case<\/p>\n<p>Unplug the SR from the PBD (<span style=\"font-family: courier;\">xe pbd-unplug uuid=66e109a3-7c77-0d37-9daa-21bdeca8309b<\/span>)<\/p>\n<p>Forget the SR (<span style=\"font-family: courier;\">xe sr-forget uuid=e893db52-7db4-13c5-694d-098530a3a10d<\/span>)<\/p>\n<p>Next remove the LVM devices, these can be found by running <span style=\"font-family: courier;\">lvs<\/span>, <span style=\"font-family: courier;\">vgs<\/span> and <span style=\"font-family: courier;\">pvs<\/span> for Logical Volumes, Volume Groups and Physical Volumes respectively<\/p>\n<p>Remove the Logical Volume (<span style=\"font-family: courier;\">lvremove e893db52-7db4-13c5-694d-098530a3a10d<\/span>)<\/p>\n<p>Remove the Volume Group (<span style=\"font-family: courier;\">vgremove XSLocalEXT-e893db52-7db4-13c5-694d-098530a3a10d<\/span>)<\/p>\n<p>Remove the Physical Volume (<span style=\"font-family: courier;\">pvremove \/dev\/md127p3<\/span>)<\/p>\n<p>Create new zpool (<span style=\"font-family: courier;\">zpool create ospool \/dev\/md127p3<\/span>)<\/p>\n<p>Register the new zpool as an SR (<span style=\"font-family: courier;\">xe sr-create host-uuid=1611c0a7-86a6-47cf-aa60-4bf70045f3ab name-label=&#8221;Local ZFS OS Pool&#8221; type=file device-config:location=\/ospool<\/span>)<\/p>\n<p>579fd444-406d-1a16-17e6-6c14d1029556 is returned as the new UUID.<\/p>\n<p>Set this SR as the default one to use (<span style=\"font-family: courier;\">xe pool-param-set uuid=1c433a1b-e16f-cf93-1f84-457c87e6fdf5 default-SR=579fd444-406d-1a16-17e6-6c14d1029556<\/span>)<\/p>\n<p>The uuid in the above command auto-completes.<\/p>\n<p>I also turned on deduplication for the ospool as the OS installs should deduplicate well (<span style=\"font-family: courier;\">zfs set dedup=on ospool<\/span>)<\/p>\n<p>Deduplication is not usually advised as it can have a negative impact on memory (see this <a href=\"https:\/\/constantin.glez.de\/2011\/07\/27\/zfs-to-dedupe-or-not-dedupe\/\">article<\/a>) however I am hoping the benefit will outweigh the cost in my use case.<\/p>\n<p>I also enabled compression for the ospool (<span style=\"font-family: courier;\">zfs set compression=lz4 ospool<\/span>) and the datapool (<span style=\"font-family: courier;\">zfs set compression=lz4 datapool<\/span>).<\/p>\n<p>Next I installed the xo-appliance from ronivay&#8217;s <a href=\"https:\/\/github.com\/ronivay\/XenOrchestraInstallerUpdater\">GitHub<\/a> (<span style=\"font-family: courier;\">bash -c &#8220;$(curl -s https:\/\/raw.githubusercontent.com\/ronivay\/XenOrchestraInstallerUpdater\/master\/xo-appliance.sh)&#8221;<\/span>)<\/p>\n<p>Taking note of the IP address for the web interface, as well as the user names\/passwords.<\/p>\n<p>I have had issues with the xo-appliance not starting at server reboot, so these next steps should ensure it boots automatically.<\/p>\n<p>Obtain UUID of XenServer pool (<span style=\"font-family: courier;\">xe pool-list<\/span>)<\/p>\n<p>1c433a1b-e16f-cf93-1f84-457c87e6fdf5 for my pool<\/p>\n<p>Set XenServer to allow VMs to autoboot (<span style=\"font-family: courier;\">xe pool-param-set uuid=1c433a1b-e16f-cf93-1f84-457c87e6fdf5 other-config:auto_poweron=true<\/span>)<\/p>\n<p>Obtain UUID of the xo-appliance VM (<span style=\"font-family: courier;\">xe vm-list<\/span>)<\/p>\n<p>4292f365-f86d-40c3-c76d-553ce133dc10 for my VM<\/p>\n<p>Set xo-appliance to auto boot (<span style=\"font-family: courier;\">xe vm-param-set uuid=4292f365-f86d-40c3-c76d-553ce133dc10 other-config:auto_poweron=true<\/span>)<\/p>\n<p>Connect to the Web interface of the appliance, add the new server (remember to allow self signed certificates).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As mentioned previously, I ordered my Dell R210 ii with a Pentium G620, the replacement Intel Xeon E3-1280 arrived from China after only 13 days. The swap-out was pretty straightforward, the seller a-zada had included a small pack of thermal paste which saved me from searching for some. Three of the four SDSA5AK 64GB half&hellip;<\/p>\n","protected":false},"author":1,"featured_media":93,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5,3],"class_list":["post-7","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorised","tag-homelab","tag-networking"],"_links":{"self":[{"href":"https:\/\/blog.hslracing.com\/myhome\/wp-json\/wp\/v2\/posts\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.hslracing.com\/myhome\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hslracing.com\/myhome\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/myhome\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/myhome\/wp-json\/wp\/v2\/comments?post=7"}],"version-history":[{"count":3,"href":"https:\/\/blog.hslracing.com\/myhome\/wp-json\/wp\/v2\/posts\/7\/revisions"}],"predecessor-version":[{"id":309,"href":"https:\/\/blog.hslracing.com\/myhome\/wp-json\/wp\/v2\/posts\/7\/revisions\/309"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.hslracing.com\/myhome\/wp-json\/wp\/v2\/media\/93"}],"wp:attachment":[{"href":"https:\/\/blog.hslracing.com\/myhome\/wp-json\/wp\/v2\/media?parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hslracing.com\/myhome\/wp-json\/wp\/v2\/categories?post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hslracing.com\/myhome\/wp-json\/wp\/v2\/tags?post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}