Sunday 5 December 2021

Welcome to Chaos Central

I've written before about how Jerry Pournelle was a massive influence on me as a writer, even though it wasn't through his fiction, for which he's best known. Yes, I like that too, whether he was writing with Larry Niven and/or Steven Barnes or just by himself. It was his non fiction that hooked me though.

He wrote a long running column for Byte magazine called Chaos Manor, a user column in which he talked about the tech he was using and trying out and playing with and breaking and how it worked for him (or didn't) as a writer. That was an eye opener of a magazine for me, a young computer fan in the eighties, but it still got to the point where I was buying it to read Jerry's user column. That's one reason, albeit not the only one, why home here in Phoenix is named Chaos Central.

Now, I'm a solid Linux user and that's what a lot of this user column will be about, because I know some and need to know a lot more.

Even though my background was with Microsoft products, both as a user and a professional, eventually supporting them for a living, I didn't want any of what Vista had to bring, so I tried out Ubuntu Linux. I didn't know how that would go, so I installed it to a new hard drive to slot into my laptop rather than replacing the Windows XP I had. I figured that, if I didn't like it or I got stuck or I found too many things I couldn't do, I could just take it out, slot the old Windows drive back in and be back up and running. I think I did that once.

I guess that means that I've used Ubuntu as my primary OS for almost a decade and a half now. I'm no expert, but I get by and I can do everything I need to do. I didn't like Unity, when they brought that in, so switched to Maté as a desktop manager and I've been happy with that ever since. My desktops run Ubuntu Maté, my laptop runs Ubuntu Maté and, more recently, my server runs Ubuntu Maté. Yes, I have a desktop manager installed on my server. I'm not comfortable doing everything I do on it from the command line yet. Maybe I'll get there.

And that's what I'm going to talk about today. I've had problems with KONG for a while (all my computers are named for kaiju), with it shutting down at apparently random points, and haven't been able to figure them out until now but I've finally fixed them. Whew.

What I should have done a long time ago was delve into the logs, in particular /var/log/syslog. That told me that the problem was due to overheating. I installed a tool called hardinfo that allowed me to look at the system sensors and I could see that one of them was consistently well over 90° C. Even with just one thing running, like a single data copy, and the case open, it was hovering around 97° or 98° C. That's not good. And yeah, it caused shutdowns for safety reasons.

What I should have done then was dig into exactly which sensor was overheating, because I bought and fitted a new CPU fan and found that it didn't solve anything. That's because it wasn't the CPU that was running hot but the GPU on the graphics card that's hardly the most important thing on a server that spends most of its time without a screen attached. Once I realised that it was the graphics card, I took it out and problem solved. Sure, I'm now using an antique S3 PCI card that only allows me to connect at 800x600, but I have a couple of others I'll check to see if they'll run at a higher resolution, ones that are newer than that but still so old that they don't need fans on their GPUs that might fail and trigger shutdowns.

I also installed a couple of new hard drives, via a couple of new power splitters, because I was running out of space. I now have eleven hard drives for data in KONG, all either 4 TB or 6 TB in size,that add up to 56 TB of space, along with another smaller one for the system. Yes, I have a lot of data. Hey, I'm a film and music critic and I run a film festival. Data adds up. And yes, all of it is kept redundant by having it in two separate places. Most of it is live on the server and then backed up to filers, which are configured as DLNA servers so I can watch this stuff on the TV in the front room.

What's important here is that a couple of new hard drives means that I can shuffle data around to empty them in turn and finally format these drives to the ext4 file system that Linux kind of expects nowadays. Up until now, they've been formatted as NTFS because KONG used to run Windows 2008 Server and, when I upgraded to Ubuntu Maté, I didn't have the ability to change that at the time.

Now I do because I have shuffle space, so I've learned some things, especially as not all these drives show up as mounted when I power up.

What I'm doing is as follows. It seems to be working.

1. Use gparted to format a new hard drive and give it a name. Let's use Backups as an example.

  • select the right hard drive from the dropdown menu
  • delete both partitions used by NTFS
  • apply changes
  • wait for gparted to scan all drives again
  • create a new partition table from the Device menu, using the default gpt partition table type
  • wait for gparted to scan all drives again
  • create new partition of maximum size by right clicking the bar and choosing New, entering Backups as both Partition Name and Label
  • apply changes
  • wait for gparted to scan all drives again

2. Create a directory to mount it to (where "myusername" is not really my username but will work for here).

sudo mkdir /media/myusername/Backups

3. Mount the drive to that directory:

sudo mount -t auto -o rw /dev/sdb1 /media/myusername/Backups -v

4. Set permissions so I can write to this hard drive:

cd /media/myusername
sudo chown -R myusername:myusername Backups

5. Copy data to it from another drive until that drive is empty. Rinse and repeat until done.

While that directory is permanent, that mount is temporary. To make it permanent, this seems to be doing the trick:

1. Get the UUID for this particular hard drive by looking at the results of:

sudo blkid

2. Open the system's file system table:

sudo pluma /etc/fstab

3. Append a line for this hard drive, with the items tab delimited:

UUID=3aca479b-4f2c-4254-9ea5-42140ee68bc6 /media/myusername/Backups ext4 defaults 0 0

Now, I just need to finish up with all this data copying. 7 of these 11 drives are now ext4 and I set a million files copying earlier. That was cool. There are thirteen hours still to go on that.

No comments: