Can't enable user quota after upgrade from 2.3 to 3.0

G

geomaster

Guest
CT config
Code:
ONBOOT="yes"

PHYSPAGES="0:1572864"
SWAPPAGES="0:1572864"
KMEMSIZE="2927624192:3221225472"
DCACHESIZE="1463812096:1610612736"
LOCKEDPAGES="786432"
PRIVVMPAGES="unlimited"
SHMPAGES="unlimited"
NUMPROC="unlimited"
VMGUARPAGES="0:unlimited"
OOMGUARPAGES="0:unlimited"
NUMTCPSOCK="unlimited"
NUMFLOCK="unlimited"
NUMPTY="unlimited"
NUMSIGINFO="unlimited"
TCPSNDBUF="unlimited"
TCPRCVBUF="unlimited"
OTHERSOCKBUF="unlimited"
DGRAMRCVBUF="unlimited"
NUMOTHERSOCK="unlimited"
NUMFILE="unlimited"
NUMIPTENT="unlimited"

# Disk quota parameters (in form of softlimit:hardlimit)
DISKSPACE="30G:33G"
DISKINODES="6000000:6600000"
DEVNODES="sdz2:qrw sdz1:rw"
QUOTAUGIDLIMIT="2000"
QUOTATIME="600"

# CPU fair scheduler parameter
CPUUNITS="3000"
CPUS="4"
HOSTNAME="fs.kmz"
SEARCHDOMAIN="kmz"
NAMESERVER="192.168.10.1"
IP_ADDRESS="192.168.10.5"
VE_ROOT="/var/lib/vz/root/$VEID"
VE_PRIVATE="/stor/ct/private/10005"
OSTEMPLATE="centos-6-standard_6.0-1_i386.tar.gz"

In-container fstab
Code:
none    /dev/pts        devpts  rw      0       0
/dev/sdz1       /Group  ext3    defaults        0       1
/dev/sdz2      /home   ext3    usrquota,defaults       0       1
In proxmox ve 2.3 quotas on /home mount point work fine. After upgrade /home not mounted, in dmesg (on host and on CT) i see this lines:
Code:
VE10005: no allowed mount options found for device 8:34
Without "usrquota" parameter /home mount ok.
 
Anybody help me?

Отправлено с моего HTC Wildfire через Tapatalk
 
Run on host
Code:
mount -o usrquota,remount -n /dev/sdz2 /var/lib/vz/root/10005/home
And voila! User quota in container is on!
Code:
]# cat /etc/mtab
/dev/sdz2 /home ext3 rw,relatime,errors=continue,barrier=0,data=ordered,usrquota 0 0
Code:
]#quotaon -p /home
group quota on /home (/dev/sdz2) is off
user quota on /home (/dev/sdz2) is on
I put this magic command into 10005.mount script and pray that it worked on restart...

10005.mount:
Code:
#!/bin/bash
. /etc/vz/vz.conf
. ${VE_CONFFILE}
SRC=/dev/sdz2
DST=/home
if [ `mount | grep ${SRC} | grep usrquota | wc -l` -eq 0 ]; then
  mount -o usrquota,remount -n ${SRC} ${VE_ROOT}${DST}
fi
 
Last edited by a moderator:
Sad... The action script $VE_ID.mount run BEFORE VE is running. And devnodes is not exists into container. The $VE_ID.start script run AFTER VE is running, but the start and stop scripts are performed in the VE context.
 
I found some workaround and my VE_ID.mount looks like this:
Code:
#!/bin/bash

echo "#!/bin/bash
sleep 5

_sleep() {
status=(\`/usr/sbin/vzctl status ${VEID}\`)
if [ \${status[4]} == \"running\" ] ; then
        . /etc/vz/vz.conf
        . /etc/vz/conf/${VEID}.conf
        SRC=/dev/sdz2
        DST=/home
        if [ \`mount | grep \${SRC} | grep usrquota | wc -l\` -eq 0 ]; then
                mount -o usrquota,remount -n \${SRC} \${VE_ROOT}\${DST}
        fi
        rm -f /etc/vz/${VEID}.sh
        exit 0
fi
sleep 1
_sleep
}

_sleep" > /etc/vz/${VEID}.sh
chmod 755 /etc/vz/${VEID}.sh

. /etc/vz/${VEID}.sh &
disown
exit 0

It run and re-mount devnode with usrquota. But I can't test this script with migration.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!