Overlayfs inside archivemount

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











up vote
0
down vote

favorite












I am trying to mount an overlayfs inside an archivemount (as a follow-up to Layered or Virtual filesystem on Linux).



I am doing this:



mkdir -p upper,work,mount
tar zcf somefile upper/ work/ mount/
mkdir tmp
archivemount -o allow_root somefile tmp
sudo mount -t overlay -o lowerdir=/,upperdir=tmp/upper,workdir=tmp/work overlayfs tmp/mount


Note that I allow root to access the mounted archive (had to update /etc/fuse.conf for that).
It fails with:



mount: tmp/mount: wrong fs type, bad option, bad superblock on overlayfs, missing codepage or helper program, or other error.


It works with the original folders. I checked and by default, archivemount is mounting in read/write by default. I also can write a file in every folder. I also checked the access rights and they seem to be correct. Root as access to mount and can write to it.



What am I doing wrong?










share|improve this question























  • have you considered the fuse unionfs, then you don't need to be root.
    – ctrl-alt-delor
    Dec 9 at 11:30










  • Yes but overlayfs comes with your kernel. That's why I prefer that solution, unless I can't find a way around that read-only issue.
    – Luke Skywalker
    Dec 9 at 11:53










  • This question has changed from its original: It no-longer asks the same question. It should be rolled back, and a new question asked.
    – ctrl-alt-delor
    Dec 9 at 14:50















up vote
0
down vote

favorite












I am trying to mount an overlayfs inside an archivemount (as a follow-up to Layered or Virtual filesystem on Linux).



I am doing this:



mkdir -p upper,work,mount
tar zcf somefile upper/ work/ mount/
mkdir tmp
archivemount -o allow_root somefile tmp
sudo mount -t overlay -o lowerdir=/,upperdir=tmp/upper,workdir=tmp/work overlayfs tmp/mount


Note that I allow root to access the mounted archive (had to update /etc/fuse.conf for that).
It fails with:



mount: tmp/mount: wrong fs type, bad option, bad superblock on overlayfs, missing codepage or helper program, or other error.


It works with the original folders. I checked and by default, archivemount is mounting in read/write by default. I also can write a file in every folder. I also checked the access rights and they seem to be correct. Root as access to mount and can write to it.



What am I doing wrong?










share|improve this question























  • have you considered the fuse unionfs, then you don't need to be root.
    – ctrl-alt-delor
    Dec 9 at 11:30










  • Yes but overlayfs comes with your kernel. That's why I prefer that solution, unless I can't find a way around that read-only issue.
    – Luke Skywalker
    Dec 9 at 11:53










  • This question has changed from its original: It no-longer asks the same question. It should be rolled back, and a new question asked.
    – ctrl-alt-delor
    Dec 9 at 14:50













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to mount an overlayfs inside an archivemount (as a follow-up to Layered or Virtual filesystem on Linux).



I am doing this:



mkdir -p upper,work,mount
tar zcf somefile upper/ work/ mount/
mkdir tmp
archivemount -o allow_root somefile tmp
sudo mount -t overlay -o lowerdir=/,upperdir=tmp/upper,workdir=tmp/work overlayfs tmp/mount


Note that I allow root to access the mounted archive (had to update /etc/fuse.conf for that).
It fails with:



mount: tmp/mount: wrong fs type, bad option, bad superblock on overlayfs, missing codepage or helper program, or other error.


It works with the original folders. I checked and by default, archivemount is mounting in read/write by default. I also can write a file in every folder. I also checked the access rights and they seem to be correct. Root as access to mount and can write to it.



What am I doing wrong?










share|improve this question















I am trying to mount an overlayfs inside an archivemount (as a follow-up to Layered or Virtual filesystem on Linux).



I am doing this:



mkdir -p upper,work,mount
tar zcf somefile upper/ work/ mount/
mkdir tmp
archivemount -o allow_root somefile tmp
sudo mount -t overlay -o lowerdir=/,upperdir=tmp/upper,workdir=tmp/work overlayfs tmp/mount


Note that I allow root to access the mounted archive (had to update /etc/fuse.conf for that).
It fails with:



mount: tmp/mount: wrong fs type, bad option, bad superblock on overlayfs, missing codepage or helper program, or other error.


