From: Andy Smith <andy@strugglers.net>
To: linux-lvm@redhat.com
Subject: [linux-lvm] Expectations for TRIM on an MD→LVM→Xen→? stack
Date: Mon, 18 May 2015 21:21:17 +0000 [thread overview]
Message-ID: <20150518212117.GH4327@bitfolk.com> (raw)
Hi,
This is a purely hypothetical setup at this point but I am wondering
what to expect in the way of TRIM support through all these layers.
Let's say: Debian 8.0 (jessie) host machine with SSDs in MD RAID-10,
MD device used as PV, and then Xen PV VMs using LVs as their disks.
I will have no idea how the administrators of the VMs will lay out
their storage; they might treat them as disks and partition them, or
directly put filesystems on the block devices, or even use them as
LVM PVs themselves.
As far as I can see:
- MD supports TRIM on RAID-10 from kernel 3.7:
http://kernelnewbies.org/Linux_3.7#head-2fd9b183a4623d96e69ed24f88e0eb83217fa8df
- LVM supports TRIM if issue_discards is set:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Logical_Volume_Manager_Administration/lvmconf_file.html
- Xen supports TRIM on PV block device since kernel 3.2:
http://wiki.xen.org/wiki/XenParavirtOps
So, I think the situation would be something like:
- If the admin of the VM sets it up to do TRIM by e.g. using the
discard fstab option or issuing fstrim commands, then the TRIM
commands should be passed all the way down and honoured.
- There will be nothing I as the operator of the bare metal machine
can do to either force or deny TRIM for the underlying storage of
those LVs other than to disable it in LVM. So if the VM admin does
not configure TRIM, there will be no TRIM.
- Once a VM is decommissioned and an lvremove is done from the
hypervisor host, we could expect TRIM to take place.
Are these assumptions correct?
If I ran blktrace on the MD member device (e.g. /dev/sda5), would I
see a TRIM command propagated down from a VM? What would that look
like?
Thanks,
Andy
reply other threads:[~2015-05-18 21:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20150518212117.GH4327@bitfolk.com \
--to=andy@strugglers.net \
--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 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).