Changing Hostname in Ubuntu

Having built a new server in the summer, I thought I’d post a little tip for if you decide to change the hostname in Ubuntu. I got caught out after completing steps 1 to 3 and then rebooting the server! Couldn’t SSH into it after it rebooted. Had to get the spare monitor out and figure out what I’d missed…

  1. check firewall rules ufw that 22 is open
  2. change /etc/hosts
  3. change /etc/hostname
  4. change /etc/ssh/*.pub with new hostname otherwise you won’t be able to SSH into the machine any more!

Now you can reboot

Replacement to HP microserver

I’ve had my HP microserver for four years this summer and it’s been a great little machine and very reliable, but the time has come to upgrade the machine as it doesn’t run very quitely and could be more power efficient. I’m currently using Ubuntu 12.04 and am a little bit nervous about upgrading to 16.04 – so a new machine allows me to transfer over in a more leisurely fashion.

The replacement is going to be using an ASRock low powered CPU motherboard machine to minimise power consumption and noise. I’ve used an ASRock motherboard in my router and it runs virtually silent as I didn’t need any fans running in the case.

My first choice was the ASRock J3710-ITX, but its currently retailing at £40 more than the ASRock N3700-ITX, so I’ve gone with the cheaper one. The main difference between the boards is the CPU (see 1 and 2 at the end), but since this is primarily a file server, I’m not concerned about the N3700 being lower frequency.

The rest of the parts are on a wishlist until the motherboard has been shipped, but the plan is:

  • 8GB Kingston RAM
  • OCZ Trion 100 120GB SSD
  • StarTech 5.25in Trayless Hot Swap Mobile Rack
  • WD Red 6TB NAS HDD
  • WD Purple 6TB Surveillance HDD
  • Antec P50 mATX Case
  • Antec Earth Watts 380W 80+ Bronze Power Supply

(the list can be seen here: http://www.ebuyer.com/lists/471177ACE13237EA7FE0CFEC53968C65)

The file server will be in a RAID 1 configuration using the Red and Purple WD drives, the SSD being the O/S drive.  I’ve deliberately not selected two reds or two purples so that the drives should be made at different times and shouldn’t both be from the same batch.  Most likely I’ll repurpose the existing 2TB drives to I have for the offsite backup to save money!

The 5.25in rack allows me to plug in one of the offsite HDDs without opening up the case. The case will be used to home my router machine, allowing me to put the file server into the Lian Li media center case.

 

1) http://www.cpu-world.com/CPUs/Pentium/Intel-Pentium%20N3700%20Mobile%20processor.html

2) http://www.cpu-world.com/CPUs/Pentium/Intel-Pentium%20J3710%20-%20FH8066501715931.html

Problem with Motion on my server

I have an HP N40L MicroServer which I’ve had for over a year now (maybe two!). I chose when I got it to install Ubuntu on it as I thought I needed a little experience in using Linux. It’s been quite a learning curve, but my little server runs 24×7 and has been stable pretty much from day one.

All that changed though during the summer just gone. I stalled Motion on my server as I have a birdbox webcam which used to plug in to my Media Centre PC and another webcam in the hedgehog box. I thought I’d set up Motion correctly according to the guides I’d read online but during the night I noticed the server had frozen. The monitor would not display anything, the keyboard didn’t work and the most odd thing was that the server was thrashing the network!

I ended up re-starting the server a few times (hold power button down) before I could log in to it, but once it was back up I assumed everything was well. However a couple of hours later, the server was non-responsive again. I then disabled motion as that was the last piece of software I’d installed and the problem didn’t re-appear.

This weekend I installed 8Gb of new ram in to the server and thought with the extra ram the problem with motion would go away, but the same thing has happened again! I’ve actually got a screen shot of top from my session as the server becomes un-responsive.

top

I don’t know what I’ve configured incorrectly, but if you’re reading this and have a suggestion, drop me an email 🙂