linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>,
	Ilia Zykov <mail@service4.ru>
Subject: Re: [linux-lvm] Fast thin volume preallocation?
Date: Wed, 5 Jun 2019 12:31:42 +0200	[thread overview]
Message-ID: <62bf5632-0cca-6bc8-191e-b931e12db827@redhat.com> (raw)
In-Reply-To: <d831c385-b935-0c95-c900-f724468cec1f@service4.ru>

Dne 03. 06. 19 v 23:12 Ilia Zykov napsal(a):
>>
>>> Presumably you want a thick volume but inside a thin pool so that you
>>> can used snapshots?
>>> If so have you considered the 'external snapshot' feature?
>>
>> Yes, in some cases they are quite useful. Still, a fast volume
>> allocation can be an handy addition.
>>
> 
> Hello.
> Can I use external snapshot for fast zero allocation?
>   "thpool" - is lvmthin with lvm zeroing disabled
> 
> # lvcreate -n ext2T -V 2TiB --thinpool thpool VG
> # lvchange --permission r VG/ext2T
> 
> # lvcreate -n zeroed_lve -s VG/ext2T --thinpool VG/thpool
> 
> Or it will be the same as zeroing enabled?


Hi

It's not clear what do you want to achieve.

External origin for thin-volume is always a read-only LV.

External origin can be of any type - i.e. even thinLV from another thin-pool
and single origin can be used for number of thin volumes with external origin.

For now you CANNOT 'merge' such thinLV with external origin - so the only way
to get 'writable' origin back is to drop all thins that are using it as 
external origin.

Now - how the 'zeroing' plays the role here ?

Zeroing is property of thin-pool that serves thinLV.
Unprovisioned blocks always do return 'zeroes'.

When block is provisioned - unwritten portions needs to be zeroed (depending 
on zeroing setting)  - the bigger the block the bigger the chance the zeroing 
will take more time - lvm2 does not recommend using thin-pool with zeroing and 
chunksize bigger then 512KB.

Most modern filesystem keep track of written pieces of a block device 
themselves, so zeroing has almost no practical use.

Regards

Zdenek

  reply	other threads:[~2019-06-05 10:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 13:13 [linux-lvm] Fast thin volume preallocation? Gionatan Danti
2019-06-03 13:23 ` Joe Thornber
2019-06-03 19:23   ` Gionatan Danti
2019-06-03 21:12     ` Ilia Zykov
2019-06-05 10:31       ` Zdenek Kabelac [this message]
2019-06-04  5:23     ` Ilia Zykov

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=62bf5632-0cca-6bc8-191e-b931e12db827@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=linux-lvm@redhat.com \
    --cc=mail@service4.ru \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).