[arch-releng] [PATCH] Mount tmpfs filesystems with mode=0755

Gerardo Exequiel Pozzi vmlinuz386 at yahoo.com.ar
Fri Jul 9 12:04:20 EDT 2010


  On 07/09/2010 12:29 PM, Thomas Bächler wrote:
> Am 09.07.2010 17:11, schrieb Gerardo Exequiel Pozzi:
>>> I don't think this is the case here. You are not mounting an aufs branch
>>> inside another one, but you are moving an AUFS branch into the AUFS
>>> mount point itself. To me, it seems like AUFS and the Linux VFS should
>>> be able to handle that. I haven't tested it though.
>>>
>>> What the bug report stated is different: You nested two branches into
>>> each other - if AUFS uses the whole directory as a branch instead of
>>> just the mount point, I can understand why that would fail.
>>>
>> Seems to work moving all to /new_root/somedir... I have a dude why are
>> interested in doing that?
> It is simply cleaner and more transparent. Having unaccessible mounts
> below the visible root hides part of the system from the end user, which
> is something I never like to do.
hehe, an --occultism :P
>> (nothing left except /new_root , hehe)
>>
>> https://gist.github.com/468957/7284f470b968064a8342060e64d3784f6658a42c
>>
>> ------------------------------------------------------------
>> (copytoram=n)
>> tmpfs on /new_root/aufs/rw_branch type tmpfs
>> (rw,relatime,size=383696k,mode=755)
>> none on /new_root type aufs (rw,relatime,si=ddcbbff9)
>> /dev/disk/by-label/ARCH_201007 on /new_root/bootmnt type udf
>> (ro,relatime,utf8)
>> /dev/loop0 on /new_root/aufs/ro_branch/overlay type squashfs (ro,relatime)
>> /dev/loop1 on /new_root/aufs/ro_branch/root-image type squashfs
>> (ro,relatime)
>>
>> (on shutdown)
>> umount: /dev/loop1 busy - remounted read-only
>> umount: /dev/loop0 busy - remounted read-only
>> umount: /dev/disk/by-label/ARCH_201007 busy - remounted read-only
>> umount: /aufs/rw_branch: device is busy.
>>
>> ------------------------------------------------------------
>> (copytoram=y)
>> tmpfs on /new_root/aufs/rw_branch type tmpfs
>> (rw,relatime,size=383696k,mode=755)
>> none on /new_root type aufs (rw,relatime,si=88cacedb)
>> tmpfs on /new_root/copyonram type tmpfs (rw,relatime,size=383696k,mode=755)
>> /dev/loop0 on /new_root/aufs/ro_branch/overlay type squashfs (ro,relatime)
>> /dev/loop1 on /new_root/aufs/ro_branch/root-image type squashfs
>> (ro,relatime)
>>
>> (on shutdown)
>> umount: /dev/loop1 busy - remounted read-only
>> umount: /dev/loop0 busy - remounted read-only
>> umount: /copyonram: device is busy.
>> umount: /aufs/rw_branch: device is busy.
>> ------------------------------------------------------------
> Just as I suspected: It works fine and IMO looks very nice (you can
> investigate /bootmnt/ and /aufs/r?_branch if you want to see what's
> going on).
yes, you can see hidden control files for aufs under /aufs/rw_branch/

Maybe if this is implemented all can be moved to this dir struct:
/.archiso/
/.archiso/aufs/
/.archiso/aufs/rw_branch/
/.archiso/aufs/ro_branch/overlay/
/.archiso/aufs/ro_branch/root-image/
/.archiso/bootmedia/
/.archiso/copyonram/


> Two problems:
> 1) umounting fails ... I need to work on the umount code in rc.shutdown
> anyway, so there may be a solution for that.
Quick&Dirty solution: removing from /etc/mtab these entries on shutdown.
> 2) /aufs/rw_branch/ is writable! Writing to it will definitely cause
> trouble with aufs - which would be a reason not to do this.
I am not sure here, I also suspect but I don't know any example. any 
example scenario that you suspect?

some quick tests...

touch /aufs/rw_branch/something (works, and is visible on /)
vi /aufs/rw_branch/etc/passwd (edit an existent file works, and 
modifications are visible on /etc/passwd)
rm /aufs/rw_branch/etc/passwd (you will see /etc/passwd from ro_branch)
> Thanks for your tests, I am not sure anymore whether this is a good idea
> though.
>
You are welcome, but you are burning my brain haha :P

-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1




More information about the arch-releng mailing list