Doesn't the existence of LVM snapshots slows down writing a file system wich doesn't support them natively?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












As far as understand snapshots in LVM (please, do correct me if I'm wrong): since they are not persistent and work even with a file system which doesn't itself support snapshots => I suppose it must mean that as soon as a snapshot is active, LVM will takes a copy of every block which is written to, before it is changed; this copy is saved to a RAM cache and eventually ends-up in another disk-space; and each read from the snapshot will be diverted to this «cache» if it exists there.



So I understand it means it should slow down every write while a snapshot exists. Does this mean that LVM snapshots should only be taken for as limited as possible durations, just for the time to backup data, and be suppressed as soon as possible ? And is this a concern only if the file system doesn't support snapshot natively ?







share|improve this question
























    up vote
    0
    down vote

    favorite












    As far as understand snapshots in LVM (please, do correct me if I'm wrong): since they are not persistent and work even with a file system which doesn't itself support snapshots => I suppose it must mean that as soon as a snapshot is active, LVM will takes a copy of every block which is written to, before it is changed; this copy is saved to a RAM cache and eventually ends-up in another disk-space; and each read from the snapshot will be diverted to this «cache» if it exists there.



    So I understand it means it should slow down every write while a snapshot exists. Does this mean that LVM snapshots should only be taken for as limited as possible durations, just for the time to backup data, and be suppressed as soon as possible ? And is this a concern only if the file system doesn't support snapshot natively ?







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      As far as understand snapshots in LVM (please, do correct me if I'm wrong): since they are not persistent and work even with a file system which doesn't itself support snapshots => I suppose it must mean that as soon as a snapshot is active, LVM will takes a copy of every block which is written to, before it is changed; this copy is saved to a RAM cache and eventually ends-up in another disk-space; and each read from the snapshot will be diverted to this «cache» if it exists there.



      So I understand it means it should slow down every write while a snapshot exists. Does this mean that LVM snapshots should only be taken for as limited as possible durations, just for the time to backup data, and be suppressed as soon as possible ? And is this a concern only if the file system doesn't support snapshot natively ?







      share|improve this question












      As far as understand snapshots in LVM (please, do correct me if I'm wrong): since they are not persistent and work even with a file system which doesn't itself support snapshots => I suppose it must mean that as soon as a snapshot is active, LVM will takes a copy of every block which is written to, before it is changed; this copy is saved to a RAM cache and eventually ends-up in another disk-space; and each read from the snapshot will be diverted to this «cache» if it exists there.



      So I understand it means it should slow down every write while a snapshot exists. Does this mean that LVM snapshots should only be taken for as limited as possible durations, just for the time to backup data, and be suppressed as soon as possible ? And is this a concern only if the file system doesn't support snapshot natively ?









      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 24 at 8:40









      Camion

      62




      62




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          In short, yes, changing content which exists in a snapshot requires LVM to copy the content, which does slow down writes.



          However, this happens regardless of the filesystem used because LVM operates at the block layer, and thus is unaware of the filesystem.



          As for whether you should keep snapshots for only a short duration, that really depends on what is best for your use-case.






          share|improve this answer




















          • What I mean is that if would require to keep snaphots for a longer duration as for having a way to rollback wrong changes, It might mean that I should favor another snapshot system (like one implemented at the file system level with a permanent copy on write strategy.);
            – Camion
            Mar 25 at 10:50










          • By the way, are you really sure that LVM is totally unaware of the file system ? Because il it's true, then it's even worse than I thought, since it means that it will even take copies of previously unallocated blocks.
            – Camion
            Mar 25 at 10:53











          • LVM uses Linux's device-mapper, which makes it completely unaware of the filesystem. See unix.stackexchange.com/questions/391998/…
            – Emmanuel Rosa
            Mar 25 at 21:34










          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f433233%2fdoesnt-the-existence-of-lvm-snapshots-slows-down-writing-a-file-system-wich-doe%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote













          In short, yes, changing content which exists in a snapshot requires LVM to copy the content, which does slow down writes.



          However, this happens regardless of the filesystem used because LVM operates at the block layer, and thus is unaware of the filesystem.



          As for whether you should keep snapshots for only a short duration, that really depends on what is best for your use-case.






          share|improve this answer




















          • What I mean is that if would require to keep snaphots for a longer duration as for having a way to rollback wrong changes, It might mean that I should favor another snapshot system (like one implemented at the file system level with a permanent copy on write strategy.);
            – Camion
            Mar 25 at 10:50










          • By the way, are you really sure that LVM is totally unaware of the file system ? Because il it's true, then it's even worse than I thought, since it means that it will even take copies of previously unallocated blocks.
            – Camion
            Mar 25 at 10:53











          • LVM uses Linux's device-mapper, which makes it completely unaware of the filesystem. See unix.stackexchange.com/questions/391998/…
            – Emmanuel Rosa
            Mar 25 at 21:34














          up vote
          0
          down vote













          In short, yes, changing content which exists in a snapshot requires LVM to copy the content, which does slow down writes.



          However, this happens regardless of the filesystem used because LVM operates at the block layer, and thus is unaware of the filesystem.



          As for whether you should keep snapshots for only a short duration, that really depends on what is best for your use-case.






          share|improve this answer




















          • What I mean is that if would require to keep snaphots for a longer duration as for having a way to rollback wrong changes, It might mean that I should favor another snapshot system (like one implemented at the file system level with a permanent copy on write strategy.);
            – Camion
            Mar 25 at 10:50










          • By the way, are you really sure that LVM is totally unaware of the file system ? Because il it's true, then it's even worse than I thought, since it means that it will even take copies of previously unallocated blocks.
            – Camion
            Mar 25 at 10:53











          • LVM uses Linux's device-mapper, which makes it completely unaware of the filesystem. See unix.stackexchange.com/questions/391998/…
            – Emmanuel Rosa
            Mar 25 at 21:34












          up vote
          0
          down vote










          up vote
          0
          down vote









          In short, yes, changing content which exists in a snapshot requires LVM to copy the content, which does slow down writes.



          However, this happens regardless of the filesystem used because LVM operates at the block layer, and thus is unaware of the filesystem.



          As for whether you should keep snapshots for only a short duration, that really depends on what is best for your use-case.






          share|improve this answer












          In short, yes, changing content which exists in a snapshot requires LVM to copy the content, which does slow down writes.



          However, this happens regardless of the filesystem used because LVM operates at the block layer, and thus is unaware of the filesystem.



          As for whether you should keep snapshots for only a short duration, that really depends on what is best for your use-case.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 24 at 19:40









          Emmanuel Rosa

          2,1951410




          2,1951410











          • What I mean is that if would require to keep snaphots for a longer duration as for having a way to rollback wrong changes, It might mean that I should favor another snapshot system (like one implemented at the file system level with a permanent copy on write strategy.);
            – Camion
            Mar 25 at 10:50










          • By the way, are you really sure that LVM is totally unaware of the file system ? Because il it's true, then it's even worse than I thought, since it means that it will even take copies of previously unallocated blocks.
            – Camion
            Mar 25 at 10:53











          • LVM uses Linux's device-mapper, which makes it completely unaware of the filesystem. See unix.stackexchange.com/questions/391998/…
            – Emmanuel Rosa
            Mar 25 at 21:34
















          • What I mean is that if would require to keep snaphots for a longer duration as for having a way to rollback wrong changes, It might mean that I should favor another snapshot system (like one implemented at the file system level with a permanent copy on write strategy.);
            – Camion
            Mar 25 at 10:50










          • By the way, are you really sure that LVM is totally unaware of the file system ? Because il it's true, then it's even worse than I thought, since it means that it will even take copies of previously unallocated blocks.
            – Camion
            Mar 25 at 10:53











          • LVM uses Linux's device-mapper, which makes it completely unaware of the filesystem. See unix.stackexchange.com/questions/391998/…
            – Emmanuel Rosa
            Mar 25 at 21:34















          What I mean is that if would require to keep snaphots for a longer duration as for having a way to rollback wrong changes, It might mean that I should favor another snapshot system (like one implemented at the file system level with a permanent copy on write strategy.);
          – Camion
          Mar 25 at 10:50




          What I mean is that if would require to keep snaphots for a longer duration as for having a way to rollback wrong changes, It might mean that I should favor another snapshot system (like one implemented at the file system level with a permanent copy on write strategy.);
          – Camion
          Mar 25 at 10:50












          By the way, are you really sure that LVM is totally unaware of the file system ? Because il it's true, then it's even worse than I thought, since it means that it will even take copies of previously unallocated blocks.
          – Camion
          Mar 25 at 10:53





          By the way, are you really sure that LVM is totally unaware of the file system ? Because il it's true, then it's even worse than I thought, since it means that it will even take copies of previously unallocated blocks.
          – Camion
          Mar 25 at 10:53













          LVM uses Linux's device-mapper, which makes it completely unaware of the filesystem. See unix.stackexchange.com/questions/391998/…
          – Emmanuel Rosa
          Mar 25 at 21:34




          LVM uses Linux's device-mapper, which makes it completely unaware of the filesystem. See unix.stackexchange.com/questions/391998/…
          – Emmanuel Rosa
          Mar 25 at 21:34












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f433233%2fdoesnt-the-existence-of-lvm-snapshots-slows-down-writing-a-file-system-wich-doe%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay