OpenVZ Forum - RDF feed
type: channel
items: Directories read-only in one VPS, read-write in another?
items: Re: Directories read-only in one VPS, read-write in another?

Directories read-only in one VPS, read-write in another?
type: item
description: 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.
creator: Griffon26
date: 2006-05-08T17:01:48-00:00

Re: Directories read-only in one VPS, read-write in another?
type: item
description: 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
creator: Griffon26
date: 2006-05-08T22:17:32-00:00

Re: Directories read-only in one VPS, read-write in another?
type: item
description: 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!
creator: dev
date: 2006-05-09T15:09:03-00:00