Tags

11g (5) 12c (6) 18c (3) 19c (4) ASM (1) Critical Patch (11) Data Pump (1) Dataguard (9) Diverse (3) GRID (7) GitLab (2) Linux (8) OEM (2) ORA Errors (13) Oracle (12) RMAN (4)
Showing posts with label Create a physical volume in Linux using LVM. Show all posts
Showing posts with label Create a physical volume in Linux using LVM. Show all posts

Thursday, December 2, 2021

Create a physical volume in Linux using LVM

Create a physical volume in Linux using LVM


PURPOSE: All documents are provided on this Blog just for educational purposes only.  Please make sure that you run it in your test environment before to move on to production environment. 

Step 1:

fdisk /dev/sdd
Welcome to fdisk (util-linux 2.23.2).
 
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
 
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x33399fd3.
 
Command (m for help): p
 
Disk /dev/sdd: 1099.5 GB, 1099511627776 bytes, 2147483648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x33399fd3
 
   Device Boot      Start         End      Blocks   Id  System
 
Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-2147483647, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-2147483647, default 2147483647):
Using default value 2147483647
Partition 1 of type Linux and of size 1024 GiB is set
 
Command (m for help): w
The partition table has been altered!
 

Calling ioctl() to re-read partition table.

 

Step 2:

LVM

pvcreate /dev/sdb1
pvdisplay
pvs
vgcreate vg_db /dev/sdb1
lvcreate --name lv_db -l 100%FREE vg_db
 
mkfs.xfs /dev/mapper/vg_db-lv_db
mkdir /oracle
mount /dev/mapper/vg_db-lv_db /oracle
 
Add the entry in the fstab file.
vi /etc/fstab

dev/mapper/vg_db-lv_db        / oracle                    xfs     defaults        0 0 

physical standby without duplicate command

physical standby without duplicate command create a physical standby database using RMAN without using duplicate command PURPOSE:   All docu...