Showing posts with label coolmaster. Show all posts
Showing posts with label coolmaster. Show all posts

Saturday, 24 February 2018

WD Disk DOE & Dust....

I recently ordered a new WD Blue disk, it duly arrived and had the strangest problem I've seen in many a long year, no matter what I did the disk showed as 64MB total and it lost all data upon power cycling.

I puzzled over this briefly, until I pulled the disk back out the caddy and saw it had exactly 64MB of cache, yes, no platter space was being shown, just the cache showing up as disk space.  I have never ever seen this before, cache has always been a transparent intermediary for me in production and so to suddenly have the cache being the only exposed space was odd.

However, dead on arrival hard disk, a quick RMA and a new one winged its way into my hands, they actually gave me a slight upgrade as I got a WD Black by return of post.

Tonight I planned an hour to fit the new disk and add it to my workstation.... This machine has no cable management, and its a nightmare to add drives, there are six built in 3.5" bays but they have a set latch and screw mechanism, which forces you to fit the drives to that the power connectors are actually straining the distant power plugs. (I do plan to buy a pair of SATA power extenders on pay day).

What struck me as a massive problem however, is the amount of dust inside there.  Clearly, since fitting the 1080 GTX I've had something change or fail or open as there are copious amounts of dust in there.

Now my work area is not optimum for a workstation, I have a full tower case, so it has to go under the desk and the floor is carpeted.  Now this had been mitigated by the Coolmaster Cosmos 1000 case having lifting rails, taking the whole thing 1.25" off of the floor level, and two ground level filters, as well as a rear and front filter set.

But clearly things have not gone well, as just dust dust dust.

My original plan for the start of the year was to re-case the server, then re-case this PC as a server as well, retire one of the aging DELL 2950's for this machine itself, and put myself a new workstation together for my 40th.

Trouble is?... I'm skint, like proper skint, so I can't afford the workstation I was planning on...

And now I need to sort out this machine... I smell another re-casing task a head... Hmm, which case?  I'm thinking about the Corsair Obsidian range... Anyone have any other suggestions for a full height tower?... 1 x 5.25" at least 6 x 3.5" internal mount points and at least 2 x 2.5" mount points internally.  Front Panel USB would be a boon.

Dust seems to be my enemy.

Saturday, 3 February 2018

Home Server - New Case (Coolmaster N300)

The new home server build starts with the case, I've elected to go with my wallet, and this means the cheapests ATX case with the mode drive bays...

The Coolmaster N300 comes in at just over £38 and sports an impressive 8 internal 3.5" drives.


Monday, 22 January 2018

C++ Simple Limits & Server Recase

Health & Myself
What a whirlwind few weeks I've had, first of all, I've had some minor medical work done so not really been in the mood to do anything very interesting except recuperate in my spare time.  I've also got on-going dental treatment going on, so I'm doubly aggravated.

Next I have been so busy with work, I've had a change of job title, I've been effectively promoted into the lead developer role for the platform/product range I work on; this is sort of a defacto position, as I'm the ONLY developer working in this area at present, however I'm now officially the man on point and am about to reform a new development team around it.  I will be working in Scrum methodology with this new team, we'll be pushing product to both Windows and Linux, Git will be our source control system (no matter what anyone else says) and I'm going to leverage C++ as the core product with tools all being produced in Python, very exciting stuff.

Server Issues
At home however, you may have seen this late night  problem....


I have not, as yet, tackled this problem in any satisfactory manner; there's just been too much going on.

However.... I have a plan, a plan so cunning you could put a tail on it and call it a fox.

I had a look around in the case, and removed the bad drive, here it is....


This is an old drive first of all, and it was only 3.0gb/s SATA, but it was useful as part of my mirror, and without it I'm now naked.  In my room/workspace tidy rambling video you will see I have a stack of WD blue drives on my desk, however I'm at pains to put them into this server, as the more space I give myself then the more data I have to move later, and the less places I have to stash that data.

What do I mean?... Well, that machine already has about 4TB of data in the two ZFS Pools and the one scratch drive, I do not have ANYWHERE else to put 4TB of data, and I can't afford a new drive, hence why I've carefully and strategically informed the wife I'm buying the off 1TB drive once in a while over the last year... Dropping a 4TB drive in the mix, she'll flip.

Recasing my Server & Workstation
So, my plan?


Well, first of all I have my main work station in a trusty, but now rather old, Coolmaster Cosmos 1000 case (you can see this case in some of the very early pages of this very blog)... Now, this is a very nice case, and has 10 internal 3.5" drive bays... So would be pretty nice for my server to move into, add all the new WD drives to it and voila a working server with expansion capabilities.... A recasing, that's a plan... Plus I get to perhaps look at that Xeon mod a year on and evaluate how it got along.... And of course more ZFS fun... Maybe a video about Git & setting up my own ticket handling system.


Right, that's the server... What about the now case-less workstation?

Well, I'm considering a new case, of course.  Front runners are the Corsair Obsidian 750D as it has modular upgrade ability, and if I like it, I can get another and expand the server into it next year.

Infiniband
A long-term project is to consider an Infiniband link between my server and my workstation, we'll see how this goes along, not only would I need to purchase some adapters and cables, but I would need to switch my workstation into a new dual-boot as only Linux would be on Infiniband (and as you may have noticed Windows was on the list of platforms for my new role specification).

C++
Simple limits in C++?.. What am I talking about, hmmm, well I just ran into some code:

auto value (0);
if ( requisitValue < defaultValue )
{
    value = requisitValue;
}
else
{
     value = defaultValue;
}

Nothing wrong with this you may argue, however the developer hadn't looked at the values they were working with, the defaultValue for this system locale was ALWAYS the highest value on a sliding scale, the configuration insisted the default be the cap and so any requisite value would be smaller.

I asked the chap to have a think about this code, having explained the requisit would always be lower than the default, and asked him to come up with any improvements.  He did....

auto value(
  (requisitValue < defaultValue) ? requisitValue : defaultValue);

I asked him to rationalise this change, why had he done it?


  • To meet the coding standard define of not assigning, but to initialise with a value
  • To make the code less lines of code
I have no disagreement with the first point, the second... Not so much....

I do not subscribe to needing code to be smaller (less lines of code) so long as it's readable, as for my work maintainability far out reaches using less lines of code.  Especially when the change made is exactly the the same resulting code, just the change is far harder to read.


(Don't miss-read this, I agree you should try to make functional code take less lines of code, but the above is white-space more than functional change, white-space on a modern compiler is NOT a problem, make your code readable before you start trying obfuscating functionality for fancy frills).

I stopped the developer in his tracks however, and asked him to pull up the document for the specification and describe "defaultValue"... "The maximum amount allowed in the value" he read.

So, changing the name of this value was the first step it became "MaximumValue".  Use a meaningful name.

And finally, if you really want this decision to be a single line of code, how about:

auto value(
    std::min<valueType>(
        requisiteValue,
        maximumValue));

Using the minimum function here, we make it clear we're doing a mathematical operation, it's a single line instruction (even if I do stagger it for readability over four), and we're not going to confusing the order of our parameters, so avoid introducing comparator ordering bugs later.

This is the simplest way to find a limit between two variables of the same type in C++, using std::min and std::max.  Learn about them and love them.

The reply the young man gave me... "But changing the name'll mean I have to change hundreds of different places in the code!".... "Yes, so use find & replace in files?".... "Oh but what about all the other "defaultValues?".... "Why are they not in namespaces, or classes, or using other names?"... Silence.