Storage on the cheap

So as a bit of a cheapskate and with a like of recycling. It is possible to get good storage 2nd hand and cheap and fast…. oh yeah – Good, Cheap, Fast.

The Iron Triangle is Rusted. “Good, Fast, or Cheap. Pick two” is one… | by  Michael Pastore | Medium

They normally say it can’t be done… but I think it can, and it can be done in software rather than hardware.

Here’s my thinking…

Loads of cheap desktops, rammed with largish spinning rust with 1 SSD for write cache and OS. Then clustered together to make one massive fault tolerant file system. No special controllers, just the mobo ones.

Here’s my goals…. I want to be able to saturate a 10Gb NIC with consistent read and writes. I want to use cheap commodity hardware, or used server kit that’s reached the 2nd life market.

How hard can it be?

A new year: 2021

So it’s a new year and I have a new workshop. Time to get things sorted. Things I want to get done this year:

  • Aquaponics – get it set up and self managing again
  • The laser cutter – get it working
  • 3d printer – print some actually usefull things
  • Blade server – sort out which blades I’m keeping and put it to good use.

We’ll see how far I get with this list this time next year

PHPRemoteMailer

https://github.com/crazy-logic/PHPRemoteMailer

I needed this for something so here it is – open source goodness.

It’s a script you can run on one server, which passes info to another to send an email. Pretty simple and no validation ect included.

How to set and verify a Static IP on Raspberry Pi OS

You may want to set a static IP and there are two easy ways to do so. 

The first way, you can use the GUI. go to the arrows in the top right, and right click or secondary click on this and then select ‘Wireless and Wired Network settings’. From there choose the interface, which is usually eth0 and fill in the IP address, router and DNS server you wish to use.

The second way is to edit a config file. Open a terminal from the bar and type in “nano /etc/dhcpcd.conf” then return. this will open the file in the nano editor within the terminal. Using the down arrow navigate to a commented out section with the example static IP. you’ll need to uncomment the interface line, static IP line, static routers line, and static domain name servers line. Then edit the address to what you need for your setup. If you’re only using IPv4 then remove the IPv6 DNS server. do a sudo reboot to apply. 

Once back up you can verify in two ways. 

The first way is to look in the GUI as before to see the details are now present. 

The second way is to again open a terminal and type “ip address show” to list the IP details for each interface.

Arduino joystick KSP game controller

This goes along with a video on YouTube.

wiring diagram

Code for Arduino’s plotter

void setup() {
// initialize serial communication at 9600 bits per second:
pinMode(A3, INPUT_PULLUP);
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int p = analogRead(A0);
int t = analogRead(A1);
int r = analogRead(A2);
int b = analogRead(A3);

String st = String(p) + " " + String(t) + " " + String(r) + " " + String(b);
Serial.println(st);
delay (10);
}

code for use a game controller keyboard mode

include "Keyboard.h"
void setup() {
pinMode(A3, INPUT_PULLUP);
Keyboard.begin();
}
void loop() {
int p = analogRead(A0);
int t = analogRead(A1);
int r = analogRead(A2);

if (digitalRead(A3) == LOW) {
//Send an ASCII 'h',
Keyboard.write(104);
}

if (p < 300) {
//Send an ASCII 'j',
Keyboard.write(106);
}
if (p >900) {
//Send an ASCII 'l',
Keyboard.write(108);
}

if (t < 300) {
//Send an ASCII 'i',
Keyboard.write(105);
}
if (t >900) {
//Send an ASCII 'k',
Keyboard.write(107);
}

if (r < 300) {
//Send an ASCII 'q',
Keyboard.write(113);
}
if (r >900) {
//Send an ASCII 'e',
Keyboard.write(101);
}

delay(100);
}