[linux-lvm] some questions
Christoph Anton Mitterer
calestyo at scientia.net
Fri Jul 19 18:22:48 UTC 2013
On Fri, 2013-07-19 at 12:36 +0200, Zdenek Kabelac wrote:
> --discards options is for thin volume in thin pool
Is that then really only for thin pools?
I mean not when I "free" the LEs by removing/shrinking an LV, but when
e.g. my ext4 deletes a file and sends a discard... does LVM pass that on
and is that generally affected by --discards?
E.g. in cryptsetup you have a general option which controls whether TRIM
is passed through dm-crypt to lower block layers... I though --discards
of being like that...
> - while lvm.conf option is
> about discarding free space in VG - in general - unless you are using some
> virtual storage for PVs - it's not a wise idea to enable issue_discards,
> since it makes recovery (i.e. going one step back) impossible - what is
> discarded cannot be recovered...
Sure... when e.g. using dmcrypt with it would have even some security
> lvs -o+seg_pe_ranges
Ah... that one was exactly what I've been looking for :)
> > 5) What alignments are needed?
> > "md_chunk_alignment — If set to 1, and a Physical Volume is placed
> > directly upon an md device, LVM2 will align its data blocks with the md
> > device's stripe-width."
> What is visible in sysfs is used.
> It's responsibility of each device to provide correct values for alignment.
> i.e. if you have crypted mdraid device - then crypto needs to export
> right values.
What I mean is... what needs to be aligned to the stripe-with?
I though it would be enough if the dataalignment offset of the PVs was
correctly to the underlying "blocks". AFAIU they even wouldn't need to
be aligned to the chunksize of the MD, since the only blocks valid for
MD are the ones from the physical drive below (usually 512B or 4KiB) and
in case of striped MD, PAGE_SIZE blocks (usually 4KiB as well) in which
MD reads/writes parity.
Does LVM recommend that the PE's (i.e. the 4 MiB - not KiB) are aligned
to the stripe size? I though the PE size is irrelevant for normal
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5113 bytes
Desc: not available
More information about the linux-lvm