Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.