Creating LVM In Oracle Linux
1. Ask the System Admin to add a raw disk into the Server
2. Check if the new RAW disk is available / reflected on the Server
[oracle@terminal#] lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 482K 0 rom
vda 251:0 0 100G 0 disk
├─vda1 251:1 0 1M 0 part
├─vda2 251:2 0 200M 0 part /boot/efi
├─vda3 251:3 0 1G 0 part /boot
└─vda4 251:4 0 35.8G 0 part
├─vg_main-lv_root 252:0 0 31.8G 0 lvm /
└─vg_main-lv_swap 252:1 0 4G 0 lvm [SWAP]
vdb 251:16 0 250G 0 disk ======>> New Disk
3. Create a Physical Volume using “pvcreate”
[oracle@terminal#] pvcreate /dev/vdb
Physical volume “/dev/vdb” successfully created.
[oracle@terminal#] pvdisplay
“/dev/vdb” is a new physical volume of “250.00 GiB”
— NEW Physical volume —
PV Name /dev/vdb
VG Name
PV Size 250.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID WerYt5-es0I-8lkA-EX5a-P281-iNca-P9BfRd
4. Create a Volume Group for the newly create Physical Volume
[oracle@terminal#] vgcreate vg00 /dev/vdb
Volume group “vg00” successfully created
5. Create Logical Volume and assigning full free space to that LVM
[oracle@terminal#] lvcreate -n oracle -l 100%FREE vg00
Logical volume “oracle” created.
6. Formatting the newly created LVM to xfs file system type
[oracle@terminal#] mkfs.xfs /dev/vg00/oracle
meta-data=/dev/vg00/oracle isize=512 agcount=4, agsize=16383744 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1 bigtime=0 inobtcount=0
data = bsize=4096 blocks=65534976, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=31999, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
Discarding blocks…Done.
7. Mounting the FileSystem using FSTAB entry
[oracle@terminal#] mkdir /u01
[oracle@terminal#] blkid /dev/vg00/oracle
/dev/vg00/oracle: UUID=”53c92252-7114-4fd3-94b1-c20a1d335a74″ BLOCK_SIZE=”512″ TYPE=”xfs”
[oracle@terminal#] vi /etc/fstab
[oracle@terminal#] cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Sat Mar 15 18:44:28 2025
#
# Accessible filesystems, by reference, are maintained under ‘/dev/disk/’.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run ‘systemctl daemon-reload’ to update systemd
# units generated from this file.
#
/dev/mapper/vg_main-lv_root / xfs defaults 0 0
UUID=83067c27-3b7d-4774-8fdc-5f2de97c639f /boot xfs defaults 0 0
UUID=A871-03D3 /boot/efi vfat defaults,uid=0,gid=0,umask=077,shortname=winnt 0 2
/dev/mapper/vg_main-lv_swap none swap defaults 0 0
UUID=53c92252-7114-4fd3-94b1-c20a1d335a74 /u01 xfs defaults 0 0 =========> New Entry
[oracle@terminal#] mount -a
mount: (hint) your fstab has been modified, but systemd still uses
the old version; use ‘systemctl daemon-reload’ to reload.
8. Validating if it got mounted successfully
[oracle@terminal#] df -hT
Filesystem Type Size Used Avail Use% Mounted on
devtmpfs devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs tmpfs 2.0G 8.6M 1.9G 1% /run
tmpfs tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/mapper/vg_main-lv_root xfs 32G 13G 20G 39% /
/dev/vda3 xfs 1014M 110M 905M 11% /boot
/dev/vda2 vfat 200M 6.0M 194M 3% /boot/efi
tmpfs tmpfs 391M 0 391M 0% /run/user/1000
/dev/mapper/vg00-oracle xfs 250G 1.8G 249G 1% /u01 <==================
9. Now you may start your Oracle Home 19c Installation on the Server
Oracle Solutions We believe in delivering tangible results for our customers in a cost-effective manner