Web QrooniX

Sunday, July 15, 2007

Linux LVM -- Adding New Volume

# fdisk /dev/sdb

Create the the necessary partitions. (e.g. /dev/sdb1)
Format the new partition
# mkfs.ext3 /dev/sdb1
Label the new formatted partition
# e2label /dev/sdb1 New_name_here
Initialize the creation of a new volume
# pvcreate /dev/sdb1
Join /dev/sdb1 on a new volume
# vgcreate VolGroup01 /dev/sdb1
# vgchange -ay VolGroup01
# vgdisplay VolGroup01 | grep "Total PE"

Use the output of Total PE (e.g. 8677)

# lvcreate 8677 -n LogVol01 VolGroup01
# mkfs.ext3 /dev/VolGroup01/LogVol00

Change or add an entry in /etc/fstab

# vi /etc/fstab

Add the following:

/dev/VolGroup01/LogVol00 /home/USERS ext3 defaults 1 1

Save and quit :wq

# mount /home/USERS

That's it!

Labels: ,

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?