[vserver] Problems using a shared directory mounted into two VServers with XID tagging enabled.

From: Marcus Mülbüsch <m.muelbuesch_at_googlemail.com>
Date: Tue 12 Jul 2011 - 13:11:42 BST
Message-ID: <4E1C39FE.7060303@googlemail.com>

Hello all,

    to use Disk limits I activated XID tagging, following the guide
here: http://linux-vserver.org/Disk_Limits_and_Quota

    Now I have two VServers-Guests that share a directory, mounted in
both vservers. The first VServer-Guest just writes there, the other
reads and writes.

   Now, when the first vserver writes a file into that directory, the
second one cannot read it - no wonder, "lsxid" shows the file tagged
with the "wrong" context.

    I see three possible solutions:

    1) Mounting the shared directory on a filesystem that is not enabled
for XID tagging. Alas, that would also mean that I cannot use Disk
Quotas here.

    2) The second VServer-Guest is allowed to read and modify all files
in that directory, regardless of the context the file is tagged with.
However, I have no idea how to accomplish that. Plus, I don't know how
disk quotas now will work.

    3) The first vserver-guest writes the files by using the context of
the second vserver-guest. That means that the quota of the second guest
applies. This is my preferred solution, but again I have no idea how to
accomplish that.

    Can someone put me on the right track? Mounting the filesystem in
/etc/vservers/<name>/fstab with a mount option perhaps?

Thanks,

Marcus
Received on Tue Jul 12 13:11:54 2011

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 12 Jul 2011 - 13:11:54 BST by hypermail 2.1.8