Skip to main content

Logical Volume Manager (LVM) of MultiPath Block Storage

Logical Volume Manager (LVM) of MultiPath Block Storage

01.00. Attached Block Storage Device:

01.01. Check the attached block storage device on the host.

lsblk

If we can see the mpathX, where X = a, b, c etc. our block storage device provides by multipath channel. In that case we also check by- 'multipath -l' or 'multipath -ll' command.

01.02. Now check the mpathX block storage device and its associated representator disk.

sdb             8:16   0  600G  0 disk  
└─mpatha      253:5    0  600G  0 mpath 
sdc             8:32   0  600G  0 disk  
└─mpathb      253:6    0  600G  0 mpath 
sdd             8:48   0  600G  0 disk  
└─mpathc      253:7    0  600G  0 mpath 
sde             8:64   0    1T  0 disk  
└─mpathd      253:8    0    1T  0 mpath 
sdf             8:80   0  400G  0 disk  
└─mpathe      253:10   0  400G  0 mpath 
sdg             8:96   0    1T  0 disk  
└─mpathf      253:12   0    1T  0 mpath 
sdh             8:112  0    1T  0 disk  
└─mpathd      253:8    0    1T  0 mpath 
sdi             8:128  0  400G  0 disk  
└─mpathe      253:10   0  400G  0 mpath 
sdj             8:144  0    1T  0 disk  
└─mpathf      253:12   0    1T  0 mpath 
sdk             8:160  0  600G  0 disk  
└─mpatha      253:5    0  600G  0 mpath 
sdl             8:176  0  600G  0 disk  
└─mpathb      253:6    0  600G  0 mpath 
sdm             8:192  0  600G  0 disk  
└─mpathc      253:7    0  600G  0 mpath 

In that case, mpatha associated to sdb.

So, in the views of multipath our total diak and size will be.

fdisk /dev/mapper/mpatha size=600G
fdisk /dev/mapper/mpathb size=600G
fdisk /dev/mapper/mpathc size=600G
fdisk /dev/mapper/mpathd size=1.0T
fdisk /dev/mapper/mpathe size=400G
fdisk /dev/mapper/mpathf size=1.0T

02.00. Format the disk.

02.01. In that case, the attached block storage device is connected through multipath, so we use 'fdisk /dev/mapper/mpathX' command to format the disk.

fdisk /dev/mapper/mpatha -> p -> n -> Three Enter -> [Y] -> p -> t -> 8e -> Enter -> p -> w
fdisk /dev/mapper/mpathb -> p -> n -> Three Enter -> [Y] -> p -> t -> 8e -> Enter -> p -> w
fdisk /dev/mapper/mpathc -> p -> n -> Three Enter -> [Y] -> p -> t -> 8e -> Enter -> p -> w
fdisk /dev/mapper/mpathd -> p -> n -> Three Enter -> [Y] -> p -> t -> 8e -> Enter -> p -> w
fdisk /dev/mapper/mpathe -> p -> n -> Three Enter -> [Y] -> p -> t -> 8e -> Enter -> p -> w
fdisk /dev/mapper/mpathf -> p -> n -> Three Enter -> [Y] -> p -> t -> 8e -> Enter -> p -> w

In that workflow, we create a primary Linux LVM partition;

/dev/mapper/mpatha-part1       4096 1258291199 1258287104  600G 8e Linux LVM
/dev/mapper/mpathb-part1       4096 1258291199 1258287104  600G 8e Linux LVM
/dev/mapper/mpathc-part1       4096 1258291199 1258287104  600G 8e Linux LVM
/dev/mapper/mpathd-part1       4096 2147483647 2147479552 1024G 8e Linux LVM
/dev/mapper/mpathe-part1       4096 838860799 838856704    400G 8e Linux LVM
/dev/mapper/mpathf-part1       4096 2147483647 2147479552 1024G 8e Linux LVM

02.02. Enter the below command to commit all changes on run time.

partprobe

02.03. Check the formated disk.
blkid

