Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We just installed Ubuntu 10.10 on a server with ext4 and LVM:

$ df -l
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2            1875309692 656114888 1123931624  37% /
none                   8227652       260   8227392   1% /dev
none                   8234508       164   8234344   1% /dev/shm
none                   8234508        88   8234420   1% /var/run
none                   8234508         0   8234508   0% /var/lock
none                 1875309692 656114888 1123931624  37% /var/lib/ureadahead/debugfs
$

This server actually has 4 2TB drives in it. I'd like to take drives sda and sdb and knit them together in an LVM mirror. Is there a way to do this without reinstalling? That is, how do I create the LVM (I thought we had done this) and add a second drive to the container?

share|improve this question
up vote 0 down vote accepted

Don't know which partitions in a booted system can be changed, but assuming the talk is about a unmountable partition, lvconvert would do it.

LVCONVERT(8)

NAME
       lvconvert - convert a logical volume from linear to mirror or snapshot

SYNOPSIS
       [...]

DESCRIPTION
       lvconvert will change a linear logical volume to a mirror logical volume or to a snapshot of linear volume and vice versa.  It is also used to add and remove disk logs from mirror devices.
       [...]

OPTIONS
       [...]
       -m, --mirrors Mirrors
               Specifies  the degree of the mirror you wish to create.  For example, "-m 1" would convert the original logical volume to a mirror volume with 2-sides; that is, a liner volume plus one copy.

       [...]

If you can not unmount it then boots Live Linux and then you can.

share|improve this answer
    
Okay. THanks I would need to boot of a CDROM, but that's easy. – vy32 Jun 21 '13 at 3:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .