This document provides a cheat sheet on common Logical Volume Manager (LVM) commands for displaying, creating, modifying, and troubleshooting physical volumes (PVs), volume groups (VGs), and logical volumes (LVs) in Linux. It lists directory locations and files related to LVM, describes tools for diagnostics and debugging, and provides examples of commands for scanning and managing PVs, VGs, and LVs, including displaying information, creating, extending, reducing, removing, and changing attributes of volumes. It also discusses snapshots, mirroring, and procedures for repairing corrupted LVM metadata with and without replacing faulty disks.
Course 102: Lecture 24: Archiving and Compression of Files Ahmed El-Arabawy
This lecture discusses the different commands and utilities used for archiving and compression of files and directories in Linux
Video for this lecture on youtube:
http://www.youtube.com/watch?v=R6ZQ6PJyy28
Check the other Lectures and courses in
http://Linux4EnbeddedSystems.com
or Follow our Facebook Group at
- Facebook: @LinuxforEmbeddedSystems
Lecturer Profile:
Ahmed ElArabawy
- https://www.linkedin.com/in/ahmedelarabawy
The RAID stands for "Redundant Array of Inexpensive Disks" or "Redundant Array of Independent Disks") is a virtualization technology for data storage that incorporates multiple components of physical disc drives into one or more logical units for data replication, performance enhancement or both purposes.
This presentation helps to understand about RAID technology, working, types and different standard levels with their advantages and disadvantages.
Page cache mechanism in Linux kernel.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Course 102: Lecture 24: Archiving and Compression of Files Ahmed El-Arabawy
This lecture discusses the different commands and utilities used for archiving and compression of files and directories in Linux
Video for this lecture on youtube:
http://www.youtube.com/watch?v=R6ZQ6PJyy28
Check the other Lectures and courses in
http://Linux4EnbeddedSystems.com
or Follow our Facebook Group at
- Facebook: @LinuxforEmbeddedSystems
Lecturer Profile:
Ahmed ElArabawy
- https://www.linkedin.com/in/ahmedelarabawy
The RAID stands for "Redundant Array of Inexpensive Disks" or "Redundant Array of Independent Disks") is a virtualization technology for data storage that incorporates multiple components of physical disc drives into one or more logical units for data replication, performance enhancement or both purposes.
This presentation helps to understand about RAID technology, working, types and different standard levels with their advantages and disadvantages.
Page cache mechanism in Linux kernel.
Note: When you view the the slide deck via web browser, the screenshots may be blurred. You can download and view them offline (Screenshots are clear).
Performance evolution of raid is a presentation slide about RAID, Its classification, Importance,Concept about RAID,Standard Raid Level,Implementation of Raid, Performance and Advantages Comparison among RAID Levels.
Hope It will be helpfull..................
Setting up a GeoServer can sometimes be deceptively simple. However, going from proof-of-concept to production requires a number of steps to be taken in order to optimize the server in terms of availability, performance and scalability. The presentation will show how to get from a basic setup to a battle-ready, rock-solid installation.
Case study of BtrFS: A fault tolerant File systemKumar Amit Mehta
A case study of Fault Tolerance features of BTRFS. These slides were prepared for the coursework for a Masters level program at Tallinn University of Technology, Estonia. A lot of materials in the slides are taken from the materials in the public domain. Many thanks to the people on BTRFS IRC Channel.
This presentation is from the ZFS Tutorial presented at the USENIX LISA09 Conference at Baltimore, Maryland in November 2009.
Later versions are available on slideshare.net, too.
Configure Golden Gate Initial Load and Change SyncArun Sharma
We will configure initial load along with change sync inside Oracle Golden Gate.
Here is the full article link: https://www.support.dbagenesis.com/post/configure-golden-gate-initial-load-and-change-sync
Topics: Brief concept about LVM
To know more about
Offer- http://mazenet-chennai.in/mazenet-offers.html
Syllabus- http://www.mazenet-chennai.in/redhat-training-in-chennai.html
Slide share- http://www.slideshare.net/mazenet_solution/presentations
For more events- http://mazenet-chennai.in/mazenet-events.html
All videos- https://www.youtube.com/c/Mazenetsolution
Facebook- https://www.facebook.com/Mazenet.IT.Solution/
Twitter- https://twitter.com/Maze_net
Mail us - marketing@mazenetsolution.com
Contact- 9629728714
Performance evolution of raid is a presentation slide about RAID, Its classification, Importance,Concept about RAID,Standard Raid Level,Implementation of Raid, Performance and Advantages Comparison among RAID Levels.
Hope It will be helpfull..................
Setting up a GeoServer can sometimes be deceptively simple. However, going from proof-of-concept to production requires a number of steps to be taken in order to optimize the server in terms of availability, performance and scalability. The presentation will show how to get from a basic setup to a battle-ready, rock-solid installation.
Case study of BtrFS: A fault tolerant File systemKumar Amit Mehta
A case study of Fault Tolerance features of BTRFS. These slides were prepared for the coursework for a Masters level program at Tallinn University of Technology, Estonia. A lot of materials in the slides are taken from the materials in the public domain. Many thanks to the people on BTRFS IRC Channel.
This presentation is from the ZFS Tutorial presented at the USENIX LISA09 Conference at Baltimore, Maryland in November 2009.
Later versions are available on slideshare.net, too.
Configure Golden Gate Initial Load and Change SyncArun Sharma
We will configure initial load along with change sync inside Oracle Golden Gate.
Here is the full article link: https://www.support.dbagenesis.com/post/configure-golden-gate-initial-load-and-change-sync
Topics: Brief concept about LVM
To know more about
Offer- http://mazenet-chennai.in/mazenet-offers.html
Syllabus- http://www.mazenet-chennai.in/redhat-training-in-chennai.html
Slide share- http://www.slideshare.net/mazenet_solution/presentations
For more events- http://mazenet-chennai.in/mazenet-events.html
All videos- https://www.youtube.com/c/Mazenetsolution
Facebook- https://www.facebook.com/Mazenet.IT.Solution/
Twitter- https://twitter.com/Maze_net
Mail us - marketing@mazenetsolution.com
Contact- 9629728714
OpenStack Summit Vancouver: Lessons learned on upgradesFrédéric Lepied
Deploying OpenStack in production at any scale, upgrade support is one of the requirements to have a successful deployment. Without upgrade management, adeployment will have bugs and security issues from day 1. Also in longer term, it will miss the latest features that OpenStack offers.
One of the impediments to becoming an active technical contributor in the OpenStack community is setting up an efficient R&D environment which includes deploying a simple cloud. Using RDO-manager, get a basic cloud up and running with the fewest steps and minimal hardware so you can focus on the fun stuff - development
Status of the RPM Factory experiment to become the forge to build the OpenStack RPM packages for the RDO project. Presented at the RDO Day pre-FOSDEM 2016.
Presentation given at the OpenStack summit in Paris (Kilo) on Tue Nov 4th.
Last summit I had the pleasure to present a talk which encountered some success "Are enterprise ready for the OpenStack transformation?" (also published on SlideShare) . This talk is a follow up on what are the best practices that are successful in operating the transformation. We will first focus on identifying the right use cases for a generic enterprise, then define a roadmap with an organisational and a technical track, to finish with the definition what would be our success criterias for our group. This will happen as a workshop summary based on the multiple engagements eNovance has been delivering over the past 2 years.
Inspection and maintenance tools (Linux / OpenStack)Gerard Braad
This handout is part of the training at UnitedStack and will introduce you to several inspection and maintenance tools.
It is generated from the slides at: http://gbraad.gitlab.io/tools-training/
Source: https://gitlab.com/gbraad/tools-training
Logical Volume Management ("LVM") on linux looks like a complicated mess at first. The basics are not all that hard, and some features like mirroring, dynamic space management, snapshots for stable backups, mirroring, and over-provisioning via thin volumes can save a lot of time and effort.
In his previous talk, Paul talked about getting your system to work with SELinux. This involved setting the security on your files and directories so that they worked with SELinux. However, many people have customised their Linux installs and want SELinux to do what they say, not the other way around. Sysadmins in particular are not 'run of the mill' users, and they have different requirements to what typically comes out of the box. Situations such as serving web pages from NFS shares or non-standard directories, or installing applications in custom locations, need specialised configuration of SELinux in order to make it work with your needs.
This talk will deal with those situations. Fortunately for Sysadmins, much of the work in developing SELinux policies for Linux has focussed on their requirements. Paul will show you a few of the things behind
the scenes that make your job as a Sysadmin much easier and safer with SELinux.
RH202 CertMagic Exam contains all the questions and answers to pass RH202 IT Exam on first try. The Questions & answers are verified and selected by professionals in the field and ensure accuracy and efficiency throughout the whole Product
Trying and evaluating the new features of GlusterFS 3.5Keisuke Takahashi
My presentation in LinuxCon/CloudOpen Japan 2014.
It has passed few days since GlusterFS 3.5 released so feel free to correct me if you find my mistakes or misunderstandings. Thanks.
Gianluca Arbezzano Wordpress: gestione delle installazioni e scalabilità con ...Codemotion
Uno degli argomenti più importanti per chi utilizza wordpress è la condivisione dello stesso server, brutto a dirsi ma in questo settore si tende ad installare su una sola macchina un numero molto alto di siti. Vediamo come Docker può venirci incontro per organizzare al meglio le nostre installazioni e come può diventare un opportunità per gestire al meglio le risorse anche in vista di una crescita improvvisa e di una necessità di scalata orizzontale.
Hands on Docker - Launch your own LEMP or LAMP stack - SunshinePHPDana Luther
In this tutorial we will go over setting up a standard LEMP stack for development use and learn how to modify it to mimic your production/pre-production environments as closely as possible. We will go over how to switch from Nginx to Apache, upgrade PHP versions and introduce additional storage engines such as Redis to the equation. We'll also step through how to run both unit and acceptance suites using headless Selenium images in the stack. Leave here fully confident in knowing that whatever environment you get thrown into, you can replicate it and work in it comfortably.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Red hat lvm cheatsheet
1. 7/6/2015 RedHat LVM cheatsheet
http://www.datadisk.co.uk/html_docs/redhat/rh_lvm.htm 1/5
Logical Volume Manager (LVM)
This is a quick and dirty cheat sheet on LVM using Linux, I have highlighted many of the common attributes for each command however
this is not an extensive list, make sure you look up the command.
With the pvs, vgs and lvs commands, the number of verboses added the more verbose information for example pvs vvvvv
Directory and Files
Directories and Files
## Directories
/etc/lvm ‐ default lvm directory location
/etc/lvm/backup ‐ where the automatic backups go
/etc/lvm/cache ‐ persistent filter cache
/etc/lvm/archive ‐ where automatic archives go after a volume group change
/var/lock/lvm ‐ lock files to prevent metadata corruption
# Files
/etc/lvm/lvm.conf ‐ main lvm configuration file
$HOME/.lvm ‐ lvm history
Tools
diagnostic
lvmdump
lvmdump ‐d <dir>
dmsetup [info|ls|status]
Note: by default the lvmdump command creates a tar ball
Physical Volumes
display
pvdisplay ‐v
pvs ‐v
pvs ‐a
pvs ‐‐segments (see the disk segments used)
pvs attributes are:
1. (a)llocatable
2. e(x)ported
scanning
pvscan ‐v
Note: scans for disks for non‐LVM and LVM disks
adding
pvcreate /dev/sdb1
## Create physical volume with specific UUID, used to recover volume groups (see miscellaneous section)
pvcreate ‐‐uuid <UUID> /dev/sdb1
Common Attributes that you may want to use:
‐M2 create a LVM2 physical volume
removing pvremove /dev/sdb1
checking
pvck ‐v /dev/sdb1
Note: check the consistency of the LVM metadata
change physical attributes
## do not allow allocation of extents on this drive, however the partition must be in a vg otherwise you get an error
pvchange ‐x n /dev/sdb1
Common Attributes that you may want to use:
‐‐addtag add a tag
‐x allowed to allocate extents
‐u change the uuid
moving
pvmove ‐v /dev/sdb2 /dev/sdb3
Note: moves any used extents from this volume to another volume, in readiness to remove that volume. However you cannot use
this on mirrored volumes, you must convert back to non‐mirror using "lvconvert ‐m 0"
Volume Groups
display
vgdisplay ‐v
vgs ‐v
vgs ‐a ‐o +devices
vgs flags:
#PV ‐ number of physical devices
#LV ‐ number of configured volumes
vgs attributes are:
1. permissions (r)|(w)
2. resi(z)eable
2. 7/6/2015 RedHat LVM cheatsheet
http://www.datadisk.co.uk/html_docs/redhat/rh_lvm.htm 2/5
3. e(x)ported
4. (p)artial
5. allocation policy ‐ (c)ontiguous, c(l)ing, (n)ormal, (a)nywhere, (i)nherited
6. (c)luster
scanning vgscan ‐v
creating
vgcreate VolData00 /dev/sdb1 /dev/sdb2 /dev/sdb3
vgcreate VolData00 /dev/sdb[123]
## Use 32MB extent size
vgcreate VolData00 ‐s 32 /dev/sdb1
Common Attributes that you may want to use:
‐l maximum logical volumes
‐p maximum physical volumes
‐s physical extent size (default is 4MB)
‐A autobackup
extending vgextend VolData00 /dev/sdb3
reducing
vgreduce VolData00 /dev/sdb3
vgreduce ‐‐removemissing ‐‐force VolData00
removing
vgremove VolData00
Common Attributes that you may want to use:
‐f force the removal of any logical volumes
checking
vgck VolData00
Note: check the consistency of the LVM metadata
change volume attributes
vgchange ‐a n VolData00
Common Attributes that you may want to use:
‐a control availability of volumes within the group
‐l maximum logical volumes
‐p maximum physical volumes
‐s physical extent size (default is 4MB)
‐x resizable yes or no (see VG status in vxdisplay)
renaming
vgrename VolData00 Data_Vol_01
note: the volume group must not have any active logical volumes
converting metadata type
vgconvert ‐M2 VolData00
Note: vgconvert allows you to convert from one type of metadata format to another for example from LVM1 to LVM2, LVM2 offers
bigger capacity, clustering and mirroring
merging
# the old volumes group will be merged into the new volume group
vgmerge New_Vol_Group Old_Vol_Group
Note: you must unmount any fielsystems and deactivate the vg that is being merged "vgchange ‐a n <vg>", then you can activiate it
again afterwards "vgchange ‐a y <vg>", then perform a vgscan, dont forget to backup the configuration
spliting vgsplit Old_Vol_Group New_Vol_Group [physical volumes] [‐n logical volume name]
importing
vgimport VolData00
Common Attributes that you may want to use:
‐a import all exported volume groups
exporting
## to see if a volume has already been export use "vgs" and look at the third attribute should be a x
vgexport VolData00
Common Attributes that you may want to use:
‐a export all inactive volume groups
backing up
## Backup to default location (/etc/lvm/backup)
vgcfgbackup VolData00
# Backup to specific location
vgcfgbackup ‐f /var/backup/VolData00_bkup VolData00
# Backup to specific location all volume groups (notice the %s)
vgcfgbackup ‐f /var/backup/vg_backups_%s
Note: the backup is written in plain text and are by default located in /etc/lvm/backup
vgcfgrestore ‐f /var/backup/VolData00_bkup VolData00
Common Attributes that you may want to use:
3. 7/6/2015 RedHat LVM cheatsheet
http://www.datadisk.co.uk/html_docs/redhat/rh_lvm.htm 3/5
restoring
‐l list backups of file
‐f backup file
‐M metadataype 1 or 2
cloning
vgimportclone /dev/sdb1
Note: used to import and rename duplicated volume group
special files
vgmknodes VolData00
Note: recreates volume group directory and logical volume special files in /dev
Logical Volumes
display
lvdisplay ‐v
lvdisplay ‐‐maps display mirror volumes
lvs ‐v
lvs ‐a ‐o +devices
## lvs commands for mirror volumes
lvs ‐a ‐o +devices
lvs ‐a ‐o +seg_pe_ranges ‐‐segments
## Stripe size
lvs ‐v ‐‐segments
lvs ‐a ‐o +stripes,stripesize
## use complex command
lvs ‐a ‐o +devices,stripes,stripesize,seg_pe_ranges ‐‐segments
lvs attributes are:
1. volume type: (m)irrored, (M)irrored without initail sync, (o)rigin, (p)vmove, (s)napshot, invalid (S)napshot, (v)irtual, mirror (i)mage
mirror (I)mage out‐of‐sync, under (c)onversion
2. permissions: (w)rite, (r)ead‐only
3. allocation policy ‐ (c)ontiguous, c(l)ing, (n)ormal, (a)nywhere, (i)nherited
4. fixed (m)inor
5. state: (a)ctive, (s)uspended, (I)nvalid snapshot, invalid (S)uspended snapshot, mapped (d)evice present with‐out tables,
mapped device present with (i)nactive table
6. device (o)pen (mounted in other words)
scanning
lvscan ‐v
lvmdiskscan
creating
## plain old volume
lvcreate ‐L 10M VolData00
## plain old volume but use extents, use 10 4MB extents (if extent size is 4MB)
lvcreate ‐l 10 VolData00
## plain old volume but with a specific name web01
lvcreate ‐L 10M ‐n web01 VolData00
## plain old volume but on a specific disk
lvcreate ‐L 10M VolData00 /dev/sdb1
## a striped volume called lvol1 (note the captial i for the stripe size), can use ‐l (extents) instead of ‐L
lvcreate ‐i 3 ‐L 24M ‐n lvol1 vg01
## Mirrored volume
lvcreate ‐L 10M ‐m1 ‐n data01 vg01
## Mirrored volume without a mirror log file
lvcreate ‐L 10M ‐m1 ‐‐mirrorlog core ‐n data01 vg01
Common Attributes that you may want to use:
‐L size of the volume [kKmMgGtT]
‐l number of extents
‐C contiguous [y|n]
‐i stripes
‐I stripe size
‐m mirrors
‐‐mirrorlog
‐n volume name
extending
lvextend ‐L 20M /dev/VolData00/vol01
Common Attributes that you may want to use:
‐L size of the volume [kKmMgGtT]
‐l number of extents
‐C contiguous [y|n]
‐i stripes
‐I stripe size
4. 7/6/2015 RedHat LVM cheatsheet
http://www.datadisk.co.uk/html_docs/redhat/rh_lvm.htm 4/5
Note: you can extend a ext2/ext3 filesystem using the "resize2fs" or "fsadm" command
fsadm resize /dev/VolData01/data01
resize2fs ‐p /dev/mapper/VolData01‐data01 [size]
The ‐p option displays bars of progress while extendingthe filesystem
reducing/resizing
lvreduce ‐L 5M /dev/VolData00/vol01
lvresize ‐L 5M /dev/VolData00/vol01
Note: rounding will occur when extending and reducing volumes to the next extent (4MB by default), you can use resize2fs or
fsadm to shrink the filesystem
fsadm resize /dev/VolData01/data01 [size]
resize2fs ‐p /dev/mapper/VolData01‐data01 [size]
removing lvremove /dev/VolData00/vol01
adding a mirror to a non‐
mirrored volume
lvconvert ‐m1 ‐‐mirrorlog core /dev/VolData00/vol01 /dev/sdb2
Note: you can also use the above command to remove a unwanted log
removing a mirror from a
mirrored volume
lvconvert ‐m0 /dev/VolData00/vol01 /dev/sdb2
Note: the disk in the command is the one you want to remove
Mirror a volume that has
stripes
lvconvert ‐‐stripes 3 ‐m1 ‐‐mirrorlog core /dev/VolData00/data01 /dev/sdd1 /dev/sde1 /devsdf1
change volume attributes
lvchange ‐a n /dev/VolData00/vol01
Common Attributes that you may want to use:
‐a availability
‐C contiguous [y|n]
renaming lvrename /dev/VolData00/vol_old /dev/VolData00/vol_new
snapshotting lvcreate ‐‐size 100M ‐‐snapshot ‐name snap /dev/vg01/data01
Miscellaneous
Simulating a disk failure dd if=/dev/zero of=/dev/sdb2 count=10
reparing a failed mirror
no LVM corruption
## check volume, persume /dev/sdb2 has failed
lvs ‐a ‐o +devices
# remove the failed disk from the volume (if not already done so) , this will convert volume into a non‐mirrored volume
vgreduce ‐‐removemissing ‐‐force VolData00
## replace the disk physically, remember to partion it with type 8e
fdisk /dev/sdb
........
## add new disk to LVM
pvcreate /dev/sdb2
## add the disk back into volume group
vgextend VolData00 /dev/sdb2
## mirror up the volume
lvconvert ‐m1 ‐‐mirrorlog core /dev/VolData00/vol02 /dev/sdb2
corrupt LVM metadata
without replacing drive
# attempt to bring the volume group online
vgchange ‐a y VolData00
# Restore the LVM configation
vgcfgrestore VolData00
# attempt to bring the volume grou online
vgchange ‐a y VolData00
# file system check
e2fsck /dev/VolData00/data01
# attempt to bring the volume group online but you get UUID conflict errors make note of the UUID number
vgchange ‐a y VolData00
vgchange ‐a n VolData00
## sometimes it my only be a logical volume problem
lvchange ‐a y /dev/VolData00/web02
lvchange ‐a n /dev/Voldata00/web02
5. 7/6/2015 RedHat LVM cheatsheet
http://www.datadisk.co.uk/html_docs/redhat/rh_lvm.htm 5/5
corrupt LVM metadata but
replacing the faulty disk
## replace the disk physically, remember to partion it with type 8e
fdisk /dev/sdb
........
# after replacing the faulty drive the disk must have the previuos UUID number or you can get it from /etc/lvm directory
pvcreate ‐‐uuid <previous UUID number taken from above command> /dev/sdb2
# Restore the LVM configation
vgcfgrestore VolData00
# attempt to bring the volume group online or logical volume
vgchange ‐a y VolData00
lvchange ‐a y /dev/VolData00/web02
# file system check
e2fsck /dev/VolData00/data01
Note: if you have backed the volume group configuration you can obtain the UUID number in the backup file by default located in
/etc/lvm/backup or running "pvs ‐v"
For other LVM's and Array utilities see my LVM central page