/dev/mapper/mpatha: PTUUID="4302be30" PTTYPE="dos"
/dev/mapper/mpathb: PTUUID="a84320d1" PTTYPE="dos"
/dev/mapper/mpathc: PTUUID="b2e72e21" PTTYPE="dos"
/dev/mapper/mpathd: PTUUID="aacb7071" PTTYPE="dos"
/dev/mapper/mpathe: PTUUID="f743f2b8" PTTYPE="dos"
/dev/mapper/mpathf: PTUUID="63ba010e" PTTYPE="dos"
/dev/mapper/mpatha1: PARTUUID="4302be30-01"
/dev/mapper/mpathb1: PARTUUID="a84320d1-01"
/dev/mapper/mpathc1: PARTUUID="b2e72e21-01"
/dev/mapper/mpathd1: PARTUUID="aacb7071-01"
/dev/mapper/mpathe1: PARTUUID="f743f2b8-01"
/dev/mapper/mpathf1: PARTUUID="63ba010e-01"

Here, '/dev/mapper/mpatha1' is the formated partition of the block storage '/dev/mapper/mpatha'.

03.00. Create Physical Volume:

pvcreate [/partitin/of_the/disk]

Create physical volume using the above patrition.

pvcreate /dev/mapper/mpatha1
  Physical volume "/dev/mapper/mpatha1" successfully created.
pvcreate /dev/mapper/mpathb1
  Physical volume "/dev/mapper/mpathb1" successfully created.
pvcreate /dev/mapper/mpathc1
  Physical volume "/dev/mapper/mpathc1" successfully created.
pvcreate /dev/mapper/mpathd1
  Physical volume "/dev/mapper/mpathd1" successfully created.
pvcreate /dev/mapper/mpathe1
  Physical volume "/dev/mapper/mpathe1" successfully created.
pvcreate /dev/mapper/mpathf1
  Physical volume "/dev/mapper/mpathf1" successfully created.

04.00. Create Volume Group:

vgcreate [vg_name] [physical_volume_path]

vgcreate vg_u01 /dev/mapper/mpatha1
  Volume group "vg_u01" successfully created


05.00. Extend Volume Group:

We want to make a single mount point. So, we increase Volume group "vg_u01" by all our remaining Physical Volume.

vgextend [vg_name] [physical_volume_path]

vgextend vg_u01 /dev/mapper/mpathb1
  Volume group "vg_u01" successfully extended
vgextend vg_u01 /dev/mapper/mpathc1
  Volume group "vg_u01" successfully extended
vgextend vg_u01 /dev/mapper/mpathd1
  Volume group "vg_u01" successfully extended
vgextend vg_u01 /dev/mapper/mpathe1
  Volume group "vg_u01" successfully extended
vgextend vg_u01 /dev/mapper/mpathf1
  Volume group "vg_u01" successfully extended

06.00. Create Logical Volume:

lvcreate -l 100%VG -n [lv_name] [vg_name]

lvcreate -l 100%VG -n lv_u01 vg_u01
WARNING: xfs signature detected on /dev/vg_u01/lv_u01 at offset 0. Wipe it? [y/n]: y
  Wiping xfs signature on /dev/vg_u01/lv_u01.
  Logical volume "lv_u01" created.

07.00. Create File System:

We want to create xfs file system.

mkfs.xfs /dev/vg_name/lvname

mkfs.xfs /dev/vg_u01/lv_u01
meta-data=/dev/vg_u01/lv_u01     isize=512    agcount=32, agsize=34799616 blks
         =                       sectsz=4096  attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1    bigtime=0 inobtcount=0
data     =                       bsize=4096   blocks=1113581568, imaxpct=5
         =                       sunit=512    swidth=512 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=521728, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
Discarding blocks...Done.

08.00. Check the UUID:

blkid

/dev/mapper/vg_u01-lv_u01: UUID="e99622bc-aa32-4a88-a4b5-70a17668d0db" BLOCK_SIZE="4096" TYPE="xfs"

09.00. Mount to a Directory:

09.01. Create a directory.
mkdir /u01

