FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 01-23-2009, 01:21 AM
Ron Johnson
 
Default questions about lvm2 -- Got it working!!

On 01/21/2009 11:30 PM, Matthew Moore wrote:

On Wednesday 21 January 2009 09:13:07 pm Ron Johnson wrote:

If I have lots of existing data in JBODs, would I create a PV and VG
on the new drive, mv all the data from the existing drives to the
new VG, then add my existing drives (while also enlarging the fs) to
the one-drive VG, thus making an uber-device?


That is exactly what I would do. Everyone warns about how cataclysmic things
will happen because your new uber-device has the same failrate as a raid-0
setup, but as long as you backup regularly (perhaps to another LV made from
PV's on different disks) this isn't too much to worry about.



Also, what's a good HOWTO? Everything I've found via Google seems
out-of-date.


When I first set up LVM I used the LVM2 howto here

http://tldp.org/HOWTO/LVM-HOWTO/

The "anatomy" and "common tasks" are really all you need.

Here are the notes I made when I set up LVM. First partition the drives you
want to use. Make sure to set the type of the partitions as linux LVM. Next
tell LVM2 about them with


$ pvcreate <device name>

You can see what devices are seen by lvm2 with pvdisplay. Next make a VG

$ vgcreate <vg name> <device1> <device2> ...

At this point you might need to activate the volume group

$ vgchange -a y <vg name>

Next make a LV in the VG

$ lvcreate -n <lv name> -l <extents> <vg name>

You can get the number of extents available in a volume group with vgdisplay.
There should now be a new device file at /dev/<vg name>/<lv name> that you
can put a filesystem on. You can only enter /dev/<vg name> as root, but the
device-mapper framework puts links to the LV's in /dev/mapper/<vg name>_<lv
name> when you it gets started at boot (this is the location most people
point to in their fstab).


Sliced the new disk into 4 250GB then created the PVs, VG and LV.
Made an ext4 fs and now am copying data off of one device onto it.


Then I'll start the work of making the fs huge.

Thanks for your help!

Since you're already using the device-mapper, you also might want to set up
encryption with cryptsetup.


--
Ron Johnson, Jr.
Jefferson LA USA

"I am not surprised, for we live long and are celebrated poopers."


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:57 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org