Growing the file system of a default Centos 7 install

6 Mar

If you’re deploying a Centos.7 VM image and need to resize it, there are two options:

  • Add an additional disk add incorporate it as a LVM physical volume
  • Extend the current physical volume and grow the PV and LV

I’m going for the second one in my test setup, for a default CentOS 7 install these are the steps:

  1. Power off the VM.
  2. Increase the size of the disk.
  3. Power on and run disk, removing the current LVM partition and recreating it to expand it to the new size (in my test setup, this is /dev/sda and the second partition, /dev/sda2).
  4. Reboot again, in order to make the kernel pickup on the new partitioning.
  5. Resize the physical volume: pvresize /dev/sda2
  6. Verify the new size with pvdisplay
  7. Grow the logical volume by adding all the available space:
    lvresize -l +100%FREE /dev/centos/root
  8. Finally, grow the actual root partition – no need to reboot:
    xfs_growfs /

Turning off buffering

1 Mar

Often you need to turn of buffering of stdout. I can never for the life of me remember the command for this, so here it is:

stdbuf -i0 -o0 -e0 command

Keeping track of sysadmin actions

16 Jan

I’ve been using Unix for quite a while. A few decades, actually.

For all this time, I’ve always kept notes on the commands done when installing and upgrading important services. For some reason, the very handy tool “script” has completely eluded my until now – it’s a little bit easier then logging from screen or tmux, invoked as simple as:

root@firewall1:/mnt# script install.log
Script started, file is install.log
root@vpn:/mnt# apt-get install openvpn
Reading package lists… Done
Building dependency tree
Reading state information… Done

root@vpn:/mnt# exit
Script done, file is install.log

What goes in the file is the entire session, just as in a tmux log but a little easier to get it going. I’ll add it to my documentation toolbox for sure!


Building a CentOS test VM

12 Dec

This is just some notes regarding how to create a CentOS 7 performance test VM.

Work in progress!

  • Start with a CentOS 7 minimal ISO
  • Bring up networking: nmtui
  • Configure proxy settings in .bash_profile, if needed
  • Enable the EPEL (Extra Packages for Enterprise Linux): yum install epel-release
  • yum install iperf iperf3 git texinfo
  • yum groupinstall ‘Development Tools’
  • git clone
  • Edit ,uncomment AC_CHECK_SA_LEN macro
  • Edit configure, change am__api_version from 1.14 to 1.13 to match aclocal version
  • Diff for the two above steps here: netperf-centos7.patch
  • ./configure
  • make install

My DMZ: Small but functional

15 Sep

Although I am working with Cloud technology professionally, personally I like to keep my services local. I really like being able to see the servers and disks that are processing and holding my data and I really enjoy setting up the hardware and configuring the operating system and the services running on top.

Hosting services at home isn’t always that easy, though. One thing that usually simplifies things is to have a static IP. Another thing, at least if you want to secure your web servers with SSL certificates, is being able to have multiple IP addresses. Unfortunately I am currently stuck with a provider that offers neither to private customers so I have to make do with just one dynamic IP. Well, necessity is the mother of invention, so read on for the full story of my DMZ setup.

Continue reading

The Tower of Pi

22 Aug



So this is my new DMZ setup – a more technical write-up will follow. I’m really happy that the disks fits so nicely on the “shelves”. The “tower” comes from ModMyPi.

Boosting uplink speed on iwlwifi

4 Jul

So I just made sure to have a symmetric up-link and down-link speed on my fiber connection (100/100 Mb/s). It turned out that my Thinkpad W530 (running Ubuntu 16.04 couldn’t keep up with the up-link speed – I just got around 20 Mb/s.

Thanks to ArchLinux it turned out that this was partly solved by enabling antenna aggregation. I’m now getting at least 60 Mb/s which is not perfect, but acceptable.

Backup strategies, part 1

10 Apr

Backing up is easy, right?

There’s nothing more important than to make sure that your valuable data is backed up in the right way so that, when disaster strikes, you’re covered and get back to where you left off as soon as possible.

While that may sound simple, it really isn’t. There’s a wealth of different backup solutions out there, but in order to succeed with any of them you must have done some planning first which usually boils down to the following steps: Continue reading