LVM: increase size of existing logical volumes without reboot/new partition

Sometimes it is necessary to increase the size of your logical volume but you cannot/want reboot and/or create a new partition.

  1. Increase the hard disk space by allocating it on the host system to the your virtual machine
  2. echo 1>/sys/class/block/sdaX/device/rescan so that you VM knows the new hard disk capacity
  3. use parted (or your personal preference) to increase the partition size
    • Tip: run unit kb in parted for a more precise aligning of the partitions
    • Tip 2: keep in mind that you have to increase both logical parition and lvm flagged partition. Logical partitions are like containers for the lvm flagged partition.
  4. Increase LVM Physical device: pvresize /dev/sdX
  5. Increase LVM Logical Volume: lvextend -l+100%FREE /dev/mapper/XX
  6. Increase FileSystem: resize2fs /dev/mapper/XX

Done!

Python/Django development on Windows with WSL

Microsoft offers the WSL feature (Windows Subsystem for Linux) for a couple of years now (since 2016 to be precise). This can be perfectly used for setting up your local development environment. It won’t take much longer than Windows native and comes with more comfort especially when you start to integrate other dependencies like MySQL. Setting up MySQL+Python on Windows is really everything else then nice.

Continue reading “Python/Django development on Windows with WSL”

Custom deployment of Angular applications within your Continuous Delivery

Angular provides already a ng build command as well as an option for production environment. But how can this be transfered to your existing continuous delivery infrastructure. Imaging you have got a Bamboo or Jenkins responsible for building and deploying your software application.

Continue reading “Custom deployment of Angular applications within your Continuous Delivery”

Redirect domain always to subdomain (eg. www) in .htaccess

You might want to redirect your website always to www and avoid duplicate content on search engines by providing your website by both domain and www-subdomain. 

RewriteEngine On

RewriteCond %{HTTP_HOST} ^web-devil.com$
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=302]
Continue reading “Redirect domain always to subdomain (eg. www) in .htaccess”