Change btrfs Filesystem Block Size While Migrating Ubunto 18.10 Environment to Larger SSD?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I have a 500 GB SSD in my laptop with a partition holding Windows 7 and a second partition holding Ubuntu 18.10 installed on a btrfs filesystem with a 4KB block size and dual boot.



I have a 1 TB SSD that I am installing in my desktop pc, and I want to make a complete copy of my laptop's current Ubuntu 18.10 (btrfs filesystem) partition onto this 1 TB SSD for my desktop. I do not want windows on my 1TB SSD and desire the entire 1TB SSD to single boot Ubuntu 18.10. When I log into the OS on the new SSD after copying: I want access to all of my installed software (installed via sudo, pip, and .deb files), all of my settings and software configuration, and all of my bookmarks.



However, I want to make a fresh install of Ubuntu 18.10 with an optimal blocksize for my desktop's 1 TB SSD, 64 GB ram and i7-6700k processor.



Is is possible to copy / clone a customized ubuntu 18.10 OS with btrfs filesystem and 4KB block size onto a freshly installed 18.10 OS with btrfs filesystem and (say) 4096KB block size (if 4096KB is optimal for my PC)?



I want everything to be the same on both OS's. Do I need to do a manual install of each software item from scratch / or can I do something like Clonezilla or Mounting my laptops directories directly to my 1TB SSD?










