Editing
0098.html
(section)
From Linix VServer
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
= Re: [Vserver] Another conceptual newbie question = * <span class="dfn">This message</span>: [ [[#start|Message body]] ] [ [[#options2|More options]] ] * <span class="dfn">Related messages</span>: [ [[0099.html|Next message]] ] [ [[0097.html|Previous message]] ] [ [[0089.html|In reply to]] ] [ [[0099.html|Next in thread]] ] [ [[#replies|Replies]] ] </div> <div class="mail"> <span id="from"> <span class="dfn">From</span>: Corey Wright <[mailto:undefined_at_pobox.com?Subject=Re:%20%5BVserver%5D%20Another%20conceptual%20newbie%20question undefined_at_pobox.com]> </span><br /> <span id="date"><span class="dfn">Date</span>: Wed 10 May 2006 - 14:38:57 BST</span><br /> <span id="message-id"><span class="dfn">Message-Id</span>: <20060510083857.e7f695d4.undefined@pobox.com> </span><br /> On Tue, 09 May 2006 14:32:16 -0400<br /> Fareha Shafique <fareha@eecg.toronto.edu> wrote:<br /> ''> Hi,''<br /> ''>''<br /> ''> I read in one of the threads on the mailing list archive that Vservers''<br /> ''> use CoW. I'm having trouble understanding where, how and for what it is''<br /> ''> used?''<br /> the only explanation i could find for<br /> "unification" (http://www.google.com/search?q=site%3Alinux-vserver.org+immutable+unlinkable)<br /> on linux-vserver.org is "What is Unification (vunify)?" on<br /> http://linux-vserver.org/some_hints_from_john. but that's rather brief for<br /> someone unfamiliar with unix filesystem semantics, so i'll elaborate here.<br /> someone on the list please correct me if i'm wrong. (and somebody feel free<br /> to transfer this email or a better/correct explanation to the wiki; i'll<br /> have spent enough time just writing this email to mess with the wiki.)<br /> for unification (with the old utility called "vunify", and the new one<br /> called "vhashify"), identical files (in both data and metadata, ie<br /> ownership, privilege, etc) are hardlinked together, and marked immutable<br /> but unlinkable. this means that a guest cannot alter the "unified" file<br /> (because you don't want one guest altering a file and inadvertently or<br /> maliciously altering it for all the guests), but to allow the guest to<br /> alter the file, we allow him to unlink the file (by deleting, moving, or<br /> copying it) which only breaks his hardlink to the "unified" file.<br /> as an example, the following are not allowed on immutable, unlinkable files:<br /> echo "blah blah blah" >>/bin/bash<br /> (as this would append to the "unified" file).<br /> instead you have:<br /> mv /bin/bash /bin/bash.new<br /> mv /bin/bash.new /bin/bash<br /> echo "blah blah blah" >>/bin/bash<br /> this usually works reasonable well, because most package managers (rpm,<br /> dpkg) remove the old files before writing out the new files or copy the new<br /> files on top of the old files (but they don't write the new file contents<br /> inside the old files, trying to change the old file "in place").<br /> but the immutable, unlinkable "unified" files can be troublesome<br /> (especially when you accidentally unify /etc and then go to edit a<br /> configuration file but are unexplainably denied, even as root within<br /> the guest ;-).<br /> so the ideal solution is copy-on-write (cow), where the kernel<br /> automatically unlinks the file before a process writes to it. upon a<br /> process writing to a file, the kernel will make a copy of the file<br /> (unlinking the file) and then fulfill the process's write request. this<br /> saves the user from having to test if a file is "unified" (immutable but<br /> unlinkable), if so then unlinking (moving, copying, etc) it, and then<br /> finally writing to it. the kernel will do the unlinking automatically upon<br /> writing.<br /> hth.<br /> corey<br /> <pre> -- undefined@pobox.com _______________________________________________ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver</pre> <span id="received"><span class="dfn">Received on</span> Wed May 10 14:39:31 2006</span> </div> <div class="foot"> * <span class="dfn">This message</span>: [ [[#start|Message body]] ] * <span class="dfn">Next message</span>: [[0099.html|Stephen Harris: "Re: [Vserver] Another conceptual newbie question"]] * <span class="dfn">Previous message</span>: [[0097.html|Corey Wright: "Re: [Vserver] Re: Basic Question"]] * <span class="dfn">In reply to</span>: [[0089.html|Fareha Shafique: "[Vserver] Another conceptual newbie question"]] * <span class="dfn">Next in thread</span>: [[0099.html|Stephen Harris: "Re: [Vserver] Another conceptual newbie question"]] * <span id="replies"></span><span class="dfn">Reply</span>: [[0099.html|Stephen Harris: "Re: [Vserver] Another conceptual newbie question"]] * <span id="options2"></span><span class="dfn">Contemporary messages sorted</span>: [ [[date.html#98|By Date]] ] [ [[index.html#98|By Thread]] ] [ [[subject.html#98|By Subject]] ] [ [[author.html#98|By Author]] ] [ [[attachment.html|By messages with attachments]] ] </div> <div align="center"> [<nowiki/>[[../|Next/Previous Months]]] [<nowiki/>[http://www.solucorp.qc.ca/miscprj/s_context.hc Main vserver Project Homepage]] [<nowiki/>[http://www.solucorp.qc.ca/mlist/index.hc?list=vserver Howto Subscribe/Unsubscribe]] [<nowiki/>[http://www.paul.sladen.org/vserver/ Paul Sladen's vserver stuff]]<br /> <span class="small">Generated on Wed 10 May 2006 - 14:39:41 BST by [http://www.hypermail.org/ hypermail 2.1.8]</span> </div>
Summary:
Please note that all contributions to Linix VServer may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Linix VServer:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
About
Overview
Paper
News
Developers
Donations
Search
Getting Started
Downloads
FAQs
Documentation
Support
Participate
How to participate
Report a Bug
Communicate
Teams/Projects
Hall of Fame
Resources
Archives
Recent Wiki Changes
Pastebin
Related Projects
VServer Hosting
Happy VServer Users
Tools
What links here
Related changes
Special pages
Page information