09.02. Append the below line to '/etc/fstab' file.

tee -a /etc/fstab >/dev/null <<'EOF'
UUID=e99622bc-aa32-4a88-a4b5-70a17668d0db    /u01    xfs    defaults,_netdev    0    0
EOF

09.03. mount file system to directory.

mount -a

and check the direcroty size.

df -h

/dev/mapper/vg_u01-lv_u01  4.2T   30G  4.2T   1% /u01


10.00. Done for today!

Comments

Popular posts from this blog

Upgrading Issue for RHEL 7 to 8 With Leapp

Overview The Leapp utility is a framework for updating and upgrading operating systems as well as applications. The operations of this utility consist of two phases 1. the preupgrade Phase – that chack the upgrade possibilities and 2. the actual upgrade phase – that map packages between previous and current versions of the software packages. Issue – 01: After running ‘ sudo leapp preupgrade ‘ sometimes you find the below issue in ‘ /var/log/leapp/leapp-report.txt ‘. Detail: Risk Factor: high (inhibitor) Title: Leapp detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed. Summary: Support for the following RHEL 7 device drivers has been removed in RHEL 8: – pata_acpi Key: f08a07da902958defa4f5c2699fae9ec2eb67c5b Remediation: 1. Disable detected kernel drivers in order to proceed with the upgrade process using the rmmod or modprobe -r . rmmod – Simple program to remove a module from the Linux Kernel modprobe – Add and remove modules from the Linux Ke...

ORA-00800: soft external error arguments

The problem as stated: After upgrading the Oracle Database from 12c to 19c the following error generated in the alert log file. Actual Oracle Error Code: ORA-00800 After Upgrading from 12c to 19c ORA-00800: soft external error, arguments occured Oracle Database Enterprise 19c fails to start with error: ORA-00800: soft external error, arguments: [Set Priority Failed], [VKTM] Why does Insights prevent Oracle grid services from starting How to configure the User slice to allow Real-Time Scheduling for user processes In Alert Log: Errors in file /u01/app/oracle/diag/rdbms/orclproddbone/orclprod/trace/psbcdb_vktm_3529.trc (incident=1200048) (PDBNAME=CDB$ROOT): ORA-00800: soft external error, arguments: [Set Priority Failed], [VKTM], [Check traces and OS configuration], [Check Oracle document and MOS notes], [] Incident details in: /u01/app/oracle/diag/rdbms/orclproddbone/orclprod/incident/incdir_1200048/psbcdb_vktm_3529_i1200048.trc 2023-10-30T10:04:53.536165+06:00 Error attempting to elev...

The Oracle Management Server (OMS) host and port specified via OMS_HOST and EM_UPLOAD_PORT is not available

The Oracle Management Server (OMS) host and port specified via OMS_HOST and EM_UPLOAD_PORT is not available. 1.0. error message: Error Message: The Oracle Management Server (OMS) host and port specified via OMS_HOST and EM_UPLOAD_PORT is not available. Pass in a valid hostname and port number for the OMS to successfully deploy the agent. 1.1. deploy log: Log: /opt/gc_inst/em/EMGC_OMS1/sysman/agentpush/2023-11-07_16-09-23-PM/applogs/dblivesrv_deploy.log Execution of command cd /opt/agent/ADATMP_2023-11-07_16-09-23-PM;/opt/agent/ADATMP_2023-11-07_16-09-23-PM/agentDeploy.sh -ignorePrereqs ORACLE_HOSTNAME=dblivesrv AGENT_BASE_DIR=/opt/agent OMS_HOST=oemsrv.localdomain EM_UPLOAD_PORT=4903 AGENT_INSTANCE_HOME=/opt/agent/agent_inst b_doDiscovery=false START_AGENT=false b_forceInstCheck=true -force AGENT_PORT=3872 on host dblivesrv Failed 1.2. oms details: [oracle@oemsrv ~]$ $OMS_HOME/bin/emctl status oms -details Oracle Enterprise Manager Cloud Control 13c Release 5 Copyright (c) 1996, 2...