From: Zdenek Kabelac <zkabelac@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>,
jeremy@esilo.com
Subject: Re: [linux-lvm] Converting existing thick LVs into thin LVs possible?
Date: Mon, 17 Feb 2014 10:00:26 +0100 [thread overview]
Message-ID: <5301CFAA.5050206@redhat.com> (raw)
In-Reply-To: <CACOqYcnRf_7NGKVObo-uQb0Dvzbmd+ntkZ_PPGe4QmRrgTx_SQ@mail.gmail.com>
Dne 14.2.2014 20:21, Jeremy Smith napsal(a):
> I have a system currently using LVM2 that was originally set up on
> RHEL5 (where thin provisioning was not supported).
> This system would greatly benefit from the newer thin provisioning
> features, and so I am investigating upgrading to RHEL6 so that I may
> take advantage. My question is this: Can I convert existing LVM2
> "thick" logical volumes into thinly-provisioned volumes on the fly?
>
> This page:
> https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/thinly_provisioned_volume_creation.html
>
> lead me to believe that it is possible:
> "You can use the --thinpool parameter of the lvconvert command to
> convert an existing logical volume to a thin volume."
>
> with the following:
>
> lvconvert --thinpool vg001/lv1 --poolmetadata vg001/lv2
Sounds like misunderstanding which needs fix/enhancement of this doc page -
we will need to enhance lvconvert command to write big warning about this
operation.
This conversion is converting volume to 'data' volume - but it's not about
preserving content of LV1 as LV1 - it will serve as en empty pool.
The primary purpose is - you can build 'any' type of LV for data volume
and 'any' type of LV for metadata volume (i.e. special layout for raid/mirror)
and then you 'create' for these 2 volumes your thin pool - since normally
you can't create mirrored data & metadata volumes and thin pool in 1 command,
and you can't easily select where the metadata should be placed
(i.e. data on spindle, metadata on SSD).
>
> Am I doing something wrong here?
> Or am I going to have to create a new thin pool, new thin logical
> volumes, and copy the data over?
There is not yet support for direct conversion of LV to thin-LV.
The only currently supported method is to use your thick-LV as an external
origin LV for your thin-LV volume.
i.e. you create your thin-pool LV + and then thin-LV volume with external
origin that will use original thick-LV (external origin need to be read-only
volume)
Here are the conversion steps:
lvcreate -Lsize_of_data_pool -T vg/pool
lvconvert -T vg/thick_LV --originname new_thick_LV_name --thinpool vg/pool
Disadvantage here is you cannot merge changes from thin volume back to
original thick volume. You can however remove thin-LV and use again your
thick-LV as normal volume - i.e. thin-LV is basically snapshot.
Now hint for recovery - if you have not yet written anything to thin-LV from
newly create thin-pool. You could restore back to your previous configuration
via vgcfgrestore --force.
Zdenek
next prev parent reply other threads:[~2014-02-17 9:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-14 19:21 [linux-lvm] Converting existing thick LVs into thin LVs possible? Jeremy Smith
2014-02-17 9:00 ` Zdenek Kabelac [this message]
2014-04-04 16:50 ` Jeremy Smith
2014-04-14 8:01 ` Zdenek Kabelac
2014-04-14 8:02 ` Zdenek Kabelac
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5301CFAA.5050206@redhat.com \
--to=zkabelac@redhat.com \
--cc=jeremy@esilo.com \
--cc=linux-lvm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.