Bind Mount + User Quotas: Is it possible? [message #33366] |
Wed, 08 October 2008 22:13 |
jimp
Messages: 3 Registered: October 2008
|
Junior Member |
|
|
I followed the OpenVZ bind mount guide and it worked great! However, I cannot seem to get second level (user/group) quotas working for the files located within the bind mount.
The CT's second level quotas are working, but it is clear that they only account for files truly within the CT. Files located in /home (within the bind mount) do not contribute to the quotas at all.
Configuration:
- The CT is located in /home/vz/private/###.
- The /home bind mount points to /data/vz/###/home.
- /home and /data are two different partitions mounted on the HN like this:
- /dev/xxx /data xfs rw,relatime,usrquota,grpquota 0 0
- /dev/xxx /home xfs rw,relatime,usrquota,grpquota 0 0
Am I doing something wrong?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Bind Mount + User Quotas: Is it possible? [message #51755 is a reply to message #51712] |
Fri, 07 November 2014 14:22 |
kamranonline
Messages: 16 Registered: February 2007
|
Junior Member |
|
|
kir wrote on Sat, 18 October 2014 05:26You need to use simfs mount (see an example in vzctl( man page) and manually enable second-level quota using vzquota( tool
Hi,
I mount it as simfs but I dont know how to use vzquota for this partition.
As you can see /home2 mounted as simfs filesystem.
root@at1 [/]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 220G 124G 86G 60% /
/dev/simfs 917G 100G 771G 12% /home2
none 4.0G 8.0K 4.0G 1% /dev
root@at1 [/]# mount
/dev/simfs on / type simfs (rw,relatime,usrquota,grpquota)
/dev/simfs on /home2 type simfs (rw,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /dev type devtmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
but How to add usrquota , grpquota to Calculate Quota on this mounted point !
/etc/vz/conf/101.mount
#!/bin/sh
. /etc/vz/vz.conf
. /etc/vz/conf/101.conf
SRC=/vz5/101home2
DST=/home2
echo "Starting ${VEID}.mount..."
if [ ! -e ${VE_ROOT}${DST} ]; then mkdir -p ${VE_ROOT}${DST}; fi
mount -n -t simfs ${SRC} ${VE_ROOT}${DST} -o ${SRC}
echo "...${VEID}.mount complete"
[Updated on: Fri, 07 November 2014 14:34] Report message to a moderator
|
|
|
|
|