{"id":268,"date":"2009-10-05T04:37:19","date_gmt":"2009-10-05T03:37:19","guid":{"rendered":"http:\/\/blogs.pfuetzner.de\/matthias\/?p=268"},"modified":"2009-11-02T18:12:51","modified_gmt":"2009-11-02T17:12:51","slug":"eco-responsible-power-friendly-small-home-server-part-2","status":"publish","type":"post","link":"https:\/\/blogs.pfuetzner.de\/matthias\/?p=268","title":{"rendered":"Eco responsible power friendly small home server (part 2)"},"content":{"rendered":"<p>\nA long time ago, I did write about my small new home server. You can read all about that at: <a href=\"http:\/\/blogs.pfuetzner.de\/matthias\/?p=299\"> http:\/\/blogs.pfuetzner.de\/matthias\/?p=299<\/a><\/p>\n<p>Meanwhile some changes have been done to the system. Yes, I needed to buy the 90W PSU (although I now know how much Watt the system really uses, I&#8217;m curious, why that was really needed, but it sometimes did crash with the 60W PSU and that&#8217;s gone, now, that I have the 90W PSU, so I assume, it must have had to do with the 60W PSU. Or on that specific PSU, but the dealer refused to change it, as it is running. More on Wattage later).<\/p>\n<p>I also did change the passive heat sink on the CPU to also be a ZALMAN, safe is safe (see image). And with that, I now have the case put on the small side, which in the image is below, so that the heat can exit through the two case openings, which are now at the top. No fans any more in the case&#8230; Quiet!<\/p>\n<p>More importantly, I did also replace the CF card by a real disk, as that only uses 1.8W at load, less, if not in use. I did buy a 1.8 inch Toshiba disk (those, that are used inside the iPods, in my case a TOSHIBA MK2006GA) plus two converters (3.5 -> 2.5 and 2.5 -> 1.8) and placed the disk inside the cabinet (No part numbers here, and no distributor, as I bought them on german eBay. Overall disk + two converters were around 40 EURO). The main reason for this change is the fact, that the CF card was really slow, and that 8 GB weren&#8217;t enough to perform Live Upgrade (and now maintain different Boot Environments) (I now have 30 G in the rpool, for swap, crash and all the rest).<\/p>\n<p>I also updated the OS.. ;-)<\/p>\n<p>Now, I did install OpenSolaris 2009.06 from an image on a usbstick, that went really smooth, no changes needed. And, after that, I upgraded to the actual dev build, which this weekend was build 124&#8230;<\/p>\n<p>One more change hardware-wise: I also added two more 1 TB disks, because I had a nasty failure of BOTH external power supplies of the WD disks over the same weekend some months ago&#8230; Rendering me without storage&#8230; So, I decided to mirror across different types of disks, so I bought two no-name 1 TB external USB disks (which have Hitachi SATA disks in it). WD quickly sent new PSUs, great service, and they admitted, that those PSUs were faulty&#8230; They had many such failures&#8230;<\/p>\n<p>With the new setup of the disks, I had a different problem: The new disks did not do power-save by themselves, whereas the WD disks did fall into power save. ZFS does not have any clue about power management of the disks, it assumes, that that is done by the underlying elements. The problem here resulted in a DEGRADED zpool, as one disk of the mirror was not available&#8230;<\/p>\n<p>The solution is simple: Have an entry for every disk in \/etc\/power.conf so that the powerd takes care of that. So here&#8217;s my \/etc\/power.conf:<\/p>\n<p><PRE><br \/>\ndevice-dependency-property removable-media \/dev\/fb<br \/>\nautopm                  enable<br \/>\nautoS3                  default<br \/>\nsystem-threshold        900s<br \/>\ncpu-threshold           1s<br \/>\n# Auto-Shutdown         Idle(min)       Start\/Finish(hh:mm)     Behavior<br \/>\nautoshutdown            30              9:00 9:00               noshutdown<br \/>\ndevice-thresholds       \/pci@0,0\/pci8086,464c@1d,7\/storage@1\/disk@0,0   900s<br \/>\ndevice-thresholds       \/pci@0,0\/pci8086,464c@1d,7\/storage@2\/disk@0,0   900s<br \/>\ndevice-thresholds       \/pci@0,0\/pci8086,464c@1d,7\/storage@3\/disk@0,0   900s<br \/>\ndevice-thresholds       \/pci@0,0\/pci8086,464c@1d,7\/storage@4\/disk@0,0   900s<br \/>\ndevice-thresholds       \/pci@0,0\/pci-ide@1f,1\/ide@0\/cmdk@0,0    900s<br \/>\ncpupm                   enable<br \/>\n<\/PRE><\/p>\n<p>Then there was the problem, that the WD disks did not reveal different devid strings (that problem had been brought to my attention by a colleague of mine), the string was the same for all WD disks. You can check that by running (as root):<\/p>\n<pre>\r\nbash-3.2# echo '::spa -c' | mdb -k\r\n<\/pre>\n<p>and compare the lines that contain devid. In my case that was:<\/p>\n<pre>\r\ndevid='id1,sd@TWD______10EAVS_External_\/a'\r\ndevid='id1,sd@f004fa5244aa68827000dc26e0004\/a'\r\ndevid='id1,sd@TWD______10EAVS_External_\/a'\r\ndevid='id1,sd@f004fa5244aa76c85000a3a89000a\/a'\r\n<\/pre>\n<p>So I did open a bug, and got a pre-fix, that will come to OpenSolaris and Solaris soon. The fix fixes the way the scsa2usb driver handles disks that do not correctly report page 80 or page 83 scsi inquiries (which many USB don&#8217;t do right!). So, now with the new scsa2usb driver the output looks like:<\/p>\n<pre>\r\ndevid='id1,sd@f000665644ab34259000aa2b30004\/a'\r\ndevid='id1,sd@f004fa5244aa68827000dc26e0004\/a'\r\ndevid='id1,sd@f004fa52449bea5b4000f1f610000\/a'\r\ndevid='id1,sd@f004fa5244aa76c85000a3a89000a\/a'\r\n<\/pre>\n<p>That makes for four uniquely identifiable USB disks. Which is a good thing, as now the ZFS stack can in case additional infos get lost still uniquely address the disks, and not treat one for the other! That would render the data corrupted, in case all other infos might get lost. Rest assured, ZFS not only checks for the devid string, but the devid string is the last resort if all else fails&#8230;<\/p>\n<p>Until the final fix (bug is in fix-delivered state!) will be out, there&#8217;s a workaround. Quoted from the workaround section of bug 6881590:<\/p>\n<pre>\r\nFor the issue of devid not unique due to page 83 data, it can be a workaround\r\nby setting the similar lines as below in sd.conf, which enforces sd to ignore\r\nthe vpd page data and fabricate a devid.\r\nfor x86:\r\nsd-config-list=\"VendorID+ProductID\",\"sd-ver1-tst-data\";sd-ver1-tst-data= 1,0x00004,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;\r\nfor sparc:\r\nsd-config-list=\"VendorID+ProductID\",\"sd-ver1-tst-data\";sd-ver1-tst-data= 1,0x00008,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;\r\n<\/pre>\n<p>For rare cases, if I would need to reinstall my system, I keep a log of all steps performed, so if I would need to install from scratch, I would end up at the same stage. Here&#8217;s that script:<\/p>\n<p><PRE><br \/>\n# Install OpenSolaris 2009.06 from media (CD, USB stick, whatever)<br \/>\n# After install, perform:<br \/>\npfexec su &#8211;<br \/>\nsvcadm disable nwam<br \/>\nsvcadm enable network\/physical:default<br \/>\nsvcadm disable sendmail<br \/>\nvi \/etc\/hosts<br \/>\nvi \/etc\/defaultrouter<br \/>\nvi \/etc\/hostname.rge0<br \/>\nvi \/etc\/ethers<br \/>\nvi \/etc\/power.conf<br \/>\nvi \/etc\/inet\/ntp.conf<br \/>\nsvcadm enable ntp<br \/>\ncrontab -e # (to add: 0 3 * * 3 \/usr\/sbin\/zpool scrub rpool)<br \/>\npkg install SUNWsmba SUNWsmbfskr SUNWsmbs SUNWsmbskr<br \/>\nsvcadm enable smb\/server<br \/>\nvi \/etc\/nsswitch.conf<br \/>\nhosts:      files dns mdns<br \/>\nipnodes:   files dns mdns<br \/>\nsmbadm join -w PFUETZNER<br \/>\nvi \/etc\/pam.conf<br \/>\n# Manually added for kernel CIFS server in workgroup mode<br \/>\nother\tpassword required\tpam_smb_passwd.so.1\tnowarn<br \/>\npasswd pfuetz<br \/>\npasswd root<br \/>\nsvccfg -s idmap setprop config\/default_domain = astring: PFUETZNER<br \/>\nsvccfg -s idmap setprop config\/ds_name_mapping_enabled=boolean: false<br \/>\nsvcadm refresh idmap<br \/>\n# install new scsa2usb driver<br \/>\n******************************************************************************<br \/>\n# Then, for the upgrade to work, I prefer to do it by hand, so:<br \/>\n# ONCE:<br \/>\npkg set-publisher -O http:\/\/pkg.opensolaris.org\/dev opensolaris.org<br \/>\npkg set-property flush-content-cache-on-success true<br \/>\n# Every Update:<br \/>\npkg refresh &#8211;full<br \/>\npkg install SUNWipkg<br \/>\npkg image-update &#8211;be-name buildXXX<br \/>\nbeadm activate buildXXX<br \/>\n<\/PRE><\/p>\n<p>And for the setup of the CIFS\/NFS shares on ZFS, here&#8217;s what needs to be done (assuming, you have a zpool named &#8220;pfuetz&#8221; ;-) ):<\/p>\n<pre>\r\nzfs create -o casesensitivity=mixed pfuetz\/smb-share\r\nzfs set sharenfs=root=@192.168.2 pfuetz\/smb-share\r\nzfs set sharesmb=on pfuetz\/smb-share\r\nzfs set sharesmb=name=smb-share pfuetz\/smb-share\r\n<\/pre>\n<p>Power usage:<\/p>\n<p>I&#8217;ve been testing the power consumption of the system alone, with no external USB disks. It uses 39 W. With the external four 1 TB disks the power usage goes to 72W, when the disks are awake, but not doing anything. If the disks are under load, the power consumption goes up to 80W. If the disks fall asleep, the power consumption goes down to 63 W.<\/p>\n<p>Lessons learned so far:<\/p>\n<p>There&#8217;s one additional lesson: The &#8220;zpool scrub&#8221; for the 2 TB mirrored disks takes 16 hours. So it might be a good idea, just for power savings to really use SATA disks internal to the server, and not external. That also would solve the devid problem. And also would solve the power management problem. And even safe money, as the scrub would be finished in way less time.<\/p>\n<p>So here, finally the image of the &#8220;actual interior&#8221;:<\/p>\n<p><img decoding=\"async\" title=\"\" alt=\"\" src=\"wp-content\/uploads\/2009\/10\/IMG_6466.JPG.klein.jpg\"><\/p>\n<p>I hope, these additional infos might help you in determining, what to build as a small home server. You might also check <a href=\"http:\/\/blog.brosowski.biz\/tag\/heimserver\/\">Jan&#8217;s<\/a> or <a href=\"http:\/\/blogs.sun.com\/constantin\/\">Constantin&#8217;s<\/a> blog, they also have some insights!<\/p>\n<p>Matthias<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A long time ago, I did write about my small new home server. You can read all about that at: http:\/\/blogs.pfuetzner.de\/matthias\/?p=299 Meanwhile some changes have been done to the system. Yes, I needed to buy the 90W PSU (although I now know how much Watt the system really uses, I&#8217;m curious, why that was really [&hellip;]<\/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-268","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/blogs.pfuetzner.de\/matthias\/index.php?rest_route=\/wp\/v2\/posts\/268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.pfuetzner.de\/matthias\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.pfuetzner.de\/matthias\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.pfuetzner.de\/matthias\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.pfuetzner.de\/matthias\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=268"}],"version-history":[{"count":2,"href":"https:\/\/blogs.pfuetzner.de\/matthias\/index.php?rest_route=\/wp\/v2\/posts\/268\/revisions"}],"predecessor-version":[{"id":377,"href":"https:\/\/blogs.pfuetzner.de\/matthias\/index.php?rest_route=\/wp\/v2\/posts\/268\/revisions\/377"}],"wp:attachment":[{"href":"https:\/\/blogs.pfuetzner.de\/matthias\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.pfuetzner.de\/matthias\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.pfuetzner.de\/matthias\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}