It works with the original folders. I checked and by default, archivemount is mounting in read/write by default. I also can write a file in every folder. I also checked the access rights and they seem to be correct. Root as access to mount and can write to it.



What am I doing wrong?







linux filesystems overlayfs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 9 at 16:37

























asked Dec 9 at 11:12









Luke Skywalker

1135




1135











  • have you considered the fuse unionfs, then you don't need to be root.
    – ctrl-alt-delor
    Dec 9 at 11:30










  • Yes but overlayfs comes with your kernel. That's why I prefer that solution, unless I can't find a way around that read-only issue.
    – Luke Skywalker
    Dec 9 at 11:53










  • This question has changed from its original: It no-longer asks the same question. It should be rolled back, and a new question asked.
    – ctrl-alt-delor
    Dec 9 at 14:50

















  • have you considered the fuse unionfs, then you don't need to be root.
    – ctrl-alt-delor
    Dec 9 at 11:30










  • Yes but overlayfs comes with your kernel. That's why I prefer that solution, unless I can't find a way around that read-only issue.
    – Luke Skywalker
    Dec 9 at 11:53










  • This question has changed from its original: It no-longer asks the same question. It should be rolled back, and a new question asked.
    – ctrl-alt-delor
    Dec 9 at 14:50
















have you considered the fuse unionfs, then you don't need to be root.
– ctrl-alt-delor
Dec 9 at 11:30




have you considered the fuse unionfs, then you don't need to be root.
– ctrl-alt-delor
Dec 9 at 11:30












Yes but overlayfs comes with your kernel. That's why I prefer that solution, unless I can't find a way around that read-only issue.
– Luke Skywalker
Dec 9 at 11:53




Yes but overlayfs comes with your kernel. That's why I prefer that solution, unless I can't find a way around that read-only issue.
– Luke Skywalker
Dec 9 at 11:53












This question has changed from its original: It no-longer asks the same question. It should be rolled back, and a new question asked.
– ctrl-alt-delor
Dec 9 at 14:50





This question has changed from its original: It no-longer asks the same question. It should be rolled back, and a new question asked.
– ctrl-alt-delor
Dec 9 at 14:50











2 Answers
2






active

oldest

votes

















up vote
0
down vote













unionfs does a better job unionfs-fuse $(pwd)/tmp/upper:$(pwd) $(pwd)/mount. However the mount-point seems to have to be outside of the archivemount file-system.



I see no advantage of nesting the mount-point, and has the advantage of not needing root privileges (except to install), so this may be workable.



Why



I have no idea why mount-point needs to be outside of the archivemount. If that is what the error is; I have little evidence to make a conclusion. I suspect that the mount point is the only file-access into the archivemount that is done as root, when using unionfs. Other file-access is probably done as you.



In the mount -t overlay case, where the upper-layer and work-area, can not be in the archivemount, it maybe because root has no access to this mount. Try:



archivemount somefile tmp
ls tmp/
sudo ls tmp/ #gets permission denied





share|improve this answer






















  • You were right on overlayfs, I'll update the question.
    – Luke Skywalker
    Dec 9 at 13:00

















up vote
0
down vote













So the actual problem was that, by default, archivemount does not allow root to access the mounted filesystem. You have to add the -o allow_root option for that.



Note that you will have to update /etc/fuse.conf to allow that option.






