Re: [vserver] mount -o ro --bind .. don't work

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

From: Krischan Jodies (Krischan.Jodies_at_SerNet.De)
Date: Tue Mar 05 2002 - 08:07:30 EST


Am Dienstag, 5. März 2002 12:59 schrieb klavs klavsen:
> Hi guys,
>
> when I try to mount a directory under a vserver read-only it mounts
> fine, and the mount command tells me it's read-only. However as root in
> the vserver, I can edit and add files and directores just fine :-)
>
> Do any of you have experience with this? Or should I just forget about
> the mount --bind - and keep duplicate directories?

We are using only mount --bind, no vunify at all. Whether you have write
access or not depends only on the first "real" mount, the second does not
matter.

Our system looks like this:

/dev/hda2 on /map type ext2 (ro)

/map/usr on /vservers/mysql/usr type none (ro,bind)
/map/sbin on /vservers/mysql/sbin type none (ro,bind)
/map/bin on /vservers/mysql/bin type none (ro,bind)
/map/lib on /vservers/mysql/lib type none (ro,bind)
proc on /vservers/mysql/proc type proc (rw)
none on /vservers/mysql/dev/pts type devpts (rw)

/map/usr on /vservers/foertsch/usr type none (ro,bind)
/map/sbin on /vservers/foertsch/sbin type none (ro,bind)
/map/bin on /vservers/foertsch/bin type none (ro,bind)
/map/lib on /vservers/foertsch/lib type none (ro,bind)
proc on /vservers/foertsch/proc type proc (rw)
none on /vservers/foertsch/dev/pts type devpts (rw)

[and so on]

Another interesting thing is: You can remount -o rw,ro /map any time you
want, and read/write access to the mount --binded directories changes
accordingly. (Note: All vservers have write access when /map is r/w! Consider
shutting down them, when maintaining /map)

But switch /map to r/w, switch any /vserver/blah to r/w too and you can't
switch /map back to r/o.

Krischan

-- 
Service Network GmbH, mailto:kjodies_at_SerNet.DE, http://www.SerNet.DE
phone: +49-551-370000-0, fax: +49-551-370000-9

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

This archive was generated by hypermail 2.1.4 : Mon Aug 19 2002 - 12:01:01 EDT