Posts

Showing posts with the label Operating System

AWS - Taking backup of an EC2 instance

Image
  In this post, we will see how to take a backup of a running EC2 instance as an AMI and how to clean up the AMI. I have an instance configured with root volume + data volume (1GB). Let's start taking backups by "Create Image". During AMI creation, EC2 creates snapshots for each volume. Now, we have AMI created. When I try to create an instance from the AMI, it automatically configures storage with 2 volumes and you cannot edit them. Now, Let's delete the AMI by "Deregister AMI".  NOTE: This will not impact running EC2s. But, no new EC2 can be created. 

OS Migration Across Local Disks - Oracle Linux 8

Image
  Host has 1 disk with 2 partitions (/boot and / of type xfs). Adding another disk of same size. [root@oraclevm ~]# fdisk -l  | grep -i disk  | grep -i dev Disk /dev/nvme0n1: 20 GiB, 21474836480 bytes, 41943040 sectors Disk /dev/nvme0n2: 20 GiB, 21474836480 bytes, 41943040 sectors Disk /dev/mapper/ol-root: 17 GiB, 18249416704 bytes, 35643392 sectors Disk /dev/mapper/ol-swap: 2 GiB, 2147483648 bytes, 4194304 sectors [root@oraclevm ~]# Existing OS: [root@oraclevm ~]# df -TH | grep -i xfs /dev/mapper/ol-root xfs        19G  5.6G   13G  31% / /dev/nvme0n1p1      xfs       1.1G  311M  754M  30% /boot [root@oraclevm ~]# Format the new disk in the same layout as 1st disk: /dev/nvme0n1: [root@oraclevm ~]# fdisk -l /dev/nvme0n1 Disk /dev/nvme0n1: 20 GiB, 21474836480 bytes, 41943040 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (mi...