1
0
Fork 0
isopod.cool/blog/index.php
will 2e17dcf39e Various updates
New journal posts! Also phasing out my real name
2023-11-23 05:34:17 -07:00

229 lines
22 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Blog</title>
<link href="../style.css" rel="stylesheet" type="text/css" media="all">
<style>
ul#articles {
margin: 0;
margin-top: 1rem;
display: flex;
flex-direction: column;
padding-left: 0;
list-style: none;
}
.blogentry {
width: 100%;
list-style: none;
display: inline-block;
margin: .4rem 0;
}
ul#articles h2 {
margin: 0;
}
/*ul h2:first-of-type::before {
content: "Articles - "
}*/
article img, article video, article iframe {
filter:drop-shadow(var(--stddropshadow));
}
.blogentry > * {
display: block;
margin: 0.1rem 0;
}
.entrysummary {
font-size: .9em;
color: gainsboro;
}
.entrytag {
font-size: .9em;
color: #bbbbbb;
font-style: italic;
display: inline-block;
margin-right: 1ch;
}
.entrydate {
font-weight: bold;
}
article:first-of-type h2::before {
content: 'Journal - ';
}
</style>
<?php include($_SERVER['DOCUMENT_ROOT'] . '/seasonal.php'); ?>
</head>
<body>
<?php include($_SERVER['DOCUMENT_ROOT'] . '/nav.php'); ?>
<h1>blog</h1>
<h2 id="caption">inane ramblings</h2>
<nav>
<a href="blog.atom">Article feed</a>
<a href="https://journal.miso.town/atom?url=https://isopod.cool/blog/">Journal feed</a>
</nav>
<?php
$username = "niceopod"; // Your username here!
$ch = curl_init("https://status.cafe/users/$username/status.json");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);
$str = curl_exec($ch);
if(curl_error($ch)) {
//echo curl_error($ch);
$str = "";
}
curl_close($ch);
$status_data = json_decode($str, true);
$content = $status_data["content"];
$face = $status_data["face"];
$timeago = $status_data["timeAgo"];
if(strlen($content) < 1) {
$content = "Something's gone wrong server side...";
}
echo "<div id='statuscafe'><div id='statuscafe-username'><a href='https://status.cafe/users/$username' target='_blank'>status</a> $face $timeago</div><div id='statuscafe-content'>$content</div></div>";
?>
<?php
$stag = $_GET["tag"];
$nostag = empty($stag);
if(!$nostag) {
echo "<a style='display: block; margin-top: 1rem; margin-bottom: 1rem;' href='.'>All articles</a>";
}
$content = simplexml_load_file("blog.atom");
echo "<ul id='articles'>";
$year = "-69420";
$yc = 0;
foreach($content->entry as $entry) {
$pfilt = false;
if(!$nostag) {
foreach($entry->category as $cat) {
$term = $cat["term"];
if($stag == $term) {
$pfilt = true;
}
}
}
if($pfilt or $nostag) {
$nyr = substr($entry->published, 0, 4);
if($nyr != $year) {
$year = $nyr;
echo "<li><h2 id='$year'>$year</h2></li>";
}
$dt = substr($entry->published, 0, 10);
$ti = $entry->title;
$wn = "";
if(preg_match('/2022-0(5|4)-(21|25|13)/', $dt)) {
$wn = "title=\"This post is on the archived v2 version of the site. It will not load if you don't have Javascript enabled, and expect jank if viewing on mobile. You have been warned.\" ";
}
$cats = "";
foreach($entry->category as $cat) {
$term = $cat["term"];
$cats = $cats."<a class='entrytag' href='?tag=".$term."'>".$term."</a>";
}
echo "<li class='blogentry'><time class='entrydate'>".$dt."</time><h4 class='entrytitle'><a ".$wn."href='".$entry->link["href"]."'>".$ti."</h4></a><span class='entrysummary'>".$entry->summary."</span><span>".$cats."</span></li>";
}
}
echo "</ul>";
?>
<article id="2023-11-23">
<h2>2023-11-23</h2>
<p>Another update on my little Contraption today, mostly expanding on stuff that's evident in the video I posted a couple days ago, but I have a fresh update too.</p>
<p>Firstly, the JBOD board I bought isn't the one I mentioned before. That board, seemingly, is old and no longer in production. I got a newer revision, the CB2 as opposed to the CB1. It's got some differences, but nothing that really matters for my purposes.</p>
<p>Next, the 5-port SATA controller I expressed interest in doesn't work. I bought it and installed it and the laptop just doesn't seem to agree with it. Like, it won't even load the BIOS interface, let alone boot with the thing installed. With an NVMe SSD, or with nothing in the slot, it's fine, but with the SATA controller, no dice. My Game Theory&trade; is it's either a power thing or it's just a classic Laptop Bios Moment&trade;, the thing being programmed to expect an SSD in that slot and not knowing what to do when there's something there other than a storage device. Either way, I don't see a good way to solve this, so I'm not really interested in pursuing it further.</p>
<p>So that's five out of my eight total SATA slots gone, replaced with a single SSD, leaving me with a boot drive and three SATA slots to work with. This by no means dooms the project; that's still enough for a drive for TrueNAS apps and redundant storage in the form of two mirrored disks. That's not bad, and it would be reasonable to stop here. But we can do better.</p>
<p>SATA is kind of weird. It's not designed to be split into multiple connections with a hub the way, say, USB is, but if your controller supports it you can kind of do it anyway. If I wanna hook up more than two or three HDDs to this thing, and I do, this is looking like my best bet. Fortunately, the SATA controller that <em>is</em> working happens to support this feature. So I bought one such hub to see if it would work, and, well:</p>
<div style="display: flex;">
<picture style="width: 50%;">
<source srcset="media/2023-11-23/contraption.jxl" type="image/jxl">
<img src="media/2023-11-23/contraption.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.'>
</picture>
<picture style="width: 50%;">
<source srcset="media/2023-11-23/lsblk.jxl" type="image/jxl">
<img src="media/2023-11-23/lsblk.jpg" alt='lsblk output showing five SATA drives recognized by the system (sda through sde)'>
</picture>
</div>
<p>If you're not sufficiently techy to decipher what's going on in those pictures, it boils down to this: it worked.</p>
<p>Now, I'm fully aware that I'm probably not going to get super incredible performance out of this setup, but the thing is, hard drives are slow. Like, they're <em>really</em> slow. A fast HDD would be hard pressed to saturate a SATA II connection in optimal conditions, let alone SATA III. In terms of pure bandwidth, one SATA III port should support two or three hard drives fine. Besides, nothing about this was ever going to be performance optimized.</p>
<p>I'm nearing the point where I have everything I need to put this together. All that's left is the hard drives themselves, potentially a second SATA multiplier to spread the load between the two ports better, and to figure out a case, because I'm not running this thing strewn across my desk like this.</p>
</article>
<article id="2023-11-20">
<h2>2023-11-20</h2>
<video controls>
<source src="media/2023-11-20_contraption.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</article>
<article id="2023-10-28">
<h2>2023-10-28</h2>
<p>This month's update is I've been thinking about ways to upgrade my laptop-server into a full-blown NAS with fancy features like "data redundancy" and "several terabytes of disk space" so today you get to hear about my thought process for that. Look forward to a proper blog post about this if/when I ever build it for real.</p>
<p>My reasons for wanting to do this to a laptop essentially boil down to the fact that I already have it. It's got a good level of computing power and is plenty upgradeable enough to facilitate a mod like this, so it makes sense to me to keep using it instead of buying a new one.</p>
<p>Now, there are a few ways to go about this. The most obvious to most people will probably be to just connect a bunch of USB external hard drives and call it done. A couple of problems with that, though: first, I want to set up a RAID array and I don't remotely trust USB with an application like that, and second, that would be boring.</p>
<p>On <em>certain</em> modern laptops it would start and end there, but luckily for me mine is not one such machine. My laptop is an HP 15-dk0030nr, a four-year-old mid-tier gaming laptop boasting upgradeable RAM, an internal 2.5" SATA drive bay, an M.2 NVMe SSD, and an M.2 WiFi card. A good amount of upgradeability for a laptop, and I plan to take it to its logical extreme.</p>
<p>A fun fact about NVMe is that, despite being billed as a storage connection standard, it's fundamentally just PCIe, which means you can connect basically any PCIe device to it if you have an adapter. Meaning my laptop essentially has two internal PCIe slots I can use to expand its capabilities however I see fit, assuming I'm prepared to punch some holes in the bottom panel to make it all fit.</p>
<p>My plan is as follows: I'll ditch the NVMe SSD and WiFi card, as neither are particularly important for a server to have, and instead boot the system off of an SSD in the internal SATA bay, and fill the M.2 slots with SATA controllers. I bought <a href="https://www.amazon.ca/dp/B09MSWNF7X">this little number</a> for the WiFi card slot and tested it with some dusty old 500GB hard disks I had laying around and it seemed to work perfectly, and I plan to get something like <a href="https://www.silverstonetek.com/en/product/info/expansion-cards/ECS07/">this</a> to replace the NVMe SSD, more or less turning my laptop into a 7-bay NAS.</p>
<div style="display: flex;">
<picture style="width: 50%;">
<source srcset="media/2023-10-28/ChenYang.jxl" type="image/jxl">
<img src="media/2023-10-28/ChenYang.jpg" alt='A 2-port M.2 SATA controller, keyed for a WiFi card slot.'>
</picture>
<picture style="width: 50%;">
<source srcset="media/2023-10-28/ECS07.jxl" type="image/jxl">
<img src="media/2023-10-28/ECS07.jpg" alt='A 5-port M.2 SATA controller, keyed for an NVMe drive slot.'>
</picture>
</div>
<p>One little issue though: I have no way to power the drives directly off of my laptop. For my little test I was able to power the drives off of some spare SATA power connectors in my desktop PC, but that's not exactly an enterprise-grade solution, and for all its internal PCIe connectivity it's not like my laptop is bristling with ATX power connectors. If you thought plugging 3.5" HDDs into the WiFi card slot was janky, you ain't seen nothing yet. Here's where we really get into the weeds.</p>
<p>One of my first thoughts was to use USB power, either from the laptop's ports or an external hub. It's a low-power DC device, so it should be possible, right? Unfortunately, nobody makes an adapter for that. <a href="https://isopod.zone/notes/9la5c343fqi1cjof">Someone on fedi</a> claimed to have success with parts from an external HDD enclosure, but my laptop happens to have less than seven USB ports, and I didn't want to use USB anyway, plus drive shucking stops being cost effective <em>fast</em> once you hit higher capacities.</p>
<p>Small tangent here - in my research I learned that HDDs have some weird power requirements: they apparently take both 5V and 12V power, the latter being for the motor. Also, HDDs can spike in power draw <em>significantly</em> while spinning up, well past the 9 or so watts they use under load. I guess making a dongle that handles all that only to then not provide a data connection is just a little too niche for most companies.</p>
<p>So then, if USB is out, maybe I should look into something that's actually designed to power hard drives. Realistically, that means a PC PSU. I'm divided between a standard ATX PSU or something like a Pico PSU, but it doesn't really matter either way - they both do the same thing. The issue <em>here</em> is how I'm gonna run them without a motherboard.</p>
<p>See, PC power supplies rely on the motherboard for control, specifically on one wire that the motherboard bridges to ground to turn the PSU on. You can run the power supply motherboard-less by making this connection manually, but I'm hesitant to do that on account of if I fuck it up I could light a fire or kill myself. I'd prefer some other way to turn on the power supply. Enter this thing:</p>
<picture>
<source srcset="media/2023-10-28/CSE-PTJBOD-CB1.jxl" type="image/jxl">
<img src="media/2023-10-28/CSE-PTJBOD-CB1.jpg" alt='A Supermicro JBOD power board'>
</picture>
<p>This is the Supermicro CSE-PTJBOD-CB1. I learned about it from a Stack Exchange thread that linked to <a href="https://www.servethehome.com/supermicro-cse-ptjbod-cb1-jbod-power-board-diy-jbod-chassis-made-easy/">this Serve The Home article</a> about it. It's the "motherboard" from a JBOD enclosure (think an external hard drive, but with dozens of disks). It's like a PC motherboard, but stripped down to the absolute bare essentials for the purpose at hand. It's available on Ebay for around $60 CAD, and all it does is basic power management. I can plug this and my drives into my PC PSU and I'm off to the races, without making an electrical hazard! As a bonus, I also get hookups for a power button and a couple of fans.</p>
<p>So my plan thus far is as follows: SATA boot SSD in the laptop's internal drive bay, 7 ports worth of SATA controllers in the NVMe slots hooked up to high-capacity HDDs, and power those drives off of a standard PC PSU managed by a JBOD power board. Just two variables left to solve for: a chassis for the thing, and a way to pay for all those drives. For the former, I've got some vague idea in mind involving some custom-length metal tubing and a lot of 3d-printed brackets. For the latter, maybe I'll use my tax return, or spend like six months buying everything piecemeal.</p>
<p>So that was today's unhinged computer rant. Get ready for a few months from now when I post photos.</p>
</article>
<article id="2023-09-18">
<h2>2023-09-18</h2>
<p>Had a bit of a think about my principles and priorities website-wise. Long story short is I've turned off the redirect for chrome-based browsers. I've got a few reasons for doing this, chief among them being that I don't want to lock out people who have to use chrome because they don't have total control over their computers or rely on chrome-only accessibility tools or whatever, and also if I'm gonna use my website as a link hub it seems a bit counterproductive to block, statistically, most internet users from seeing it.</p>
<p>Also updated my recent blog post about Unity's latest fiasco. I felt like the second section was a little more of an unhinged rant than I was going for, so I rewrote it to hopefully come off a bit more level-headed and explain my point better.</p>
<p>I've also decided to start removing journal entries past the fifth one from this page. There are some things I want to stay on the internet forever, but in-depth accounts of my life are not one of them. Someone remind me to automate that.</p>
<hr>
<p>I saw a fox on my way home from work today, so that was cool.</p>
</article>
<article id="2023-09-15">
<h2>2023-09-15</h2>
<p>It was my birthday a couple days ago! I'm 21 now. I can drink in the States I guess, though I'm hoping that never comes up. My dad celebrated the occasion by taking me out to look at cars. This was complicated somewhat by two factors: One, I'm a fucking colossus and all human infrastructure is designed specifically to be just barely too small for me, and two, I live in fucking semi-rural North America and all you can get new here is huge SUVs and even huger pickup trucks.</p>
<p>First place I went was a Toyota dealership and the only thing I could fit comfortably in was the biggest damn SUV on the lot. In everything else my legs tried to clip through the steering wheel. Next and final place I looked at was a GM dealership. I had more luck fitting in things there, partly because it was also all big SUVs.</p>
<p>None of the SUVs were ever in consideration, really. Not if I could help it. I fucking despise big vehicles for reasons avid <a href="https://www.youtube.com/watch?v=jN7mSXMruEo">Not Just Bikes</a> viewers will be familiar with. The only thing I could find all day that I liked was this little VW Golf that someone had presumably traded in for one of the hulking behemoths it was sharing a lot with. It's surprisingly roomy in there - I had to almost max out the settings on the seat but I was more comfortable in that thing than most of the Toyotas. It was like a family SUV, but half the size.</p>
<p>I didn't buy anything. Besides the fact that I don't want to impulse buy a fucking car, my city isn't a very good place to shop for used cars, especially not of the type I actually want. I'd probably be able to find a better deal in the one nearby-ish big city, plus I'd like to shoot for a hybrid if I can swing it, something that more or less does not exist here. Fun learning experience though.</p>
<hr>
<p>Work's good. I was right about the reduced hours being temporary, so I'm back to normal on that front now. The store manager says they keep getting temperature alerts from the walk-in fridge, which confuses me - I went in there and scanned everything with the thermometer and everything's fine. I don't know where they've put the temperature probe they're using but I suspect the reading off it isn't representative.</p>
<hr>
<p>Being a computer toucher is fucking exhausting, dude. Did you know Unity wants to charge developers for installs of their games now? I wrote a blog post about it. Hopefully now I can stop thinking about that now. I'll try to do a positive one next time.</p>
</article>
<article id="2023-08-21">
<h2>2023-08-21</h2>
<p>Been a minute. A few website updates, but mostly minor stuff. One big thing: I've been thinking about image formats some and I've decided to replace a bunch of larger images where quality isn't hugely important such as backgrounds with JPEGs instead of PNGs like I had before in order to reduce the load on peoples' internet connections. I kept everything as PNG for a long time out of principle because JPEG objectively isn't very good in terms of quality, but you cant deny the filesize advantages and there are frankly greater evils in the space right now. Speaking of, I've also made the profoundly optimistic decision to also include JPEG XL versions of each image, for which the standard JPEGs act as fallbacks. This still results in a significantly smaller filesize per image visible on the website than PNGs, amazingly.</p>
<p>On a related note, people attempting to visit my website on a Chromium-based browser may have noticed that it's been replaced by a single <a href="https://chrome.bathynomus.xyz">page</a> urging them to stop doing that. I had a little popup about this before, but with Chromium getting exponentially more evil of late I felt the need to take a more aggressive stance.</p>
<p>I configured my reverse proxy to automatically redirect all clients with "Chrome" user agent strings to that page. This isn't hard to circumvent if you know what you're doing, and that's part of the point - as the article explains, Google wants to create a world where workarounds like that are impossible. I fully believe at this point that using Chromium-based browsers is tantamount to contributing to Google's stranglehold on the free web, but I feel like trying to make it actually impossible to access my website using them would run counter to the principles I'm espousing here, if the measures I've taken don't already.</p>
<hr>
<p>Work's been alright. I'm getting fewer hours than I'd like, but I have my reasons to believe that's a temporary arrangement. Nothing much else to report. It's been pretty uneventful for the most part, which I'm interpreting as a good thing. No news is good news.</p>
<p>So I was wrong about Invidious in my last entry - I gave Google WAY too much credit, lol. Turns out all they did is blocked a handful of big Invidious instances. That's all. The software still works, and Invidious has been updated to detect that it's been blocked and link you to another instance so Google's bullshittery is barely a roadbump.</p>
<p>I played a game called <a href="https://store.steampowered.com/app/1713610/Purrgatory/">Purrgatory</a> recently. It's pretty good. meow/10</p>
<p>Had to fly out for a wedding recently, and the experience has left me with a renewed hatred for every wretched part of that sordid system. If I could down a plane using 110ml of toothpaste, I would consider doing so a tragic waste of my talents. Oh, and there's also the fact that for someone of my freakishly colossal height most airplane seats have negative legroom. North American transcontinental high speed rail network when</p>
</article>
<div class="buttons" style="margin-bottom: 1rem;">
<a href="https://status.cafe/"><img src="media/banner-statuscafe.png" alt="Status Cafe"></a>
<a href="https://kiosk.nightfall.city/"><img src="media/neonkiosk.png" alt="Neon Kiosk"></a>
<a href="https://journal.miso.town/"><img src="media/banner-htmlj.png" alt="Valid HTML Journal"></a>
</div>
<div id="rightsidebg" style="background-image: url(bg.jxl), url(bg.jpg); --distancefromcenter: -10%;"></div>
</body>
</html>