OpenVZ Forum


Home » General » Support » Directories read-only in one VPS, read-write in another?
Directories read-only in one VPS, read-write in another? [message #3024] Mon, 08 May 2006 17:01 Go to next message
Griffon26 is currently offline  Griffon26
Messages: 4
Registered: April 2006
Location: Eindhoven, The Netherland...
Junior Member
I'm looking for a way to have a certain directory read-only in
one VPS and read-write in another.

So far I have thought of four solutions, but none of them are
really appealing:

1) Put each directory for which I want to do this on a separate
partition and then give different VPS's different permissions
on these devices using vzctl set --devices.

2) Use unionfs to provide a read-only instance of each directory
to certain VPS's and a read-write instance to others.
I'm not sure how well this will work, because this is what
unionfs' INSTALL file says:

* Unionfs does not provide cache coherency.  What this means 
to you is that if you directly modify the lower-level
branches, then Unionfs will get confused.  You can tell 
Unionfs to throw out its cache and recreate all of its 
objects (lazily), by running "uniondbg -g UNION".


3) Export the directories to localhost and mount them read-only.
This can be done with SMB, NFS, ...

4) Adapt Herbert Poetzl's bind mount extensions to apply to
the openvz kernel that I'm using. Currently the latest
version of the BME are for kernel 2.6.11-rc4, so they
require some work.

Can anyone think of another way?

I'm inclined to go with 4 or with 3 if 4 turns out to be a lot
of trouble.
Re: Directories read-only in one VPS, read-write in another? [message #3027 is a reply to message #3024] Mon, 08 May 2006 22:17 Go to previous messageGo to next message
Griffon26 is currently offline  Griffon26
Messages: 4
Registered: April 2006
Location: Eindhoven, The Netherland...
Junior Member
Ok, I've modified the bind mount extensions patch.
But right now I don't have time to test it anymore, so
if anyone wants to try it out in the mean time... be my guest. =)

The first file is a version that should apply to 2.6.16.9,
the second one that should apply to openvz-026.009.

If this breaks your system, deletes your invaluable collection
of photographs or kills your pet, I'm not responsible Wink
Re: Directories read-only in one VPS, read-write in another? [message #3036 is a reply to message #3027] Tue, 09 May 2006 15:09 Go to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

1. this is not what you want.
2. it should work for you. the message tells, that you should not change files from host system. that's it.
3. it can be quite slow.
4. BME should work fine with OpenVZ and from my POV this is the easiest way to go.

Thanks for doing this and will be happy to know your further results!


http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: binutils >= 2.15.94.0.2.2-2.2.swsoft
Next Topic: Network Hanging
Goto Forum:
  


Current Time: Thu Sep 12 23:17:58 GMT 2024

Total time taken to generate the page: 0.09477 seconds