Tuesday, July 28, 2020

All about Logical Volume Management (LVM) (PV, VG,LV)

Logical Volume Management (LVM) Explained

Logical Volume Management (LVM) introduces a flexible layer of abstraction over physical storage devices in Linux. This abstraction allows for dynamic management of storage volumes, making it easier to resize, move, and manage disk space without necessarily stopping applications or unmounting file systems. LVM hides the underlying physical disk sizes from the software, providing greater agility in storage administration.

LVM Components

LVM is built upon three core components:

  • Physical Volume (PV):

    • A PV is a raw block device, which can be an entire hard disk (e.g., /dev/sdb) or a partition of a disk (e.g., /dev/sda2).

    • PVs are the foundational building blocks of LVM.

  • Volume Group (VG):

    • A VG is a collection of one or more Physical Volumes (PVs).

    • It acts as a container for Logical Volumes, pooling the storage capacity of its constituent PVs.

  • Logical Volume (LV):

    • An LV represents a portion of a Volume Group (VG).

    • It is the equivalent of a traditional disk partition but with the added flexibility of LVM.

    • A Logical Volume can only belong to one Volume Group.

    • It is on a Logical Volume that you create a file system (e.g., ext4, XFS) and mount it for use by the operating system and applications.

LVM Commands and Examples

Here are common LVM commands and their output examples, demonstrating how to inspect your LVM setup:

Physical Volumes (PVs)

  • pvs (or pvdisplay, pvscan): Displays information about Physical Volumes.

    PV          VG                 Fmt  Attr PSize    PFree
    /dev/sda2   osvg               lvm2 a--  <59.00g      0
    /dev/sdb    oracle_application lvm2 a--  <330.00g <25.00g
    
    • /dev/sda2 is a PV belonging to the osvg Volume Group, with no free space.

    • /dev/sdb is a PV belonging to the oracle_application Volume Group, with 25.00GB of free space.

Volume Groups (VGs)

  • vgs (or vgdisplay, vgscan): Displays information about Volume Groups.

    VG                 #PV #LV #SN Attr   VSize    VFree
    oracle_application   1   4   0 wz--n- <330.00g <25.00g
    osvg                 1   5   0 wz--n-  <59.00g      0
    
    • oracle_application VG has 1 PV, 4 LVs, a total size of <330.00GB, and <25.00GB free.

    • osvg VG has 1 PV, 5 LVs, a total size of <59.00GB, and 0GB free.

Logical Volumes (LVs)

  • lvs (or lvdisplay, lvscan): Displays information about Logical Volumes.

    LV          VG                 Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
    app         oracle_application -wi-ao----   5.00g
    gridinfra   oracle_application -wi-ao---- 100.00g
    oracle      oracle_application -wi-ao---- 100.00g
    orasoftware oracle_application -wi-ao---- 100.00g
    homelv      osvg               -wi-ao----   4.00g
    rootlv      osvg               -wi-ao----  19.00g
    swaplv      osvg               -wi-ao---- <16.00g
    tmplv       osvg               -wi-ao----  12.00g
    varlv       osvg               -wi-ao----   8.00g
    
    • This output shows various Logical Volumes, their corresponding Volume Groups, and their allocated sizes.

Basic LVM Creation Commands

Here are the fundamental commands for creating LVM components:

  • Create a Physical Volume (PV):

    pvcreate /dev/sdb
    # To create multiple PVs:
    pvcreate /dev/sdb /dev/sdc
    
  • Create a Volume Group (VG):

    vgcreate oracle_application /dev/sdb
    # To create a VG from multiple PVs:
    vgcreate oracle_application /dev/sdb /dev/sdc
    
  • Create a Logical Volume (LV):

    lvcreate -L 5G -n app oracle_application
    # This creates a 5GB Logical Volume named 'app' within the 'oracle_application' Volume Group.
    

Thursday, July 16, 2020

How to find latest Patch in oracle

Critical Patch Update (CPU) Program Jul 2020 Patch Availability Document (PAD)

Document ID: 2664876.1 (Available on My Oracle Support - MOS)

Overview

The Oracle Critical Patch Update (CPU) Program provides quarterly cumulative patches to address security vulnerabilities across various Oracle products. These patches are crucial for maintaining the security and stability of Oracle environments.

The Critical Patch Update (CPU) Program Jul 2020 Patch Availability Document (PAD) (Doc ID 2664876.1) specifically outlines the patches and minimum release requirements for the Critical Patch Updates (CPUs) and Patch Set Updates (PSUs) released on July 14, 2020.

Purpose and Scope

  • Purpose: This document defines the specific patches and minimum releases for the various Oracle product suites that received updates in the July 2020 CPU. This includes, but is not limited to:

    • Oracle Database Product Suite

    • Fusion Middleware Product Suite

    • Exalogic

    • Enterprise Manager Suite

  • Scope: This document is primarily intended for Database Administrators and other IT professionals responsible for applying quarterly security patches to Oracle systems.

Key Information in the PAD

The PAD (Doc ID 2664876.1) typically provides detailed information, including:

  • Affected Products and Versions: A comprehensive list of all Oracle products and their specific versions impacted by the July 2020 CPU.

  • Patch Numbers: The actual patch numbers (e.g., for Release Updates, Release Update Revisions, Bundle Patches, or PSUs) that need to be applied.

  • Dependencies and Prerequisites: Information on any prerequisite patches or minimum OPatch versions required before applying the July 2020 CPU.

  • Error Correction Information: Details on the final CPU program patch for products that have reached the end of their error correction support.

  • Modification History: As PADs are often updated, a modification history section tracks changes made to the document after its initial release.

Importance of Applying CPUs

Oracle strongly recommends that customers remain on actively supported versions of their products and apply Critical Patch Update security patches without delay. This is because these updates address vulnerabilities that could potentially be exploited maliciously, even if Oracle has already released patches for them.

Note: To access the full content of Doc ID 2664876.1, you must have a valid support contract with Oracle and log in to My Oracle Support (support.oracle.com).