What is lvmetad and why would I want or need to use it?
Clash Royale CLAN TAG#URR8PPP
I have a Gentoo server with LVM running on top of a RAID array that I have been using for a number of years. Recently I upgraded LVM to 2.02.109 (don't recall what version it was before) and received a message while upgrading:
* Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want
* to enable lvm autoactivation and metadata caching.
I understand that I can enable it by setting use_lvmetad = 1
in /etc/lvm/lvm.conf
.
But why would I need such a feature? My understanding is that it works with udev rules to keep LVM state in a cache so that LVM tools don't need to scan volumes for obtain that information. Is it just that my little array can't benefit from this kind of feature? Under what circumstances might I want/need to use it?
lvm
add a comment |
I have a Gentoo server with LVM running on top of a RAID array that I have been using for a number of years. Recently I upgraded LVM to 2.02.109 (don't recall what version it was before) and received a message while upgrading:
* Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want
* to enable lvm autoactivation and metadata caching.
I understand that I can enable it by setting use_lvmetad = 1
in /etc/lvm/lvm.conf
.
But why would I need such a feature? My understanding is that it works with udev rules to keep LVM state in a cache so that LVM tools don't need to scan volumes for obtain that information. Is it just that my little array can't benefit from this kind of feature? Under what circumstances might I want/need to use it?
lvm
add a comment |
I have a Gentoo server with LVM running on top of a RAID array that I have been using for a number of years. Recently I upgraded LVM to 2.02.109 (don't recall what version it was before) and received a message while upgrading:
* Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want
* to enable lvm autoactivation and metadata caching.
I understand that I can enable it by setting use_lvmetad = 1
in /etc/lvm/lvm.conf
.
But why would I need such a feature? My understanding is that it works with udev rules to keep LVM state in a cache so that LVM tools don't need to scan volumes for obtain that information. Is it just that my little array can't benefit from this kind of feature? Under what circumstances might I want/need to use it?
lvm
I have a Gentoo server with LVM running on top of a RAID array that I have been using for a number of years. Recently I upgraded LVM to 2.02.109 (don't recall what version it was before) and received a message while upgrading:
* Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want
* to enable lvm autoactivation and metadata caching.
I understand that I can enable it by setting use_lvmetad = 1
in /etc/lvm/lvm.conf
.
But why would I need such a feature? My understanding is that it works with udev rules to keep LVM state in a cache so that LVM tools don't need to scan volumes for obtain that information. Is it just that my little array can't benefit from this kind of feature? Under what circumstances might I want/need to use it?
lvm
lvm
edited Dec 12 at 14:11
sourcejedi
22.7k435100
22.7k435100
asked Nov 8 '14 at 18:09
Steve Kalemkiewicz
143116
143116
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Description
From the lvmetad man page:
lvmetad is a metadata caching daemon for LVM. The daemon receives
notifications from udev rules (which must be installed for LVM to work
correctly when lvmetad is in use). Through these notifications,
lvmetad has an up-to-date and consistent image of the volume groups
available in the system. By default, lvmetad, even if running, is not
used by LVM. See lvm.conf(5).
Looking at this a little closer merits another definition. Wikipedia states:
A journaling file system is a file system that keeps track of the
changes that will be made in a journal (usually a circular log in a
dedicated area of the file system) before committing them to the main
file system. In the event of a system crash or power failure, such
file systems are quicker to bring back online and less likely to
become corrupted.
Reasoning
I won't go into a detailed explanation of LVM, as the OP already understands the benefits. As such, I'll only explain why journaling was added. Older versions of LVM had no journaling daemon, meaning that if the system crashed the only journal that could be used was on the physical volume (hard disk). That creates a problem when the logical volume spans multiple extents on Logical Volume Groups that span multiple physical volumes.
If half a journal transaction exists on one physical volume and the other half exists on another physical volume, the transactional journal cannot commit changes to both physical volumes, because the physical volumes do not understand that they are part of a volume group, because the transaction log only exists in the physical volume.
That's where the new daemon comes into play. Now instead of a journal log for each physical volume, LVM can create a journal log and create a section for it in the volume group, that is set aside for the journaling only. After doing so, the entire transaction log can be found and replayed at the Volume Group level.
11
Your answer seems to suggest that lvmetad provides a service to the filesystem running on top of it that allows it to do journaling properly. But other sources just say that it caches information about LVM layout for the set of command lvm command line tools. Would be nice to support your version with some sources.
– Pavel Šimerda
Feb 4 '15 at 17:33
7
I have to echo @PavelŠimerda 's skepticism. The lvmetad manual says nothing about journaling. Not to mention that it would be a layering violation if LVM were to start to become journal aware (as that means it needs to be aware of which file systems are journaling and which are not, and it needs to know which file system lives on top of it). I also don't see any reason why having a file system's journal spread across multiple physical volumes would be a problem. That happens all the time with other technologies like RAID 0.
– Dan Moulding
May 13 '15 at 18:15
add a comment |
From this link:
Normally, each LVM command issues a disk scan to find all relevant physical volumes and to read volume group metadata. However, if the metadata daemon is running and enabled, this expensive scan can be skipped ...
This can save a significant amount of I/O and reduce the time required to complete LVM operations, particularly on systems with many disks.
So you would run it for increased performance of LVM management and status operations, at the cost of startup performance and increased complexity. The level of performance increase is larger when there are more disks in the system.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f166832%2fwhat-is-lvmetad-and-why-would-i-want-or-need-to-use-it%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Description
From the lvmetad man page:
lvmetad is a metadata caching daemon for LVM. The daemon receives
notifications from udev rules (which must be installed for LVM to work
correctly when lvmetad is in use). Through these notifications,
lvmetad has an up-to-date and consistent image of the volume groups
available in the system. By default, lvmetad, even if running, is not
used by LVM. See lvm.conf(5).
Looking at this a little closer merits another definition. Wikipedia states:
A journaling file system is a file system that keeps track of the
changes that will be made in a journal (usually a circular log in a
dedicated area of the file system) before committing them to the main
file system. In the event of a system crash or power failure, such
file systems are quicker to bring back online and less likely to
become corrupted.
Reasoning
I won't go into a detailed explanation of LVM, as the OP already understands the benefits. As such, I'll only explain why journaling was added. Older versions of LVM had no journaling daemon, meaning that if the system crashed the only journal that could be used was on the physical volume (hard disk). That creates a problem when the logical volume spans multiple extents on Logical Volume Groups that span multiple physical volumes.
If half a journal transaction exists on one physical volume and the other half exists on another physical volume, the transactional journal cannot commit changes to both physical volumes, because the physical volumes do not understand that they are part of a volume group, because the transaction log only exists in the physical volume.
That's where the new daemon comes into play. Now instead of a journal log for each physical volume, LVM can create a journal log and create a section for it in the volume group, that is set aside for the journaling only. After doing so, the entire transaction log can be found and replayed at the Volume Group level.
11
Your answer seems to suggest that lvmetad provides a service to the filesystem running on top of it that allows it to do journaling properly. But other sources just say that it caches information about LVM layout for the set of command lvm command line tools. Would be nice to support your version with some sources.
– Pavel Šimerda
Feb 4 '15 at 17:33
7
I have to echo @PavelŠimerda 's skepticism. The lvmetad manual says nothing about journaling. Not to mention that it would be a layering violation if LVM were to start to become journal aware (as that means it needs to be aware of which file systems are journaling and which are not, and it needs to know which file system lives on top of it). I also don't see any reason why having a file system's journal spread across multiple physical volumes would be a problem. That happens all the time with other technologies like RAID 0.
– Dan Moulding
May 13 '15 at 18:15
add a comment |
Description
From the lvmetad man page:
lvmetad is a metadata caching daemon for LVM. The daemon receives
notifications from udev rules (which must be installed for LVM to work
correctly when lvmetad is in use). Through these notifications,
lvmetad has an up-to-date and consistent image of the volume groups
available in the system. By default, lvmetad, even if running, is not
used by LVM. See lvm.conf(5).
Looking at this a little closer merits another definition. Wikipedia states:
A journaling file system is a file system that keeps track of the
changes that will be made in a journal (usually a circular log in a
dedicated area of the file system) before committing them to the main
file system. In the event of a system crash or power failure, such
file systems are quicker to bring back online and less likely to
become corrupted.
Reasoning
I won't go into a detailed explanation of LVM, as the OP already understands the benefits. As such, I'll only explain why journaling was added. Older versions of LVM had no journaling daemon, meaning that if the system crashed the only journal that could be used was on the physical volume (hard disk). That creates a problem when the logical volume spans multiple extents on Logical Volume Groups that span multiple physical volumes.
If half a journal transaction exists on one physical volume and the other half exists on another physical volume, the transactional journal cannot commit changes to both physical volumes, because the physical volumes do not understand that they are part of a volume group, because the transaction log only exists in the physical volume.
That's where the new daemon comes into play. Now instead of a journal log for each physical volume, LVM can create a journal log and create a section for it in the volume group, that is set aside for the journaling only. After doing so, the entire transaction log can be found and replayed at the Volume Group level.
11
Your answer seems to suggest that lvmetad provides a service to the filesystem running on top of it that allows it to do journaling properly. But other sources just say that it caches information about LVM layout for the set of command lvm command line tools. Would be nice to support your version with some sources.
– Pavel Šimerda
Feb 4 '15 at 17:33
7
I have to echo @PavelŠimerda 's skepticism. The lvmetad manual says nothing about journaling. Not to mention that it would be a layering violation if LVM were to start to become journal aware (as that means it needs to be aware of which file systems are journaling and which are not, and it needs to know which file system lives on top of it). I also don't see any reason why having a file system's journal spread across multiple physical volumes would be a problem. That happens all the time with other technologies like RAID 0.
– Dan Moulding
May 13 '15 at 18:15
add a comment |
Description
From the lvmetad man page:
lvmetad is a metadata caching daemon for LVM. The daemon receives
notifications from udev rules (which must be installed for LVM to work
correctly when lvmetad is in use). Through these notifications,
lvmetad has an up-to-date and consistent image of the volume groups
available in the system. By default, lvmetad, even if running, is not
used by LVM. See lvm.conf(5).
Looking at this a little closer merits another definition. Wikipedia states:
A journaling file system is a file system that keeps track of the
changes that will be made in a journal (usually a circular log in a
dedicated area of the file system) before committing them to the main
file system. In the event of a system crash or power failure, such
file systems are quicker to bring back online and less likely to
become corrupted.
Reasoning
I won't go into a detailed explanation of LVM, as the OP already understands the benefits. As such, I'll only explain why journaling was added. Older versions of LVM had no journaling daemon, meaning that if the system crashed the only journal that could be used was on the physical volume (hard disk). That creates a problem when the logical volume spans multiple extents on Logical Volume Groups that span multiple physical volumes.
If half a journal transaction exists on one physical volume and the other half exists on another physical volume, the transactional journal cannot commit changes to both physical volumes, because the physical volumes do not understand that they are part of a volume group, because the transaction log only exists in the physical volume.
That's where the new daemon comes into play. Now instead of a journal log for each physical volume, LVM can create a journal log and create a section for it in the volume group, that is set aside for the journaling only. After doing so, the entire transaction log can be found and replayed at the Volume Group level.
Description
From the lvmetad man page:
lvmetad is a metadata caching daemon for LVM. The daemon receives
notifications from udev rules (which must be installed for LVM to work
correctly when lvmetad is in use). Through these notifications,
lvmetad has an up-to-date and consistent image of the volume groups
available in the system. By default, lvmetad, even if running, is not
used by LVM. See lvm.conf(5).
Looking at this a little closer merits another definition. Wikipedia states:
A journaling file system is a file system that keeps track of the
changes that will be made in a journal (usually a circular log in a
dedicated area of the file system) before committing them to the main
file system. In the event of a system crash or power failure, such
file systems are quicker to bring back online and less likely to
become corrupted.
Reasoning
I won't go into a detailed explanation of LVM, as the OP already understands the benefits. As such, I'll only explain why journaling was added. Older versions of LVM had no journaling daemon, meaning that if the system crashed the only journal that could be used was on the physical volume (hard disk). That creates a problem when the logical volume spans multiple extents on Logical Volume Groups that span multiple physical volumes.
If half a journal transaction exists on one physical volume and the other half exists on another physical volume, the transactional journal cannot commit changes to both physical volumes, because the physical volumes do not understand that they are part of a volume group, because the transaction log only exists in the physical volume.
That's where the new daemon comes into play. Now instead of a journal log for each physical volume, LVM can create a journal log and create a section for it in the volume group, that is set aside for the journaling only. After doing so, the entire transaction log can be found and replayed at the Volume Group level.
edited Dec 5 '14 at 21:17
answered Dec 5 '14 at 21:12
eyoung100
4,7701441
4,7701441
11
Your answer seems to suggest that lvmetad provides a service to the filesystem running on top of it that allows it to do journaling properly. But other sources just say that it caches information about LVM layout for the set of command lvm command line tools. Would be nice to support your version with some sources.
– Pavel Šimerda
Feb 4 '15 at 17:33
7
I have to echo @PavelŠimerda 's skepticism. The lvmetad manual says nothing about journaling. Not to mention that it would be a layering violation if LVM were to start to become journal aware (as that means it needs to be aware of which file systems are journaling and which are not, and it needs to know which file system lives on top of it). I also don't see any reason why having a file system's journal spread across multiple physical volumes would be a problem. That happens all the time with other technologies like RAID 0.
– Dan Moulding
May 13 '15 at 18:15
add a comment |
11
Your answer seems to suggest that lvmetad provides a service to the filesystem running on top of it that allows it to do journaling properly. But other sources just say that it caches information about LVM layout for the set of command lvm command line tools. Would be nice to support your version with some sources.
– Pavel Šimerda
Feb 4 '15 at 17:33
7
I have to echo @PavelŠimerda 's skepticism. The lvmetad manual says nothing about journaling. Not to mention that it would be a layering violation if LVM were to start to become journal aware (as that means it needs to be aware of which file systems are journaling and which are not, and it needs to know which file system lives on top of it). I also don't see any reason why having a file system's journal spread across multiple physical volumes would be a problem. That happens all the time with other technologies like RAID 0.
– Dan Moulding
May 13 '15 at 18:15
11
11
Your answer seems to suggest that lvmetad provides a service to the filesystem running on top of it that allows it to do journaling properly. But other sources just say that it caches information about LVM layout for the set of command lvm command line tools. Would be nice to support your version with some sources.
– Pavel Šimerda
Feb 4 '15 at 17:33
Your answer seems to suggest that lvmetad provides a service to the filesystem running on top of it that allows it to do journaling properly. But other sources just say that it caches information about LVM layout for the set of command lvm command line tools. Would be nice to support your version with some sources.
– Pavel Šimerda
Feb 4 '15 at 17:33
7
7
I have to echo @PavelŠimerda 's skepticism. The lvmetad manual says nothing about journaling. Not to mention that it would be a layering violation if LVM were to start to become journal aware (as that means it needs to be aware of which file systems are journaling and which are not, and it needs to know which file system lives on top of it). I also don't see any reason why having a file system's journal spread across multiple physical volumes would be a problem. That happens all the time with other technologies like RAID 0.
– Dan Moulding
May 13 '15 at 18:15
I have to echo @PavelŠimerda 's skepticism. The lvmetad manual says nothing about journaling. Not to mention that it would be a layering violation if LVM were to start to become journal aware (as that means it needs to be aware of which file systems are journaling and which are not, and it needs to know which file system lives on top of it). I also don't see any reason why having a file system's journal spread across multiple physical volumes would be a problem. That happens all the time with other technologies like RAID 0.
– Dan Moulding
May 13 '15 at 18:15
add a comment |
From this link:
Normally, each LVM command issues a disk scan to find all relevant physical volumes and to read volume group metadata. However, if the metadata daemon is running and enabled, this expensive scan can be skipped ...
This can save a significant amount of I/O and reduce the time required to complete LVM operations, particularly on systems with many disks.
So you would run it for increased performance of LVM management and status operations, at the cost of startup performance and increased complexity. The level of performance increase is larger when there are more disks in the system.
add a comment |
From this link:
Normally, each LVM command issues a disk scan to find all relevant physical volumes and to read volume group metadata. However, if the metadata daemon is running and enabled, this expensive scan can be skipped ...
This can save a significant amount of I/O and reduce the time required to complete LVM operations, particularly on systems with many disks.
So you would run it for increased performance of LVM management and status operations, at the cost of startup performance and increased complexity. The level of performance increase is larger when there are more disks in the system.
add a comment |
From this link:
Normally, each LVM command issues a disk scan to find all relevant physical volumes and to read volume group metadata. However, if the metadata daemon is running and enabled, this expensive scan can be skipped ...
This can save a significant amount of I/O and reduce the time required to complete LVM operations, particularly on systems with many disks.
So you would run it for increased performance of LVM management and status operations, at the cost of startup performance and increased complexity. The level of performance increase is larger when there are more disks in the system.
From this link:
Normally, each LVM command issues a disk scan to find all relevant physical volumes and to read volume group metadata. However, if the metadata daemon is running and enabled, this expensive scan can be skipped ...
This can save a significant amount of I/O and reduce the time required to complete LVM operations, particularly on systems with many disks.
So you would run it for increased performance of LVM management and status operations, at the cost of startup performance and increased complexity. The level of performance increase is larger when there are more disks in the system.
edited Jun 18 '15 at 12:54
cuonglm
102k23199300
102k23199300
answered Jun 18 '15 at 12:30
Matthew Sharp
34227
34227
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f166832%2fwhat-is-lvmetad-and-why-would-i-want-or-need-to-use-it%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown