USB hard disk mount options

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








up vote
1
down vote

favorite












How do I setup mount options for an external USB hard drive?



I have an USB drive formated with BTRFS, each time the USB is plugged the drive is automatically mounted in /media/user/disklabel with defaults options. But I would like to set compression for this disk, and this is achieved with the "-o compress" option in the "mount" command.



How can I change the mount options to the automount service?



I am running Ubuntu 17.10










share|improve this question

























    up vote
    1
    down vote

    favorite












    How do I setup mount options for an external USB hard drive?



    I have an USB drive formated with BTRFS, each time the USB is plugged the drive is automatically mounted in /media/user/disklabel with defaults options. But I would like to set compression for this disk, and this is achieved with the "-o compress" option in the "mount" command.



    How can I change the mount options to the automount service?



    I am running Ubuntu 17.10










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      How do I setup mount options for an external USB hard drive?



      I have an USB drive formated with BTRFS, each time the USB is plugged the drive is automatically mounted in /media/user/disklabel with defaults options. But I would like to set compression for this disk, and this is achieved with the "-o compress" option in the "mount" command.



      How can I change the mount options to the automount service?



      I am running Ubuntu 17.10










      share|improve this question













      How do I setup mount options for an external USB hard drive?



      I have an USB drive formated with BTRFS, each time the USB is plugged the drive is automatically mounted in /media/user/disklabel with defaults options. But I would like to set compression for this disk, and this is achieved with the "-o compress" option in the "mount" command.



      How can I change the mount options to the automount service?



      I am running Ubuntu 17.10







      usb mount hard-drive btrfs






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 9 at 20:12









      Hugo Lia

      205




      205




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          1. Connect the disk and let your automounter mount the filesystem

          2. Use lsblk -o UUID,MOUNTPOINT to find the UUID of the block device the filesystem is on, e.g. 6e642696-3cb4-4d4e-86a6-2fae2b9295cc.


          3. Add a line to your /etc/fstab referencing the UUID and specifying the additional mount option:



            UUID=6e642696-3cb4-4d4e-86a6-2fae2b9295cc /media/user/backupdrive btrfs noauto,subvol=/,compress=zstd


          4. Unmount and re-mount the drive and check that the options were set using mount

          Bonus: This also works for filesystems on LUKS-encrypted drives.






          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',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2faskubuntu.com%2fquestions%2f1004671%2fusb-hard-disk-mount-options%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
            1
            down vote



            accepted










            1. Connect the disk and let your automounter mount the filesystem

            2. Use lsblk -o UUID,MOUNTPOINT to find the UUID of the block device the filesystem is on, e.g. 6e642696-3cb4-4d4e-86a6-2fae2b9295cc.


            3. Add a line to your /etc/fstab referencing the UUID and specifying the additional mount option:



              UUID=6e642696-3cb4-4d4e-86a6-2fae2b9295cc /media/user/backupdrive btrfs noauto,subvol=/,compress=zstd


            4. Unmount and re-mount the drive and check that the options were set using mount

            Bonus: This also works for filesystems on LUKS-encrypted drives.






            share|improve this answer


























              up vote
              1
              down vote



              accepted










              1. Connect the disk and let your automounter mount the filesystem

              2. Use lsblk -o UUID,MOUNTPOINT to find the UUID of the block device the filesystem is on, e.g. 6e642696-3cb4-4d4e-86a6-2fae2b9295cc.


              3. Add a line to your /etc/fstab referencing the UUID and specifying the additional mount option:



                UUID=6e642696-3cb4-4d4e-86a6-2fae2b9295cc /media/user/backupdrive btrfs noauto,subvol=/,compress=zstd


              4. Unmount and re-mount the drive and check that the options were set using mount

              Bonus: This also works for filesystems on LUKS-encrypted drives.






              share|improve this answer
























                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted






                1. Connect the disk and let your automounter mount the filesystem

                2. Use lsblk -o UUID,MOUNTPOINT to find the UUID of the block device the filesystem is on, e.g. 6e642696-3cb4-4d4e-86a6-2fae2b9295cc.


                3. Add a line to your /etc/fstab referencing the UUID and specifying the additional mount option:



                  UUID=6e642696-3cb4-4d4e-86a6-2fae2b9295cc /media/user/backupdrive btrfs noauto,subvol=/,compress=zstd


                4. Unmount and re-mount the drive and check that the options were set using mount

                Bonus: This also works for filesystems on LUKS-encrypted drives.






                share|improve this answer














                1. Connect the disk and let your automounter mount the filesystem

                2. Use lsblk -o UUID,MOUNTPOINT to find the UUID of the block device the filesystem is on, e.g. 6e642696-3cb4-4d4e-86a6-2fae2b9295cc.


                3. Add a line to your /etc/fstab referencing the UUID and specifying the additional mount option:



                  UUID=6e642696-3cb4-4d4e-86a6-2fae2b9295cc /media/user/backupdrive btrfs noauto,subvol=/,compress=zstd


                4. Unmount and re-mount the drive and check that the options were set using mount

                Bonus: This also works for filesystems on LUKS-encrypted drives.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Feb 18 at 12:04









                muru

                130k19275470




                130k19275470










                answered Feb 18 at 12:02









                Johannes Ebke

                362




                362



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1004671%2fusb-hard-disk-mount-options%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    pylint3 and pip3 broken

                    Missing snmpget and snmpwalk

                    How to enroll fingerprints to Ubuntu 17.10 with VFS491