Add diskspace on CentOS 6.x

This procedure will only work if your configuration is using LVM. LVM is the default used during install, so this should be ok.

Start analyzing the usage of the disks.

fdisk -l

Shows that the volumes are on e.g. /dev/sda and that you are using an LVM system.

fdisk /dev/sda

In fdisk, create a new volume by pressing ‘n’. Create new primary partition (extended partition is not tested but should work). Change partition type by pressing ‘t’. Select partition type ‘8e’, this is Linux LVM.
Write down the results by pressing ‘w’ key. In case of doublt, press ‘m’ key to get help.

Now we need to re-read the partition table. Ether we restart the services or do a reboot.

shutdown -r now

After restarting the services, we check if all is ok and then proceed by creating the ‘Physical Volume Group’. The pvs command will show if it was created correctly. The example below assumes that your new partition is called /dev/sda4.

fdisk -l
pvcreate /dev/sda4
pvs

Now extend the volume group. Example assumes that name is VolGroup00, but fdisk will show you the exact name to be used. In case of doubt and you only have one volume group, the command vgs will show its name.

vgextend VolGroup00 /dev/sda4

Now extend its space, type the command vgdisplay to get the number of blocks to be extended. It should be displayed next to the label Free PE / Size. The example below assumes it shows Free PE / Size 3190 / xxxx.

vgdisplay
lvextend -l +3190 /dev/mapper/VolGroup00-LogVol00

After doing this, resize the file system. The command resize2fs assumes you are using ext4 which is the default.

resize2fs /dev/mapper/VolGroup00-LogVol00

Now check available disk space. It should be increased.

df

After finishing, do not forget to restart services or reboot.

shutdown -r now

Done !

Installing Code::Blocks on Linux Mint

Check what version of Mint you have:

cat /etc/debian_version

This should be Buster for the following to work. If you are on Stretch, please refer to: https://wxstuff.xaviou.fr/article/debian-repository.html

Import repository key:

wget -O- https://apt.xaviou.fr/key.asc | sudo apt-key add -

Create repository list:

sudo vi /etc/apt/sources.list.d/codeblocks.list

And insert following text:

deb https://apt.xaviou.fr/stable/ buster main
deb-src https://apt.xaviou.fr/stable/ buster main

Update your installation

sudo apt-get update

Now you are ready to install Code::Blocks from the packet manager or from the command line.

sudo apt-get install codeblocks