Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

to include: http://wiki.bluelightav.org/display/BLUE/LVM+Howto

On

...

Debian and Ubuntu

We will assume that you create the LVM on a RAID partition called md1. Adapt this to your situation.In the examples the LVM physical volume (PV) is md1.

To name a volume group, please use the first two components of the hostname, separtated by dot (.), ie for example ac001.blue, for the naming convention please look at http://wiki.bluelightav.org/x/ewEW

To create more volume groups, use the same beginning and add _(description), where description is a meaningful identifier. ie , for example ac001.blue_2TB_backup

Create the physical volume

Note: this step can be omitted; it is implied by the next step.

Code Block
pvcreate /dev/md1

...

Here we are going to create an LV for swap. 10G gives the size of the volume (10 Gb). Adapt it to your needsGB)

Code Block
lvcreate -L 10G -n root ac001.blue

...

To add another volume redo the lvcreate step.

 

...

Format the logical volume (LV)

For a file system.  The example formats the LV with JFS, Blue Light's standard file system other than for the /boot partition:

mkfs.

...

jfs /dev/ac001.blue/root

 

Check the filesystem

lvs  

 

...

For a swap device:

mkswap /dev/ac001.blue/swap

Resize a logical volume (LV)

http://wiki.bluelightav.org/display/BLUE/How+to+resize+LVM+partitions

Rename an LV

Umount any file system contained by the concerned LV and rename

Code Block
umount <drive><device>
lvrename <vgname> <oldlvname> <newlvname> 

...

Activate LVMs

Code Block
vgchange -ay

...

A great howto is here http://www.gagme.com/greg/linux/raid-lvm.php

 

Chrooting and

...

installing GRUB 2 on LVM setup

Boot with a live CD or CrowBar

...