On Thu, Mar 13, 2025, at 14:54, Zdenek Kabelac wrote:
> Dne 13. 03. 25 v 1:38 Patrick Hemmer napsal(a):
>> I've got a LVM thin stripe volume across 2 drives that I'm trying to migrate 
>> to a new larger single drive (getting rid of the old drives). Following 
>> various information on the subject, it seems the procedure here is to first 
>> convert from stripe to mirror, and then from mirror to linear. While 
>> attempting this, I seem to have hit an issue on the second part of that 
>> process, and am not having much luck resolving it.
>
> Hi
>
> Likely you can convert your nearly full thin-pool with a single thin volume 
> to 
> a linear  LV by just taking  'dd' copy of  if=/dev/thin of=/dev/linear - 
> using 
> direct io option (and this can be actually faster then raid mirroring).

I assume I need to copy both the tdata and tmeta volumes to their new linear 
counterparts. Did this, but now I assume I need to do something to get lvm to 
rescan the new linear thin volume to pick up the logical volumes that are now 
on it. And also stop LVM from picking them up off the old thin volume. I 
deactivated the old thin volume, but LVM is still recognizing up all the 
logical volumes inside it. I could completely delete the old thin volume, but 
I'd prefer to get the new volume online before doing that.

> If you are converting _tdata - you are basically using raid1 for _tdata - but 
> that is no help to convert anything to linear - _tdata holds 'chunks' and how 
> these chunks are 'mapped' to 'create' your thinLV looking like a 'linear 
> block 
> device' is fully in control by a thin-pool target and the use of _tmeta 
> content.
>
> While lvm2 could eventually add support doing a raid for thinLV - so you can 
> have your duplicate made while your device is online and in-use - currently 
> there is no such variant support - so you need to  'activate'  thinLV
> and without any use/mounting take a  'dd' copy.
>
>> 
>> Any idea how I get past this point? I could just build a completely new 
>> logical volume and manually copy the data, but there's around 40 logical 
>> volumes on this thin pool, many of which are snapshots, so would be much 
>> easier to just convert it if possible.
>
> Well once you go to thin-pool, there is no other route to go back to linear 
> other then 'manual copy' (and no one has even requested such feature).
>
> Regards
>
> Zdenek

--
Patrick

Reply via email to