Skip to main content

Posts

Showing posts with the label LVM

Oracle Linux 9 Virtaul machine not bootable in KVM after Clone

In one of our customer Environments we cloned virtual machine using the disk and post clone completion virtual machine not booted up. The following Error occurred while booting up the VM. [ TIME ] Timed out waiting for device /dev/mapper/vg_rootdisk-volume. [DEPEND] Dependency failed for /filesystem [DEPEND] Dependency failed for D-Bus System Message Bus. Problem: File /etc/lvm/devices/system.devices configured with the disk_id of the OLVM disk image. If the VM is cloned the new VM will be on a new image with a different disk_id and that will prevent LVM from finding the logical volumes and hence its not able to boot the VM. Solution: Eidt /etc/lvm/devices/system.devices configuration file before creating the clone or copy. Change from IDTYPE=sys_serial and IDNAME= : # LVM uses devices listed in this file. # Created by LVM command lvmdevices pid 3503 at Jan 13 23:11:07 2024 VERSION=1.1.4 IDTYPE=sys_serial IDNAME=ad1a270f-10e9-41dc-a313-988d07e6b447 DEVNAME=/dev/sda2 PVID=...

Adding SWAP space by extending LVM volume

This blog post will guide you on how we can extend the swap space for an existing LVM volume. For using this method LVM volume must have free capacity to accommodate the new swap space. If the space is not available in an existing LVM then this method is not helpful. Check the existing swap : [root@racnode1 yum.repos.d]# grep swap /etc/fstab /dev/mapper/ol_racnode1-swap none swap defaults 0 0 [root@racnode1 yum.repos.d]# ls -l /dev/mapper/ol_racnode1-swap lrwxrwxrwx 1 root root 7 Mar 15 23:00 /dev/mapper/ol_racnode1-swap -> ../dm-1 [root@racnode1 yum.repos.d]# ls -al /dev/mapper/ol_racnode1-swap lrwxrwxrwx 1 root root 7 Mar 15 23:00 /dev/mapper/ol_racnode1-swap -> ../dm-1 [root@racnode1 yum.repos.d]# Before extending the swap volume disable the swap: [root@racnode1 yum.repos.d]# swapoff -v /dev/mapper/ol_racnode1-swap swapoff /dev/mapper/ol_racnode1-swap [root@racnode1 yum.repos.d]# Now extend the LVM swap volume: [root@racnode1 yum.repos.d]# ...