For When You Can't Have The Real Thing
[ start | index | login ]
start > Linux > Adding Disk To A LVM Partition

Adding Disk To A LVM Partition

Created by dave. Last edited by dave, 3 years and 219 days ago. Viewed 1,237 times. #1
[edit] [rdf]


Filesystem in LVM is full.


Obtain more disk (physical, virtual, whatever). Install in VM/system.

Use fdisk to partition the new disk (assumed to be sdb in this example). Set the new partition to be of type 8e.

Create a new PV on the new disk partition:

# pvcreate /dev/sdb1

List your volume group:

# vgdisplay
  --- Volume group ---
  VG Name               Volume00
  System ID
  Format                lvm2

Add the new PV into the volume group:

# vgextend Volume00 /dev/sdb1

List your logical volumes:

# lvdisplay
  --- Logical volume ---
  LV Path                /dev/Volume00/lvroot
  LV Name                lvroot
  VG Name                Volume00

Grow the logical volume that is full:

# lvextend /dev/Volume00/lvroot /dev/sdb1

Resize the filesystem into the new volume size:

# resize2fs /dev/Volume00/lvroot


no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt