<p>Nowthatit's in use as a home server, I find that the in-built 256 gigs of solid-state storage isn'treallyenoughformypurposes.Now,it'splentyforoneortwogameservers,whichiswhatIwasusingitfor,butmostotherapplicationssuchasbackupsormediaservers(whichIwouldquiteliketohave)wouldbeabitstifledbythatamountofspace.Hence,asignificantstorageupgradeisinorder.</p>
<h2>TheMethod</h2>
<p>There's a few ways I could go about this. My laptop actually has a decent amount of upgradeability, with a full-sized NVMe drive slot and a 2.5" SATA drive bay. The simplest, least janky, and most boring solution here would be to buy two high-capacity SSDs, throw 'eminthereandbedone.</p>
<p>Oneproblem:Atovertencentspergigabyte,thosesuckersaren't cheap. For this project to make sense, I'dwantatleastenoughstoragetobackupmywholepersonalcomputer,plusafewterabytesofmediaandothermiscellanies.Ideally,I'dliketoneverhavetoupgrademystorageagain.Laptop-gradedrivesofthatkindofsizecurrentlyweighinataboutathousanddollarsapiece.Ifyoulookintherightplaces,spinningrustcanbehadforliterallyatenththecostperterabyte,sothechoiceisobvious.</p>
<imgsrc="media/power_spaghet.png"alt="Hooking up three hard drives with this configuration means a whopping FOUR power cables for one server. Unacceptable."/>
<p>IssuethesecondisthatUSBisjustnottherighttoolforthejobhere.USBisdesignedforhot-pluggingperipherals,notsemi-permanentinternalaspectsofahardwareconfiguration,sotryingtopullanyfancyshitlikeRAIDorevenjustrelyingonallthedrivesbeing<em>recognized</em>everybootopensthedoortoallsortsofweird,unfixableproblems.Inotherwords,it's very janky, and I'dratherjustnotdealwithallthat.</p>
<p>Ofcourse,thereasonablewaytobuildaNASwouldbetogetamachinethat's actually fit for that purpose, like an off-the-shelf NAS box or a custom computer in a case with a lot of drive bays or something. I'dalsorathernotdothis.Imean,Ialreadyhaveallthisperfectlygoodcomputingpowerrighthere!Ican'tjustletitgotowaste.WhatIactuallydidisasfollows:</p>
<imgsrc="media/ChenYang.jpg"alt='A 2-port M.2 SATA controller, keyed for a WiFi card slot.'>
</picture>
<picturestyle="width: 50%;">
<sourcesrcset="media/ECS07.jxl"type="image/jxl">
<imgsrc="media/ECS07.jpg"alt='A 5-port M.2 SATA controller, keyed for an NVMe drive slot.'>
</picture>
</div>
<p>Unfortunately,mylaptopdidn't want to turn on with a SATA expander in the NVMe SSD slot, so I'mstuckwiththedinkytwo-portone.That's fine, since my server doesn'treallyneedwirelessconnectivityanyway,andI've got a secret nasty trick up my sleeve that'sgonnaletme<em>really</em>getthemostoutofthosetwoSATAports.</p>
<p>Thisfeelsalittlelikeforbiddendarkmagicstome,anditprobablyisn't great for performance, but it lets me connect more drives so I'musingit.Keepinmind,allthisistoreachalevelofconnectivitythatalmostmatcheswhatthemotherboardinmydesktopcomputersupportsoutofthebox.</p>
<p>NowthatI've got my laptop <em>talking</em> to all these drives, they need power. I'msureIcouldgetthisfromthelaptopsomehow,butI'm not an electrical engineer, and the point of this project is to <em>not</em> have to buy a new computer, so I'llhavetogetitfromelsewhere.</p>
<p>ThebestwayI'm aware of to power multiple hard drives from the same source is a PC power supply, such as the one I'mcurrentlyusingtopowerthedrivesinmydesktopPC.Infact,aspartofearlytestingIactuallyhadtopowersomedrivesoffofmydesktopPCwhiletheywereconnectedtothelaptop.IwishIhadpicturestoshowyouofthat,itwassofucked.</p>
<imgsrc="media/CSE-PTJBOD-CB1.jpg"alt='A small circuit board with an ATX motherboard power connector and headers for a fan and a power button.'>
</picture>
<p>ThisistheSupermicroCSE-PTJBOD-CB1.It's a part from a Supermicro JBOD enclosure, and it exists to solve my exact problem. This little board'sentirepurposeistointerfaceapowerbutton(andsomefans)withaPCPSU,whichisexactlywhatIneed.Luckyme!</p>
<imgsrc="media/drive_spaghet.jpg"alt='Five SATA drives plugged into a laptop, one via an internal SATA bay, and the other four via an M.2 SATA controller in place of the WiFi card and a SATA splitter board. The latter four hard drives are powered off of an ATX PC PSU controlled by a Supermicro JBOD controller board.'>
<imgsrc="media/drive_spaghet_lsblk.jpg"alt='lsblk output showing five SATA drives recognized by the system (sda through sde)'>
</picture>
</div>
<h3>ProblemtheThird:ACase</h3>
<p>Icouldrunthiswholesetupnaked,strewnoutacrossmydesk,butI'm not doing that, so I'llneedacase.Unfortunately,theydon'tmakecomputercasesdesignedforthisusecase.Ishallhavetobuildmyown.</p>
<p>There's a few different ways I could go about this. I'veseenpeoplemakecustomcomputercasesoutofwood.<ahref="https://www.youtube.com/watch?v=xE4_jKlX-xc">Thisguy</a>modifiedarack-mountserverchassistoaccepthislaptop's motherboard for a similar project. I don'thavemuchinthewayofwoodworkingabilityandI'mnotplanningtodisassemblemylaptopformountinginsideacomputercase,butIdohavea3Dprinter.</p>
<p>Icould3Dprintthewholecase,butthatseemslikeitwouldtakealotofplastic,andmoreimportantly,beapainintheasstodesign,especiallysincemy3DprinterissmallerthanthecaseI'll need to make so I can'treallyprintitallinonego.Myplanistomakethemainstructureoutofmetalrods,and3Dprintvariousbracketstoattacheverythingtogether.</p>
<imgsrc="media/bare_frame.jpg"alt='A frame made of aluminum rods press-fit into custom 3d-printed joints'>
</picture>
<p>NowIneedawaytomountharddrivestothis.Iconsidered3Dprintingarackofsomekindforthem,butIdon't know how hot these things get and for obvious reasons I honestly just don'twanttotakeanychanceswiththem.Forthisreason,Iinsteadboughtadrivecagedesignedtomounttoacoupleof5.25" drive bays, and mounted that to my frame. In fact, the height of the frame was chosen based on the size of this part.</p>
<imgsrc="media/partially_assembled_1.jpg"alt='Frame made from aluminum rods and 3d-printed joints, with the following mounted to it via 3d-printed brackets: two PCBs, an ATX PSU, a power button, and a computer fan'>
<imgsrc="media/fully_assembled.jpg"alt='The frame with a drive cage installed and a running laptop sitting on top'>
</picture>
<p>IT'SALIIIIIVE!!!</p>
<h2>Software</h2>
<p>Thispostismostlyaboutmyfuckeduphardware,butIfiguredIshouldsharemysoftwaresetuptoo.It's TrueNAS. I went with it because it boasts a lot of fancy features and smooths out a lot of processes that I was intimidated by the idea of doing manually in the terminal. This is probably the most normal part of the build by far, and I think some of the jankiness of the hardware side has infected it. I tried to run Syncthing on it and it just... didn'ttake.Idon'tknowhowelsetodescribeit.TrueNASisprettygoodthough.</p>
<h2>Postmortem</h2>
<p>Asofwriting,I've been running this thing for a couple months now, and it'sbeenprettygood.Ihaven't done a lot with it yet beyond some basic backups and a Jellyfin server that I have yet to make accessible from outside my LAN, but it'sbeenmostlyreliablesofar.Itevensurvivedapoweroutageoncewithnoissue,thoughI'm currently looking into UPS solutions to make sure that doesn'thappenagain.Allthatisn't to say I'mcompletelyhappywithit,though.</p>
<p>Ialsodidn't do a perfect job of designing the 3D-printed parts. I think they came out pretty good all things considered, but I made all the brackets just a little too short and they'reallalittlebitbowed.FortunatelyIusedPETGsoitjustlookssketchy-PLAwouldhavesnappedbynow,whichIknowbecausemyfirstPLAtestprintsnappedinstantly!</p>
<p>ThePSUIused,aSeasonicS12III,isalsoabitdubious.IpickeditbecauseitwascheapandmyotherSeasonicPSUisworkingwell,andit's worked out fine so far, especially because it'sa500wattunitwhichiskindofextravagantoverkillformyusecase,butafterIboughtitIlearnedit's actually one of the shittier units Seasonic sells. Apparently they outsource the manufacturing to some other company, which strikes me as weird considering a bunch of other companies outsource PSU manufacturing <em>to</em> Seasonic. At any rate, it'sbeenfinesofarandIdon'texpectittoblowuprunningatafractionofitsratedwattage.</p>
<p>Igottheharddrivesfromawebsitecalled<ahref="https://serverpartdeals.com/">ServerPartDeals.com</a>thatsellsrecertifiedhigh-capacityHDDsforlikehalfofwhatthey'd sell for new, and while a few months of use isn'tenoughtosayforsurewhetherthatwasagoodidea,they've certainly left a good impression. The drives I bought arrived encased in foam, inside a box which was itself packed inside another padded box. With that level of care on the part of the seller, I'mprettycomfortabletrustingthesedriveswithwhatIneedthemfor.</p>
<p>Andnowtheelephantintheroom:Icannotingoodconsciencerecommendyoudothis.HavingaNASisagoodidea,andusinganoldlaptopasabasicserverisagoodidea,butifyou're going to build a NAS like this then you should really procure a purpose-built machine, or at the very least an old desktop that can accept some extra drives. Definitely, <em>definitely</em> don't<em>buyanewlaptop</em>withtheintenttodothis.</p>
<p>InordertomakethisworkIhadtoreplacemylaptop's wifi card with two layers of janky, probably AliExpress-tier hardware that is, frankly, probably introducing performance bottlenecks, or if I'mlucky,bottleneckedbytherelativelylow-speedinterconnectofthewificardM.2slot.Bearinmind,thatslotneeds<em>atmost</em>1gigabitofbandwidthtofulfillitsintendedpurpose,whichisaboutasixthofwhatasingleSATA3portcando.Accordingtomyresearch,thatthinghastwo<em>separate</em>PCIeGen2x1interfaces.WhoknowswhatmycheapSATAcontrollerisevendoingwiththat.</p>
<p>Honestly,IonlydidthisatallbecauseIfiguredadaptingthisthingtothisusecasewouldbecheaperthanprocuringanewmachinethatwasasfastandIdidn't want it going to waste. All that said, I have a NAS now, and it'sgoodenoughforme,andthiswholeadventurewasahellofaLearningExperience™soIreallycan'tcomplain,thoughifyougavemetheamountofmoneyallthisstuffwouldhavecostnewtoputtowardanewNAS,Iwouldhavedonesomethingelse.</p>