LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-23-2011, 05:19 AM   #1
jheengut
Member
 
Registered: Sep 2006
Location: Providence, Moka Mauritius
Distribution: Slackware, Lubuntu
Posts: 352
Blog Entries: 16

Rep: Reputation: 51
lvm mirror


I'am using lvm since two years. Does snapshots on an irregular basis .

But I wanted to explore more ::

The following command converts the linear logical volume vg00/lvol1 to a mirrored logical volume.
lvconvert -m1 vg00/lvol1

The following command converts the mirrored logical volume vg00/lvol1 to a linear logical volume, removing the mirror leg.
lvconvert -m0 vg00/lvol1

I do not understand what is happening in the above command.

Which LV are being converted here?

The first command creates a two logical volumes where one is the mirror of the other logical volume.

But which mirrored logical volume is being converted into a linear LV.
 
Old 08-23-2011, 07:13 PM   #2
tommylovell
Member
 
Registered: Nov 2005
Distribution: Raspbian, Debian, Ubuntu
Posts: 380

Rep: Reputation: 103Reputation: 103
I'm not certain if we really understand your questions.
Quote:
Originally Posted by jheengut View Post
lvconvert -m0 vg00/lvol1
...
Which LV are being converted here?
The LV in this example is just what you would think: lvol1 in Volume Group vg00.

In the example, vg00/lvol1 is the equivalent of block device /dev/mapper/vg00-lvol1, /dev/vg00/lvol1 and a dm device /dev/dm-<something>.

Quote:
Originally Posted by jheengut View Post
The first command creates a two logical volumes where one is the mirror of the other logical volume.

But which mirrored logical volume is being converted into a linear LV.
In the '-m1' example and '-m0' examples, it is once again, vg00/lvol1. I think, unless you specify a Physical Volume 'lvconvert' will pick a suitable volume for you when you add a mirror; and will release the space on that volume when you take away a mirror (leaving your original linear LV). Unfortunately I have no way of testing this, so this is speculation.

My suspicion is that mirroring is not a popular, well understood or well used feature of LVM.

Last edited by tommylovell; 08-23-2011 at 07:23 PM.
 
Old 08-24-2011, 06:02 AM   #3
jheengut
Member
 
Registered: Sep 2006
Location: Providence, Moka Mauritius
Distribution: Slackware, Lubuntu
Posts: 352

Original Poster
Blog Entries: 16

Rep: Reputation: 51
The quotes are from man pages.

That's the commands that I'm not understanding.
 
Old 08-24-2011, 09:13 AM   #4
tommylovell
Member
 
Registered: Nov 2005
Distribution: Raspbian, Debian, Ubuntu
Posts: 380

Rep: Reputation: 103Reputation: 103
This page draws a picture of a mirror, http://www.centos.org/docs/5/html/Cl...d_volumes.html

Basically,
Code:
lvconvert -m1 vg00/lvol1
takes /dev/mapper/vg00-lvol1 and creates a mirror of it on another drive. Data is written to both the original filesystem and the mirrored copy of it. It is RAID1-like, but not really RAID. This page, http://www.centos.org/docs/5/html/Cl...orrecover.html, describes Recovering from LVM Mirror Failure in detail.

Code:
lvconvert -m vg00/lvol1
simply reverses the process and removes the mirror of /dev/mapper/vg00-lvol1, turning it back into a linear LV.

Does that help?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with LVM mirror and failed PV, can't recover -- Debian Squeeze lvm 2.02.66-5 Linux Ninja Linux - Server 2 06-02-2017 04:50 PM
LVM - unable to mirror LV membit Linux - Server 2 01-03-2015 07:01 PM
Splitting a mirror with LVM jcaplette Linux - Server 1 03-09-2010 03:14 AM
Restore data from LVM Mirror eldo Linux - Server 1 11-17-2009 05:13 PM
LVM to mirror boot disk on Linux? danie1 Linux - General 1 12-03-2008 03:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration