About this list Date view Thread view Subject view Author view Attachment view

From: Martin Josefsson (gandalf_at_wlug.westbo.se)
Date: Sun 26 Jan 2003 - 22:11:58 GMT


On Sun, 2003-01-26 at 22:28, Timm Essigke wrote:
> Hi,
>
> I installed vserver on debian without any problems - Great!
>
> Now I want to mount e.g. my local debian mirror into my vserver, but I
> want to do it read-only for the vserver, while having it rw in context 0.
>
> mount --bind -o ro mounts it rw, which is a known bug I found as
> debian-bug #116017 of mount, but seems to be rather a bug in 2.4.x
> kernels, that options are ignored, when --bind is used.

It might be a bug that it doesn't complain about the ro flag but the ro
flag is meaningless anyway since it's not supported on a --bind mount.
2.4 just doesn't have that feature.

Doesn't appear to work in 2.5 either, Al Viro might have patches for 2.5
but I'm not sure.

> I tried to remount ro, which works, but sets not only the mount in the
> vserver ro, but also the original mount.

The thing is that the permissioncheck isn't based on the vfsmnt but on
the superblock and a filesystem only has one superblock independant of
how many times it's mounted (there's one vfsmnt per mountpoint).

So you can either have all mounts of this filesystem rw _or_ ro, not a
combination.

I made some hacks a while ago but I never finished them, and they won't
be released. (ugly as hell and they don't work (only partially))

> Next idea:
> I exported the directory via nfs and mounted it with
> mount -t nfs -o ro,addr=192.168.0.100 (which is the IP of my vserver)
>
> This gives me what I want, when I test is from context 0, but even a cd
> gives "Permission denied" in the vserver! Why?

This I've never tried so I can't help you there.

> I guess, somebody found a solution for this "standard" problem in
> vservers already!?

Maybe someone has, would be great to know.

-- 
/Martin

Never argue with an idiot. They drag you down to their level, then beat you with experience.


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sun 26 Jan 2003 - 22:28:30 GMT by hypermail 2.1.3