1751936 Members
4788 Online
108783 Solutions
New Discussion

Using LVM

 
Ragni Singh
Super Advisor

Using LVM

Hello All,

 

How can I LVM to add /dev/sda and /dev/sdb into one huge volume? Thanks a lot for your time.

2 REPLIES 2
Noble Sebastian
Frequent Advisor

Re: Using LVM

How much size u need for each volume ..

 

You can use normal LVM commands to create LVM 

Matti_Kurkela
Honored Contributor

Re: Using LVM

Simplest way:

# Step 1: preparing the disks as LVM PVs.
# Note: All existing data on /dev/sda and /dev/sdb will be lost!

pvcreate /dev/sda
pvcreate /dev/sdb

# Step 2: creating a VG.
# I use the name "vgexample" here, choose any name you want

vgcreate vgexample /dev/sda /dev/sdb

# Step 3: allocating disk space 
# To allocate all the available space to single LV, use "-l 100%VG"
# To allocate just a specified amount, use "-L 100G" or similar.
# If you want to assign a descriptive name to the LV, add 
# "-n LVexample" or whatever you want. If you don't, the LV will be
# named automatically as "lvolN, where N is a number, starting from 0.

lvcreate -l 100%VG vgexample

# Now you should have a single logical volume, accessible as
# /dev/vgexample/lvol0 or alternatively /dev/mapper/vgexample-lvol0.
# Both names should work.

 

MK