share|improve this answer




















    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
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486916%2foverlayfs-inside-archivemount%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








    up vote
    0
    down vote













    unionfs does a better job unionfs-fuse $(pwd)/tmp/upper:$(pwd) $(pwd)/mount. However the mount-point seems to have to be outside of the archivemount file-system.



    I see no advantage of nesting the mount-point, and has the advantage of not needing root privileges (except to install), so this may be workable.



    Why



    I have no idea why mount-point needs to be outside of the archivemount. If that is what the error is; I have little evidence to make a conclusion. I suspect that the mount point is the only file-access into the archivemount that is done as root, when using unionfs. Other file-access is probably done as you.



    In the mount -t overlay case, where the upper-layer and work-area, can not be in the archivemount, it maybe because root has no access to this mount. Try:



    archivemount somefile tmp
    ls tmp/
    sudo ls tmp/ #gets permission denied





    share|improve this answer






















    • You were right on overlayfs, I'll update the question.
      – Luke Skywalker
      Dec 9 at 13:00














    up vote
    0
    down vote













    unionfs does a better job unionfs-fuse $(pwd)/tmp/upper:$(pwd) $(pwd)/mount. However the mount-point seems to have to be outside of the archivemount file-system.



    I see no advantage of nesting the mount-point, and has the advantage of not needing root privileges (except to install), so this may be workable.



    Why



    I have no idea why mount-point needs to be outside of the archivemount. If that is what the error is; I have little evidence to make a conclusion. I suspect that the mount point is the only file-access into the archivemount that is done as root, when using unionfs. Other file-access is probably done as you.



    In the mount -t overlay case, where the upper-layer and work-area, can not be in the archivemount, it maybe because root has no access to this mount. Try:



    archivemount somefile tmp
    ls tmp/
    sudo ls tmp/ #gets permission denied





    share|improve this answer






















    • You were right on overlayfs, I'll update the question.
      – Luke Skywalker
      Dec 9 at 13:00












    up vote
    0
    down vote










    up vote
    0
    down vote









    unionfs does a better job unionfs-fuse $(pwd)/tmp/upper:$(pwd) $(pwd)/mount. However the mount-point seems to have to be outside of the archivemount file-system.



    I see no advantage of nesting the mount-point, and has the advantage of not needing root privileges (except to install), so this may be workable.



    Why



    I have no idea why mount-point needs to be outside of the archivemount. If that is what the error is; I have little evidence to make a conclusion. I suspect that the mount point is the only file-access into the archivemount that is done as root, when using unionfs. Other file-access is probably done as you.



    In the mount -t overlay case, where the upper-layer and work-area, can not be in the archivemount, it maybe because root has no access to this mount. Try:



    archivemount somefile tmp
    ls tmp/
    sudo ls tmp/ #gets permission denied





    share|improve this answer














    unionfs does a better job unionfs-fuse $(pwd)/tmp/upper:$(pwd) $(pwd)/mount. However the mount-point seems to have to be outside of the archivemount file-system.



    I see no advantage of nesting the mount-point, and has the advantage of not needing root privileges (except to install), so this may be workable.



    Why



    I have no idea why mount-point needs to be outside of the archivemount. If that is what the error is; I have little evidence to make a conclusion. I suspect that the mount point is the only file-access into the archivemount that is done as root, when using unionfs. Other file-access is probably done as you.



    In the mount -t overlay case, where the upper-layer and work-area, can not be in the archivemount, it maybe because root has no access to this mount. Try:



    archivemount somefile tmp
    ls tmp/
    sudo ls tmp/ #gets permission denied






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Dec 9 at 12:25

























    answered Dec 9 at 12:17









    ctrl-alt-delor

    10.5k41955




    10.5k41955











    • You were right on overlayfs, I'll update the question.
      – Luke Skywalker
      Dec 9 at 13:00
















    • You were right on overlayfs, I'll update the question.
      – Luke Skywalker
      Dec 9 at 13:00















    You were right on overlayfs, I'll update the question.
    – Luke Skywalker
    Dec 9 at 13:00




    You were right on overlayfs, I'll update the question.
    – Luke Skywalker
    Dec 9 at 13:00












    up vote
    0
    down vote













    So the actual problem was that, by default, archivemount does not allow root to access the mounted filesystem. You have to add the -o allow_root option for that.



    Note that you will have to update /etc/fuse.conf to allow that option.






    share|improve this answer
























      up vote
      0
      down vote













      So the actual problem was that, by default, archivemount does not allow root to access the mounted filesystem. You have to add the -o allow_root option for that.



      Note that you will have to update /etc/fuse.conf to allow that option.






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        So the actual problem was that, by default, archivemount does not allow root to access the mounted filesystem. You have to add the -o allow_root option for that.



        Note that you will have to update /etc/fuse.conf to allow that option.






        share|improve this answer












        So the actual problem was that, by default, archivemount does not allow root to access the mounted filesystem. You have to add the -o allow_root option for that.



        Note that you will have to update /etc/fuse.conf to allow that option.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 9 at 16:39









        Luke Skywalker

        1135




        1135



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486916%2foverlayfs-inside-archivemount%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

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

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay