Setting up LVM on suse

This entry was posted in Linux and tagged on June 17, 2012, by

Setting of LVM is as done below

1. First of all create physical volume

# pvcreate /dev/device [/dev/device] ..

2. Next step is to create volume group on physical volume

# vgcreate vg-name /dev/device [/dev/devices]..

3. Next is to create logical volume

# lvcreate -L size [K|M|G|T] -n lv-name vg-name

where K – kilobytes

M – megabytes

G- gigabytes

T – terabytes

lv-name – is logical volume name

vg-name – is volume group name

4. Next is to create file system on that device

# mkfs.ext2 /dev/vg-name/lv-name

This will create ext2 file system

5. Next is to create mount point

# mount /dev/vg-name/lv-name /mountpoint

If you want to resize the file system , use the following command

# lvextend -L +512MB /dev/vg-name/lv-name

This will extend the lv by 512 MB

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright 2017 ©Aceadmins. All rights reserved.