LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   configuring LVM post installation. (http://www.linuxquestions.org/questions/linux-newbie-8/configuring-lvm-post-installation-817335/)

avee137 07-01-2010 02:53 AM

configuring LVM post installation.
 
I have some free space (not partitioned) on my disk drive. I have not configured LVM during installation.Is it possible to modify some of the existing partitions to be a member of LVM?

subho.d 07-01-2010 06:39 AM

go to google then find the howto lvm

zirias 07-01-2010 06:42 AM

If you mean non-destructively -- no, it isn't. You have to copy your data somewhere (external USB drive) and copy it back after setting up the LVM. If you also want your system partition to become part of a volume group, it is a little more complicated, because you have to make sure your system boots entirely from the external drive -- but it is possible, btdt ;)

avee137 07-01-2010 08:31 AM

Quote:

Originally Posted by subho.d (Post 4020397)
go to google then find the howto lvm

quite a reply!

trist007 07-01-2010 09:39 AM

Assuming you have two new hard disks each 250 GB /dev/sdb and /dev/sdc. Say you wanted to mount this LVM to your home folder.

Create Physical Volumes
Code:

pvcreate /dev/sdb
pvcreate /dev/sdc

Create a Volume Group
Code:

vgcreate lvm01 /dev/sdb /dev/sdc
Create a Logical Volume
Code:

lvcreate -L 500 GB -n my_lvm_name lvm01
Note: you may have to play around with the -L option until you find the correct one. It may be 460 or 480. Make sure to maximize your size. You can always 'lvremove my_lvm_name' and try again.

Then label it

e2label /dev/lvm01/my_lvm_name /home.

Then add the entry to your /etc/fstab file. Instead of listing the device with the path /dev/lvm01/my_lvm_name, just use LABEL=/home.

Later on if your /home folder gets full you can buy another hard disk /dev/sdd and add it by doing
Code:

pvcreate /dev/sdd
vgextend lvm01 /dev/sdd

Enjoy!


All times are GMT -5. The time now is 03:22 AM.