OpenVZ Forum


Home » General » Support » Configure User/Group quotas on a CT
Configure User/Group quotas on a CT [message #52203] Tue, 15 September 2015 18:03 Go to next message
Bazcor is currently offline  Bazcor
Messages: 4
Registered: February 2013
Junior Member
From: *cm.vtr.net
Hi,

I created a CT (Centos 6.7) and later I mounted a new FS called /home.

# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/ploop51602p1 4512976 3288656 1014784 77% /
/dev/simfs 1998672 41308 1852508 3% /home
none 524288 12 524276 1% /dev
none 524288 0 524288 0% /dev/shm

I am trying to set disk quotas per user/group under /home and I am getting:

# quotaon /dev/simfs
quotaon: Cannot stat() given mountpoint /dev/simfs: No such file or directory
Skipping...
quotaon: No correct mountpoint specified.

# quotaon /home
quotaon: Mountpoint (or device) /home not found or has no quota enabled.

Disk quota is enable on vz.conf and ct.conf.

CT > QUOTAUGIDLIMIT="100"

I mounted the FS on VZ.

/dev/mapper/openvz_ct-homedir_205 on /mnt/homedir_205 type ext4 (rw,usrquota,grpquota)

My script to mount the FS is:

#!/bin/bash
. /etc/vz/vz.conf
. ${VE_CONFFILE}
SRC=/mnt/homedir_205
DST=/home
if [ ! -e ${VE_ROOT}${DST} ]; then mkdir -p ${VE_ROOT}${DST}; fi
mount -n -t simfs ${SRC} ${VE_ROOT}${DST} -o ${SRC}


Any ideas what is wrong?

Thanks in advance.
Re: Configure User/Group quotas on a CT [message #52213 is a reply to message #52203] Wed, 23 September 2015 22:04 Go to previous message
Bazcor is currently offline  Bazcor
Messages: 4
Registered: February 2013
Junior Member
From: *cm.vtr.net
Hi,

I tried creating a secondary disk using PLOOP and it failed too.

root@zen-pdc:/# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/ploop20457p1 20516348 2125428 17531280 11% /
/dev/ploop39056p1 899000 20488 826188 3% /mnt
none 524288 4 524284 1% /dev
none 4 0 4 0% /sys/fs/cgroup
none 104860 1228 103632 2% /run
none 51200 0 51200 0% /run/lock
none 524288 0 524288 0% /run/shm
none 102400 0 102400 0% /run/user
root@zen-pdc:/# quotacheck /dev/ploop20457p1
quotacheck: Quota for users is enabled on mountpoint / so quotacheck might damage the file.
Please turn quotas off or use -f to force checking.
root@zen-pdc:/# quotacheck /dev/ploop39056p1
quotacheck: Cannot find mountpoint for device /dev/ploop39056p1
quotacheck: No correct mountpoint specified.
quotacheck: Cannot initialize mountpoint scan.
root@zen-pdc:/#


My CT conf:

[root@openvz conf]# cat 208.conf | grep -v "#"
PHYSPAGES="0:1G"
SWAPPAGES="0:2G"
DISKSPACE="20G"
DISKINODES="131072:144179"
QUOTATIME="0"
CPUUNITS="10000"
NETFILTER="stateless"
VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
VE_LAYOUT="ploop"
OSTEMPLATE="ubuntu-14.04-x86_64"
ORIGIN_SAMPLE="vswap-1g"
ONBOOT="yes"
HOSTNAME="zen-pdc"
NAMESERVER="192.168.1.203 192.168.1.1"
CPUS="1"
IPTABLES="ip_tables iptable_filter iptable_mangle ipt_limit ipt_multiport ipt_tos ipt_TOS ipt_REJECT ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_LOG ipt_length ip_conntrack ip_conntrack_ftp ip_conntrack_irc ipt_conntrack ipt_state ipt_helper iptable_nat ip_nat_ftp ip_nat_irc ipt_REDIRECT "
CAPABILITY=" SYS_TIME:on"
NETIF=" ifname=eth0,mac=00:18:51:91:F3:45,host_ifname=veth208.0,host _mac=00:18:51:A6:AE:D1 "
QUOTAUGIDLIMIT="100"
[root@openvz conf]#

[root@openvz conf]# cat 208.mount
#!/bin/bash
#ploop mount -o usrjquota=aquota.user,grpjquota=aquota.group -m /vz/root/$VEID/mnt /storage/$VEID/DiskDescriptor.xml
ploop mount -m /vz/root/$VEID/mnt /storage/$VEID/DiskDescriptor.xml
[root@openvz conf]#


So, Does anybody facing or trying to do the same?

Thanks in advance.
Previous Topic: Convert Ploop to Simfs
Next Topic: Virtuozzo migration to OpenVZ
Goto Forum:
  


Current Time: Sun Oct 20 11:11:39 GMT 2019