Instructions for LVM?

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Jan 3 18:28:04 UTC 2006


On Tue, Jan 03, 2006 at 11:37:09AM -0500, Steve wrote:
> Does anyone know of a good site or instructions for how to best (and
> properly) set up logical volume management? It sounds really good
> (especially with limited drive space), but I want to make sure I know
> what I'm doing. :-)

If you have limited drive space, why are you partitioning the system to
death in the first place?

Yes you can resize each piece more easily with LVM, but that doesn't
mean it is no work at all.

LVM makes great sense when you want to be able to add more space later
and distribute it between filesystems.

I managed to figure out LVM2 just by reading the man pages for pvcreate,
vgcreate and lvcreate, and the related tools.  Each has a XXcreate,
XXdisplay, and so on which do pretty much what they say.  Many
distributions will even let you setup LVM at install time, although not
always for / but usually at least for everything else.  I personally
tend to do this:

/ (/dev/md0 raid1 from /dev/sda1 and /dev/sdb1 for sata drives) (10G
for OS and OS installed applications)

LVM physical volume (PV) rest of space (/dev/md1 from /dev/sda2 and
/dev/sdb2) used as the only device (until I get more disks) for a VG
called something like main_vg, which then contains the logical volumes
(LV aka partitions for LVM) that I use such as:
swap
/home
/data
etc

You don't have to allocate all the space to start.  If you leave some
unused space in the vg you can easily add to a LV later on, or if you
have free space you can snapshot a volume while doing backups to make
sure nothing changes at all (it stores new changes in the free space in
the VG while the snapshow is active).  Great for backups to maintain
consistency over the whole backup period.

Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list