Sunday, October 26, 2014

Adding a new disk to an LVM Ubuntu system

Today I'm adding another disk to my main Linux server.

I used cgdisk to write a partition table. I set the partition type to 8e00 for LVM (Logical Volume Manager?)

sudo pvcreate /dev/sdb1

$ sudo lvcreate --extents 100%FREE -n lvdisk2 vgdisk2 
  Logical volume "lvdisk2" created

$ sudo vgcreate vgdisk2 /dev/sdb1

  Volume group "vgdisk2" successfully created

sudo mkdir /mnt/disk2
sudo mount /dev/vgdisk2/lvdisk2 /mnt/disk2/

And it's up!

Tuesday, October 21, 2014

Avoiding Paralells price gouging

Paralells makes a virtual machine software for the Mac, called Paralells Desktop. They said I needed to upgrade their product to before upgrading to Mac OS X 10.10 Yosemite (although it seems they may have been lying).

The upgrade price in the US is $50, but if you're located in Europe they charge you $76 for exactly the same thing. Not a respectful way to treat your customers to charge 50% more for a download depending on where you live. (Note - it's not just the VAT).

So, the way to avoid paying their EU surcharge is to use a free web proxy like Go to the site, enter "" in the web address box, and navigate to the download you want. Note: don't enter any credit card details using the web proxy since it circumvents encryption. But enter your e-mail address and pay by Paypal. It's OK to enter an EU address. The price ended up being $59.41 including VAT.

There you go - save some money!

Thursday, October 02, 2014

Ubuntu server maintenance

I'm doing some server maintenance today.

The main reason being that Ubuntu 13.10 systems are not updated to fix the Shellshock security hole, so I'll try to upgrade my main server to 14.04 or 14.10.

I had a full /boot partition first which I needed to fix. I had to move two initrd files (initrd.img-3.11.0-15-generic and initrd.img-3.11.0-17-generic) to /tmp temporarily to be able to fix it.

I then did an "apt-get install -f" to fix some broken package stuff, probably due to the full /boot partition.

I still got some out of diskspace errors, so I guess I have to move another initrd or two to /tmp:

run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.11.0-26-generic /boot/vmlinuz-3.11.0-26-generic
update-initramfs: Generating /boot/initrd.img-3.11.0-26-generic
gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.11.0-26-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.11.0-26
Rerunning "sudo apt-get -f install". It's very slow when doing "running depmod". Success! I now have 23M free on /boot. 

I'll try running apt-get autoremove. I now have 87 MB free on /boot.

I now do:

sudo apt-get purge linux-image-3.11.0-23-generic
sudo apt-get purge linux-image-3.11.0-24-generic
sudo apt-get purge linux-image-3.11.0-15-generic 
The last command removed the running kernel, which I hadn't really planned to do. Oh well. Now I have 155 MB free on /boot.

Actually, I got a bit worried, so I reinstalled the running kernel (3.11.0-15). 140 MB free.

Now I'll try again to upgrade to 14.04:

Hm. I did some kind of resurrect in the previously failed 14.04 installation window. I wonder if the installation restarted properly? I don't dare to interrupt it, so I'll let it run.

Rebooted after 240 days uptime. It is taking a very long time with the hard disk light on. I hope it is just a forced fsck.

For some reason the network didn't come up on the first boot, but after the next reboot.