Recent Changes - Search:


Code:


Social:


My journals will take the place of a blog. If you go to the Journal page there is an RSS feed to subscribe with.

« September 2017 
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930

Sites I take responsibility for

West Volusia, Florida

Documents

Technical

General

Me

Living

Places I frequent

Hobbies

Humor

Items for sale:


Clipboard

edit SideBar

Logical Volume Manager

Include our styles below Infobox - invoke as >>infobox<< ... >><<

Codebox: - invoke as >>codebox<< ... >><<

warnbox: - invoke as >>codebox<< ... >><<

editingbox: - invoke as >>codebox<< ... >><<

noticebox: - invoke as >>codebox<< ... >><<

Page bread crumbs: Welcome to ke3vin.org! - My Public Technical Notes - Software And Operating Systems - Linux - Howtos - LVM

Pages by tags: (:listtags:)
Subscribe to this wiki: RSS Feed RSS or subscribe to this page for changes: RSS Feed RSS
496 articles have been published so far. Recent changes
Share

2016-03-22: This site is being moved to my main site at https://kevininscoe.com/wiki as part of a consolidation to one domain.


Notes:

http://sourceware.org/lvm2/

http://www.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s-lvm-config.html

http://tldp.org/HOWTO/LVM-HOWTO/

http://www.howtoforge.com/linux_lvm

LVM Layout

Basically LVM looks like this:

You have a physical partition or LUN you want to be able to re-size or grown at some future date.

First we need to create a physical volumes:

 # pvcreate /dev/emcpowera1

 Physical volume "/dev/emcpowera1" successfully created

Create the volume group:

 # vgcreate dbvg01 /dev/emcpowera1

  Found duplicate PV ZFRjerXPNDnWzdzhcD4LqMaJYxPn4Q1I: using /dev/sdb1 not /dev/emcpowera1
  Found duplicate PV ZFRjerXPNDnWzdzhcD4LqMaJYxPn4Q1I: using /dev/sdc1 not /dev/sdb1
  Found duplicate PV ZFRjerXPNDnWzdzhcD4LqMaJYxPn4Q1I: using /dev/emcpowera1 not /dev/sdc1
  Found duplicate PV ZFRjerXPNDnWzdzhcD4LqMaJYxPn4Q1I: using /dev/sdb1 not /dev/emcpowera1
  Found duplicate PV ZFRjerXPNDnWzdzhcD4LqMaJYxPn4Q1I: using /dev/sdc1 not /dev/sdb1
  Found duplicate PV ZFRjerXPNDnWzdzhcD4LqMaJYxPn4Q1I: using /dev/emcpowera1 not /dev/sdc1
  Volume group "dbvg01" successfully created

Run vgdisplay to verify volume group

 # vgdisplay dbvg01

  Found duplicate PV ZFRjerXPNDnWzdzhcD4LqMaJYxPn4Q1I: using /dev/sdb1 not /dev/emcpowera1
  Found duplicate PV ZFRjerXPNDnWzdzhcD4LqMaJYxPn4Q1I: using /dev/sdc1 not /dev/sdb1
  --- Volume group ---
  VG Name               dbvg01
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               4.99 GB
  PE Size               4.00 MB
  Total PE              1278
  Alloc PE / Size       0 / 0   
  Free  PE / Size       1278 / 4.99 GB
  VG UUID               3zgBn9-hPV0-DbXh-M2B5-84vm-4URv-DiBNx4

Activating a volume group

After rebooting the system or running vgchange -an, you will not be able to access your VGs and LVs. To reactivate the volume group, run:

 # vgchange -a y dbvg01

Create the logical volume:

 # lvcreate -l 100%FREE --name dblv01 dbvg01 

  Found duplicate PV ZFRjerXPNDnWzdzhcD4LqMaJYxPn4Q1I: using /dev/sdb1 not /dev/emcpowera1
  Found duplicate PV ZFRjerXPNDnWzdzhcD4LqMaJYxPn4Q1I: using /dev/sdc1 not /dev/sdb1
  Logical volume "dblv01" created

Create the file system:

 # mke2fs -j -L /db01 /dev/dbvg01/dblv01

Mount the file system:

 # mount LABEL=/db01 /db01

Create the /etc/fstab line:

 LABEL=/db01             /db01                   ext3    defaults        1 0

Verifying striped volumes:

 # lvs --segments /dev/mapper/oraclevg08-oraclelv08 
  LV         VG         Attr       #Str Type    SSize
  oraclelv08 oraclevg08 -wi-ao----    4 striped 2.00t

Kevin's Public Wiki maintained and created by Kevin P. Inscoe is licensed under a
Creative Commons Attribution 3.0 United States License.

Back to my web site - http://kevininscoe.com

Edit - History - Print - Recent Changes - Search
Page last modified on May 08, 2014, at 11:46 AM EST