[Users] Set disk quota on arbitary mount point

Dave Lawrence dave at daftdroid.com
Fri Mar 2 09:23:21 EST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello

If I do
mount -n -t simfs /somepath /vz/root/101/mnt/test -o /mnt/test
Then
vzctl exec 101 df

It tells me that the moint /mnt/test has 10GB of data.
How can I set the quotas on this mount point?

Specifically what I am trying to do is allow a container to access the
private area of another container eg
mount -n -t simfs /vz/private/200 /vz/root/101/mnt/test -o /mnt/200

CT200 would not be running in this example.  I would like to be able
to set the moint point at /mnt/200 to have the same disk quota limits
as are set for CT200.  This allows CT101 to act as a rescue shell for
CT200.  Currently my rescue shell works just fine, but only because
none of our users yet have more than 10GB of data.

An alternative approach would be if there was a way of mounting
/vz/root/200 without actually starting CT200, and then use a bind mount:
mount --bind /vz/root/200 /vz/root/101/mnt/200

I don't think mounting a container without starting it is currently
supported, but this would be a relatively straightforward change to
vzctl?  I could submit a patch if I get it working and you think it
would be a worthwhile feature.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPUNfZAAoJEJjHYqrO/1XcQIgIAImpEr+dM59QT5tHY71J5ErF
a45OtroZj7uKhP7rbUgP8158cuPZJrelm84/9xRmecYXGFD4CSGPCxCa9ro4AHqJ
1PhbAtsjTTqLMf/CTySH76POgOvQBjTtdAiEPC2ML9P2IZoWPczdVPhaTb0q2LbT
2hNQZBycU0sbYELWBEH5YH1FjoZ9FiFFc4HoGKsQOR68OPN4L0DGRln9MS0VZPhp
XfbFur2lo5d6fHpqYOjLLD9urHqGXckNEl43lJ3zal1yoBK5W5/gFnGma5ug+MGU
GdzDw8QwS5LwLGqTep2ZWfhd5Y6c3bbK6wOFULdIKHvQaT1Myws/+2JZ+DjHp9k=
=fI8v
-----END PGP SIGNATURE-----


More information about the Users mailing list