How to setup lvm to cache /root on 18.04?












1















I have two drives and can use lvmcache to cache the hard drive with the SSD with 16.04. However, when I follow the same process with 18.04, I can create the lvmcache but when I reboot, I get the Grub2 screen and prompt.



How do I setup lvmcache to cache /root on 18.04?










share|improve this question





























    1















    I have two drives and can use lvmcache to cache the hard drive with the SSD with 16.04. However, when I follow the same process with 18.04, I can create the lvmcache but when I reboot, I get the Grub2 screen and prompt.



    How do I setup lvmcache to cache /root on 18.04?










    share|improve this question



























      1












      1








      1








      I have two drives and can use lvmcache to cache the hard drive with the SSD with 16.04. However, when I follow the same process with 18.04, I can create the lvmcache but when I reboot, I get the Grub2 screen and prompt.



      How do I setup lvmcache to cache /root on 18.04?










      share|improve this question
















      I have two drives and can use lvmcache to cache the hard drive with the SSD with 16.04. However, when I follow the same process with 18.04, I can create the lvmcache but when I reboot, I get the Grub2 screen and prompt.



      How do I setup lvmcache to cache /root on 18.04?







      grub2 18.04 ssd lvmcache






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 8 at 18:02







      cabryan

















      asked Jan 7 at 18:42









      cabryancabryan

      63




      63






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Here is what worked for me:




          1. I used the alternate ISO to install so I could manually set partition the drives and set up LVM.

          2. On my hard drive, I created a partition for EFI and another partition formated to Ext4 mounted to /boot.

          3. I created my volume group and logical volumes for /root and /swap on the remaining space on my hard drive.

          4. I expanded my volume group to include my SSD, then set up logical volumes for the cache data and cache meta data.

          5. After completing the install & rebooting, I followed the steps from Jethro's blog (http://scyu.logdown.com/posts/519001-ubuntu-lvmcache-setup). I skipped directly to the lvconvert steps since the logical volumes had already been created on the SSD. I also removed "--cachepolicy mg".

          6. I also followed Johannes Bauer's advice adding "copy_exec /usr/sbin/cache_check" to /usr/share/initramfs-tools/hooks/lvm2 and making lvm2 executable.

          7. Then I updated initramfs (update-initramfs -u -k all) then updated (apt-get update) and upgraded (apt-get full-upgrade).


          I may have done more that I needed to, but I've followed these steps to set up three machines running 18.04 with SSD caching through lvmcache.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1107793%2fhow-to-setup-lvm-to-cache-root-on-18-04%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Here is what worked for me:




            1. I used the alternate ISO to install so I could manually set partition the drives and set up LVM.

            2. On my hard drive, I created a partition for EFI and another partition formated to Ext4 mounted to /boot.

            3. I created my volume group and logical volumes for /root and /swap on the remaining space on my hard drive.

            4. I expanded my volume group to include my SSD, then set up logical volumes for the cache data and cache meta data.

            5. After completing the install & rebooting, I followed the steps from Jethro's blog (http://scyu.logdown.com/posts/519001-ubuntu-lvmcache-setup). I skipped directly to the lvconvert steps since the logical volumes had already been created on the SSD. I also removed "--cachepolicy mg".

            6. I also followed Johannes Bauer's advice adding "copy_exec /usr/sbin/cache_check" to /usr/share/initramfs-tools/hooks/lvm2 and making lvm2 executable.

            7. Then I updated initramfs (update-initramfs -u -k all) then updated (apt-get update) and upgraded (apt-get full-upgrade).


            I may have done more that I needed to, but I've followed these steps to set up three machines running 18.04 with SSD caching through lvmcache.






            share|improve this answer




























              0














              Here is what worked for me:




              1. I used the alternate ISO to install so I could manually set partition the drives and set up LVM.

              2. On my hard drive, I created a partition for EFI and another partition formated to Ext4 mounted to /boot.

              3. I created my volume group and logical volumes for /root and /swap on the remaining space on my hard drive.

              4. I expanded my volume group to include my SSD, then set up logical volumes for the cache data and cache meta data.

              5. After completing the install & rebooting, I followed the steps from Jethro's blog (http://scyu.logdown.com/posts/519001-ubuntu-lvmcache-setup). I skipped directly to the lvconvert steps since the logical volumes had already been created on the SSD. I also removed "--cachepolicy mg".

              6. I also followed Johannes Bauer's advice adding "copy_exec /usr/sbin/cache_check" to /usr/share/initramfs-tools/hooks/lvm2 and making lvm2 executable.

              7. Then I updated initramfs (update-initramfs -u -k all) then updated (apt-get update) and upgraded (apt-get full-upgrade).


              I may have done more that I needed to, but I've followed these steps to set up three machines running 18.04 with SSD caching through lvmcache.






              share|improve this answer


























                0












                0








                0







                Here is what worked for me:




                1. I used the alternate ISO to install so I could manually set partition the drives and set up LVM.

                2. On my hard drive, I created a partition for EFI and another partition formated to Ext4 mounted to /boot.

                3. I created my volume group and logical volumes for /root and /swap on the remaining space on my hard drive.

                4. I expanded my volume group to include my SSD, then set up logical volumes for the cache data and cache meta data.

                5. After completing the install & rebooting, I followed the steps from Jethro's blog (http://scyu.logdown.com/posts/519001-ubuntu-lvmcache-setup). I skipped directly to the lvconvert steps since the logical volumes had already been created on the SSD. I also removed "--cachepolicy mg".

                6. I also followed Johannes Bauer's advice adding "copy_exec /usr/sbin/cache_check" to /usr/share/initramfs-tools/hooks/lvm2 and making lvm2 executable.

                7. Then I updated initramfs (update-initramfs -u -k all) then updated (apt-get update) and upgraded (apt-get full-upgrade).


                I may have done more that I needed to, but I've followed these steps to set up three machines running 18.04 with SSD caching through lvmcache.






                share|improve this answer













                Here is what worked for me:




                1. I used the alternate ISO to install so I could manually set partition the drives and set up LVM.

                2. On my hard drive, I created a partition for EFI and another partition formated to Ext4 mounted to /boot.

                3. I created my volume group and logical volumes for /root and /swap on the remaining space on my hard drive.

                4. I expanded my volume group to include my SSD, then set up logical volumes for the cache data and cache meta data.

                5. After completing the install & rebooting, I followed the steps from Jethro's blog (http://scyu.logdown.com/posts/519001-ubuntu-lvmcache-setup). I skipped directly to the lvconvert steps since the logical volumes had already been created on the SSD. I also removed "--cachepolicy mg".

                6. I also followed Johannes Bauer's advice adding "copy_exec /usr/sbin/cache_check" to /usr/share/initramfs-tools/hooks/lvm2 and making lvm2 executable.

                7. Then I updated initramfs (update-initramfs -u -k all) then updated (apt-get update) and upgraded (apt-get full-upgrade).


                I may have done more that I needed to, but I've followed these steps to set up three machines running 18.04 with SSD caching through lvmcache.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 16 at 20:05









                cabryancabryan

                63




                63






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • 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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1107793%2fhow-to-setup-lvm-to-cache-root-on-18-04%23new-answer', 'question_page');
                    }
                    );

                    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







                    Popular posts from this blog

                    Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                    ComboBox Display Member on multiple fields

                    Is it possible to collect Nectar points via Trainline?