Azure

Azure – Linux – Change the time and time zone

Posted by robd on December 22, 2018
Linux, Server / No Comments

As you may have seen we have a Linux server in Azure running some weird stuff, anyhow the time was off screwing with reports and what not, so had to fix it.  Here’s what I did:

First, SSH onto the server and logon.

Check the time:

Find the timezone you would like:

Now change it:

Check it again:

Example:

Tags: , ,

Azure – Linux OS Partition

Posted by robd on December 15, 2018
Server / No Comments

Had an annoying issue where the OS disk on a linux server (hosted on Azure) was partitioned too small:

This disk is 30GB but has loads of free space::

Then partition /dev/sda2 on the disk: 

Feespace:

Here’s how I managed to grow the disk without loosing any data etc:

1) Login to the VM using SSH, we can check the size of the disk by using:

2) To proceed with the partition resize, we will use:

type: p
this will show both partitions /dev/sda1 and /dev/sda2 which are basically partitions 1 and 2

type: d then 2 (to delete partition 2)
type: n then p2 (to recreate partition 2) you can accept the default values
type: w (to save the new partition)
type: q (to exit fdisk)
sudo reboot (to reboot the VM so the partition is updated)

3) To finalize the resize, after the reboot, execute the command:

For Red Hat 7.3 and CentOS 7.3:

For Oracle 7.3:

 

Tags: ,

Copy Protected by Chetan's WP-Copyprotect.