share|improve this question































    0















    I have a 500 GB SSD in my laptop with a partition holding Windows 7 and a second partition holding Ubuntu 18.10 installed on a btrfs filesystem with a 4KB block size and dual boot.



    I have a 1 TB SSD that I am installing in my desktop pc, and I want to make a complete copy of my laptop's current Ubuntu 18.10 (btrfs filesystem) partition onto this 1 TB SSD for my desktop. I do not want windows on my 1TB SSD and desire the entire 1TB SSD to single boot Ubuntu 18.10. When I log into the OS on the new SSD after copying: I want access to all of my installed software (installed via sudo, pip, and .deb files), all of my settings and software configuration, and all of my bookmarks.



    However, I want to make a fresh install of Ubuntu 18.10 with an optimal blocksize for my desktop's 1 TB SSD, 64 GB ram and i7-6700k processor.



    Is is possible to copy / clone a customized ubuntu 18.10 OS with btrfs filesystem and 4KB block size onto a freshly installed 18.10 OS with btrfs filesystem and (say) 4096KB block size (if 4096KB is optimal for my PC)?



    I want everything to be the same on both OS's. Do I need to do a manual install of each software item from scratch / or can I do something like Clonezilla or Mounting my laptops directories directly to my 1TB SSD?










    share|improve this question



























      0












      0








      0








      I have a 500 GB SSD in my laptop with a partition holding Windows 7 and a second partition holding Ubuntu 18.10 installed on a btrfs filesystem with a 4KB block size and dual boot.



      I have a 1 TB SSD that I am installing in my desktop pc, and I want to make a complete copy of my laptop's current Ubuntu 18.10 (btrfs filesystem) partition onto this 1 TB SSD for my desktop. I do not want windows on my 1TB SSD and desire the entire 1TB SSD to single boot Ubuntu 18.10. When I log into the OS on the new SSD after copying: I want access to all of my installed software (installed via sudo, pip, and .deb files), all of my settings and software configuration, and all of my bookmarks.



      However, I want to make a fresh install of Ubuntu 18.10 with an optimal blocksize for my desktop's 1 TB SSD, 64 GB ram and i7-6700k processor.



      Is is possible to copy / clone a customized ubuntu 18.10 OS with btrfs filesystem and 4KB block size onto a freshly installed 18.10 OS with btrfs filesystem and (say) 4096KB block size (if 4096KB is optimal for my PC)?



      I want everything to be the same on both OS's. Do I need to do a manual install of each software item from scratch / or can I do something like Clonezilla or Mounting my laptops directories directly to my 1TB SSD?










      share|improve this question
















      I have a 500 GB SSD in my laptop with a partition holding Windows 7 and a second partition holding Ubuntu 18.10 installed on a btrfs filesystem with a 4KB block size and dual boot.



      I have a 1 TB SSD that I am installing in my desktop pc, and I want to make a complete copy of my laptop's current Ubuntu 18.10 (btrfs filesystem) partition onto this 1 TB SSD for my desktop. I do not want windows on my 1TB SSD and desire the entire 1TB SSD to single boot Ubuntu 18.10. When I log into the OS on the new SSD after copying: I want access to all of my installed software (installed via sudo, pip, and .deb files), all of my settings and software configuration, and all of my bookmarks.



      However, I want to make a fresh install of Ubuntu 18.10 with an optimal blocksize for my desktop's 1 TB SSD, 64 GB ram and i7-6700k processor.



      Is is possible to copy / clone a customized ubuntu 18.10 OS with btrfs filesystem and 4KB block size onto a freshly installed 18.10 OS with btrfs filesystem and (say) 4096KB block size (if 4096KB is optimal for my PC)?



      I want everything to be the same on both OS's. Do I need to do a manual install of each software item from scratch / or can I do something like Clonezilla or Mounting my laptops directories directly to my 1TB SSD?







      ssd 18.10 partitions btrfs clone






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 24 at 19:55







      Kyakacoo

















      asked Mar 24 at 19:48









      KyakacooKyakacoo

      33




      33






















          2 Answers
          2






          active

          oldest

          votes


















          0














          There are many potential technical problems with attempting this transfer. To make a exact copy you would probably use Clonezilla or dd, however you would likely run into UUID conflict if having both disks plugged in at the same time which could destroy data. AFAIK This UUID clone conflict is only a problem with BTRFS and has something to do with the OS thinking the two disks are a RAID array, or not knowing which disk to write data back two leaving the journal out of sync and unclean on shutdown.



          This task would be better suited for a Arch system. There may be a difference in partition layout - MFT vs GPT, if it is MFT bootloader data will have to be written to the beginning of the disk by chrooting the new disk and running apt or dpkg-reconfigur grub2 or whatever boot loader you use.



          And then there is the problem of in /etc/fstab each btrfs subvolume has a different subvolume ID, so if you were to solve the 4k problem by manually setting the layout on the new disk and trying to rsync all the data, the sub-volume IDs would be different requiring you to know exactly where to change them in the filesystem.



          I suggest you disconnect your old disk, and install a fresh ubuntu. And then locate commands to generate a list of all packages installed via apt, and all packages installed via pip, and run a command to reinstall all of those.



          After that is done, I suggest rsyncing your /home directories, and assuming that covers 99.9% of your important data, keep the other disk in it's current state to pull anything you missed off of it later.



          To my knowledge, the KB sector size of the disk shouldn't really effect performance, but don't quote me on that.



          That's the information I would begin to consider when finding the answer to your own problem.






          share|improve this answer































            0














            For the UUID problem stated above you can use: btrfstune -U <UUID> /dev/sdx1 to change the UUID of any btrfs partition on any drive.



            For the subvolume id it depends on how you set up your btrfs filesystem. If you followed Ubuntu's standard layout i.e. a @ subvolume for root and a @home subvolume for home then the UUID is the same. For example my /etc/fstab:



            # /dev/sdb1 - / (root) UUID=59736ffd-b777-4ee1-af45-11cdf76353d4 / btrfs defaults,subvol=@,noatime 0 0

            # /dev/sdb1 - /home UUID=59736ffd-b777-4ee1-af45-11cdf76353d4 /home btrfs defaults,subvol=@home,noatime 0 0


            Using rsync works fine as I back my system up to a ext4 partition, completely create a new btrfs filesytem on another drive, then used btrfstune to change my UUID to what it was before, then copied everything over to the btrfs drive using rsync. Note that it's only necessary to use btrfstune if you want the same UUID (don't have to mess with /etc/fstab). If it doesn't matter to you just change it in /etc/fstab to you current UUID.
            Whether you use MBR to boot or UEFI to boot DOES make a big difference. I use UEFI.






            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%2f1128347%2fchange-btrfs-filesystem-block-size-while-migrating-ubunto-18-10-environment-to-l%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









              0














              There are many potential technical problems with attempting this transfer. To make a exact copy you would probably use Clonezilla or dd, however you would likely run into UUID conflict if having both disks plugged in at the same time which could destroy data. AFAIK This UUID clone conflict is only a problem with BTRFS and has something to do with the OS thinking the two disks are a RAID array, or not knowing which disk to write data back two leaving the journal out of sync and unclean on shutdown.



              This task would be better suited for a Arch system. There may be a difference in partition layout - MFT vs GPT, if it is MFT bootloader data will have to be written to the beginning of the disk by chrooting the new disk and running apt or dpkg-reconfigur grub2 or whatever boot loader you use.



              And then there is the problem of in /etc/fstab each btrfs subvolume has a different subvolume ID, so if you were to solve the 4k problem by manually setting the layout on the new disk and trying to rsync all the data, the sub-volume IDs would be different requiring you to know exactly where to change them in the filesystem.



              I suggest you disconnect your old disk, and install a fresh ubuntu. And then locate commands to generate a list of all packages installed via apt, and all packages installed via pip, and run a command to reinstall all of those.



              After that is done, I suggest rsyncing your /home directories, and assuming that covers 99.9% of your important data, keep the other disk in it's current state to pull anything you missed off of it later.



              To my knowledge, the KB sector size of the disk shouldn't really effect performance, but don't quote me on that.



              That's the information I would begin to consider when finding the answer to your own problem.






              share|improve this answer




























                0














                There are many potential technical problems with attempting this transfer. To make a exact copy you would probably use Clonezilla or dd, however you would likely run into UUID conflict if having both disks plugged in at the same time which could destroy data. AFAIK This UUID clone conflict is only a problem with BTRFS and has something to do with the OS thinking the two disks are a RAID array, or not knowing which disk to write data back two leaving the journal out of sync and unclean on shutdown.



                This task would be better suited for a Arch system. There may be a difference in partition layout - MFT vs GPT, if it is MFT bootloader data will have to be written to the beginning of the disk by chrooting the new disk and running apt or dpkg-reconfigur grub2 or whatever boot loader you use.



                And then there is the problem of in /etc/fstab each btrfs subvolume has a different subvolume ID, so if you were to solve the 4k problem by manually setting the layout on the new disk and trying to rsync all the data, the sub-volume IDs would be different requiring you to know exactly where to change them in the filesystem.



                I suggest you disconnect your old disk, and install a fresh ubuntu. And then locate commands to generate a list of all packages installed via apt, and all packages installed via pip, and run a command to reinstall all of those.



                After that is done, I suggest rsyncing your /home directories, and assuming that covers 99.9% of your important data, keep the other disk in it's current state to pull anything you missed off of it later.



                To my knowledge, the KB sector size of the disk shouldn't really effect performance, but don't quote me on that.



                That's the information I would begin to consider when finding the answer to your own problem.






                share|improve this answer


























                  0












                  0








                  0







                  There are many potential technical problems with attempting this transfer. To make a exact copy you would probably use Clonezilla or dd, however you would likely run into UUID conflict if having both disks plugged in at the same time which could destroy data. AFAIK This UUID clone conflict is only a problem with BTRFS and has something to do with the OS thinking the two disks are a RAID array, or not knowing which disk to write data back two leaving the journal out of sync and unclean on shutdown.



                  This task would be better suited for a Arch system. There may be a difference in partition layout - MFT vs GPT, if it is MFT bootloader data will have to be written to the beginning of the disk by chrooting the new disk and running apt or dpkg-reconfigur grub2 or whatever boot loader you use.



                  And then there is the problem of in /etc/fstab each btrfs subvolume has a different subvolume ID, so if you were to solve the 4k problem by manually setting the layout on the new disk and trying to rsync all the data, the sub-volume IDs would be different requiring you to know exactly where to change them in the filesystem.



                  I suggest you disconnect your old disk, and install a fresh ubuntu. And then locate commands to generate a list of all packages installed via apt, and all packages installed via pip, and run a command to reinstall all of those.



                  After that is done, I suggest rsyncing your /home directories, and assuming that covers 99.9% of your important data, keep the other disk in it's current state to pull anything you missed off of it later.



                  To my knowledge, the KB sector size of the disk shouldn't really effect performance, but don't quote me on that.



                  That's the information I would begin to consider when finding the answer to your own problem.






                  share|improve this answer













                  There are many potential technical problems with attempting this transfer. To make a exact copy you would probably use Clonezilla or dd, however you would likely run into UUID conflict if having both disks plugged in at the same time which could destroy data. AFAIK This UUID clone conflict is only a problem with BTRFS and has something to do with the OS thinking the two disks are a RAID array, or not knowing which disk to write data back two leaving the journal out of sync and unclean on shutdown.



                  This task would be better suited for a Arch system. There may be a difference in partition layout - MFT vs GPT, if it is MFT bootloader data will have to be written to the beginning of the disk by chrooting the new disk and running apt or dpkg-reconfigur grub2 or whatever boot loader you use.



                  And then there is the problem of in /etc/fstab each btrfs subvolume has a different subvolume ID, so if you were to solve the 4k problem by manually setting the layout on the new disk and trying to rsync all the data, the sub-volume IDs would be different requiring you to know exactly where to change them in the filesystem.



                  I suggest you disconnect your old disk, and install a fresh ubuntu. And then locate commands to generate a list of all packages installed via apt, and all packages installed via pip, and run a command to reinstall all of those.



                  After that is done, I suggest rsyncing your /home directories, and assuming that covers 99.9% of your important data, keep the other disk in it's current state to pull anything you missed off of it later.



                  To my knowledge, the KB sector size of the disk shouldn't really effect performance, but don't quote me on that.



                  That's the information I would begin to consider when finding the answer to your own problem.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 26 at 11:25









                  Loren DiasLoren Dias

                  263




                  263

























                      0














                      For the UUID problem stated above you can use: btrfstune -U <UUID> /dev/sdx1 to change the UUID of any btrfs partition on any drive.



                      For the subvolume id it depends on how you set up your btrfs filesystem. If you followed Ubuntu's standard layout i.e. a @ subvolume for root and a @home subvolume for home then the UUID is the same. For example my /etc/fstab:



                      # /dev/sdb1 - / (root) UUID=59736ffd-b777-4ee1-af45-11cdf76353d4 / btrfs defaults,subvol=@,noatime 0 0

                      # /dev/sdb1 - /home UUID=59736ffd-b777-4ee1-af45-11cdf76353d4 /home btrfs defaults,subvol=@home,noatime 0 0


                      Using rsync works fine as I back my system up to a ext4 partition, completely create a new btrfs filesytem on another drive, then used btrfstune to change my UUID to what it was before, then copied everything over to the btrfs drive using rsync. Note that it's only necessary to use btrfstune if you want the same UUID (don't have to mess with /etc/fstab). If it doesn't matter to you just change it in /etc/fstab to you current UUID.
                      Whether you use MBR to boot or UEFI to boot DOES make a big difference. I use UEFI.






                      share|improve this answer






























                        0














                        For the UUID problem stated above you can use: btrfstune -U <UUID> /dev/sdx1 to change the UUID of any btrfs partition on any drive.



                        For the subvolume id it depends on how you set up your btrfs filesystem. If you followed Ubuntu's standard layout i.e. a @ subvolume for root and a @home subvolume for home then the UUID is the same. For example my /etc/fstab:



                        # /dev/sdb1 - / (root) UUID=59736ffd-b777-4ee1-af45-11cdf76353d4 / btrfs defaults,subvol=@,noatime 0 0

                        # /dev/sdb1 - /home UUID=59736ffd-b777-4ee1-af45-11cdf76353d4 /home btrfs defaults,subvol=@home,noatime 0 0


                        Using rsync works fine as I back my system up to a ext4 partition, completely create a new btrfs filesytem on another drive, then used btrfstune to change my UUID to what it was before, then copied everything over to the btrfs drive using rsync. Note that it's only necessary to use btrfstune if you want the same UUID (don't have to mess with /etc/fstab). If it doesn't matter to you just change it in /etc/fstab to you current UUID.
                        Whether you use MBR to boot or UEFI to boot DOES make a big difference. I use UEFI.






                        share|improve this answer




























                          0












                          0








                          0







                          For the UUID problem stated above you can use: btrfstune -U <UUID> /dev/sdx1 to change the UUID of any btrfs partition on any drive.



                          For the subvolume id it depends on how you set up your btrfs filesystem. If you followed Ubuntu's standard layout i.e. a @ subvolume for root and a @home subvolume for home then the UUID is the same. For example my /etc/fstab:



                          # /dev/sdb1 - / (root) UUID=59736ffd-b777-4ee1-af45-11cdf76353d4 / btrfs defaults,subvol=@,noatime 0 0

                          # /dev/sdb1 - /home UUID=59736ffd-b777-4ee1-af45-11cdf76353d4 /home btrfs defaults,subvol=@home,noatime 0 0


                          Using rsync works fine as I back my system up to a ext4 partition, completely create a new btrfs filesytem on another drive, then used btrfstune to change my UUID to what it was before, then copied everything over to the btrfs drive using rsync. Note that it's only necessary to use btrfstune if you want the same UUID (don't have to mess with /etc/fstab). If it doesn't matter to you just change it in /etc/fstab to you current UUID.
                          Whether you use MBR to boot or UEFI to boot DOES make a big difference. I use UEFI.






                          share|improve this answer















                          For the UUID problem stated above you can use: btrfstune -U <UUID> /dev/sdx1 to change the UUID of any btrfs partition on any drive.



                          For the subvolume id it depends on how you set up your btrfs filesystem. If you followed Ubuntu's standard layout i.e. a @ subvolume for root and a @home subvolume for home then the UUID is the same. For example my /etc/fstab:



                          # /dev/sdb1 - / (root) UUID=59736ffd-b777-4ee1-af45-11cdf76353d4 / btrfs defaults,subvol=@,noatime 0 0

                          # /dev/sdb1 - /home UUID=59736ffd-b777-4ee1-af45-11cdf76353d4 /home btrfs defaults,subvol=@home,noatime 0 0


                          Using rsync works fine as I back my system up to a ext4 partition, completely create a new btrfs filesytem on another drive, then used btrfstune to change my UUID to what it was before, then copied everything over to the btrfs drive using rsync. Note that it's only necessary to use btrfstune if you want the same UUID (don't have to mess with /etc/fstab). If it doesn't matter to you just change it in /etc/fstab to you current UUID.
                          Whether you use MBR to boot or UEFI to boot DOES make a big difference. I use UEFI.







                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Mar 27 at 18:51

























                          answered Mar 27 at 18:40









                          GaryGary

                          12




                          12






























                              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%2f1128347%2fchange-btrfs-filesystem-block-size-while-migrating-ubunto-18-10-environment-to-l%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

                              Category:香港粉麵

                              List *all* the tuples!

                              Channel [V]