Skip to content

This repo illustrate how to create logical volume and mount it into linux operating system

Notifications You must be signed in to change notification settings

DanielChuDC/how-to-create-logical-volume

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How-to-create-logical-volume

This repo illustrate how to create logical volume and mount it into linux operating system

Before you begin

Install the package in order to run the command in script example

#  Verify LVM is installed or not on the server.
rpm -qa |grep -i lvm


# Install the lvm2 package
yum install lvm2*

# Check the LVM version.
lvm version

Navigate to script example to know how to execute the command.

How to verfiy?

df -Th <the directory you create> The output should return you the example name as : /dev/mapper/icp----lv

# Display Information about PVs ,LVs, VGs.
pvdisplay
vgdisplay
lvdisplay

# Commands to Scan PVs, LVs and VGs

pvscan
vgscan
lvscan
# Note: All these commands, work properly on Redhat/Centos/Ubuntu systems

Note : example source code take from ibm-cloud-private-terraform-softlayer

You may find out how to provision IBM Cloud Private using terraform at there

Another Example

Requirement: let the directory below have 10GB disk size mount on Data disk

Create local directories as follows on each IBM Cloud Private worker node, and record the IP address of each worker node where the directories are created. You will need these values in the next step.
/k8s/data/cassandra - Cassandra persistent storage
mkdir -p /k8s/data/cassandraCopy
/k8s/data/zookeeper - Zookeeper persistent storage
mkdir -p /k8s/data/zookeeperCopy
/k8s/data/kafka - Kafka persistent storage
mkdir -p /k8s/data/kafkaCopy
/k8s/data/couchdb - CouchDB persistent storage
mkdir -p /k8s/data/couchdbCopy
/k8s/data/datalayer - Datastore persistent storage
mkdir -p /k8s/data/datalayer
  • Please see the complete version of example 1 to know how to mount the require disk above

How to verify the step above is successful?

  • Run lvscan
  • Run df -Th <the directory you created>

About

This repo illustrate how to create logical volume and mount it into linux operating system

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages