Page 1 of 2

File System Quota

Posted: Fri Dec 11, 2015 4:08 pm
by Felix
Hello all.

I have installed Vesta on an OpenVZ VPS under Ubuntu 14.04 LTS. I didn't use any command line arguments to install Vesta, just

Code: Select all

vst-install.sh
Now I need to set Quotas on users and searching the forum I saw this post and tried to follow the instructions there. I have set FileSystem Disk Quota = Yes under Admin > Server > Configure but when I try to run the command

Code: Select all

v-add-sys-quota
I get the following error:

Code: Select all

sed: -e expression #1, char 11: unterminated `s' command
quotacheck: Mountpoint (or device) / not found or has no quota enabled.
quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.
Any help would be highly appreciated...

Re: File System Quota

Posted: Fri Dec 11, 2015 5:23 pm
by chaiyuttochai
Wow u have the same problem like me
Did u get into directory yet?
User/local/vesta/bin
Then ./v-add-sys-quota

Try this

Re: File System Quota

Posted: Fri Dec 11, 2015 5:47 pm
by Felix
Thanks for the suggestion but unfortunately it doesn't work. The output is the same:

Code: Select all

root@XXX:/usr/local/vesta/bin# ./v-add-sys-quota
sed: -e expression #1, char 11: unterminated `s' command
quotacheck: Mountpoint (or device) / not found or has no quota enabled.
quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.

Re: File System Quota

Posted: Mon Dec 14, 2015 12:25 pm
by skurudo
Can you show us output?

Code: Select all

cat /etc/fstab

Re: File System Quota

Posted: Mon Dec 14, 2015 2:50 pm
by Felix
Yes skurudo, here it is:

Code: Select all

proc  /proc       proc    defaults    0    0
none  /dev/pts    devpts  rw,gid=5,mode=620    0    0
none  /run/shm    tmpfs   defaults    0    0
Some more info that might help... Result of commands (in v-add-sys-quota). The result is after >>>

Code: Select all

mnt=$(df -P /home |awk '{print $6}' |tail -n1) >>> /
In the following command I have replaced grep "$mnt$" with grep "/"

Code: Select all

lnr=$(cat -n /etc/fstab |awk '{print $1,$3}' |grep "/" |cut -f 1 -d ' ') >>>
1
2
3
I guess the result of the second command is not like what sed is expecting in the following command?

Code: Select all

options=$(sed -n ${lnr}p /etc/fstab |awk '{print $4}')

Re: File System Quota

Posted: Mon Dec 14, 2015 2:59 pm
by skurudo
Sorry, but that's all? Where your / partion?

Re: File System Quota

Posted: Mon Dec 14, 2015 3:05 pm
by Felix
Yes this is all and nothing more. Does it make any difference the fact that it's an OpenVZ VPS?

I'm asking because in all OpenVZ VPS I have from different providers the content of /etc/fstab is like the above. But in a XEN VPS it's quite different:

Code: Select all

/dev/xvda1      /       ext3    errors=remount-ro,usrjquota=quota.user,jqfmt=vfsv0      1       1
/dev/xvda2       swap          swap    defaults                   0 0
none             /dev/shm      tmpfs   defaults                   0 0

Re: File System Quota

Posted: Mon Dec 14, 2015 3:09 pm
by skurudo
Well, I'm starting to thinks, it's VPS template problem.. in fstab in / don't see quota like in XEN or other system and CP can't enable quota.

Can you show output?

Code: Select all

df -h

Re: File System Quota

Posted: Mon Dec 14, 2015 3:11 pm
by Felix

Code: Select all

Filesystem      Size  Used Avail Use% Mounted on
/dev/simfs       30G   14G   17G  45% /
none            512M  4.0K  512M   1% /dev
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            103M  1.1M  102M   2% /run
none            5.0M     0  5.0M   0% /run/lock
none            512M     0  512M   0% /run/shm
none            100M     0  100M   0% /run/user
And here is mount

Code: Select all

/vz/private/3105 on / type simfs (rw,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /dev type devtmpfs (rw,nosuid,noexec,relatime,mode=755,gid=500)
none on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/cgroup type tmpfs (rw,relatime,size=4k,mode=755)
none on /run type tmpfs (rw,nosuid,noexec,relatime,size=104860k,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
none on /run/shm type tmpfs (rw,relatime)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755)
/etc/mtab

Code: Select all

root@XXX:~# cat /etc/mtab
/dev/simfs / simfs rw,relatime 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /dev devtmpfs rw,nosuid,noexec,relatime,mode=755,gid=500 0 0
none /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
none /sys/fs/cgroup tmpfs rw,relatime,size=4k,mode=755 0 0
none /run tmpfs rw,nosuid,noexec,relatime,size=104860k,mode=755 0 0
none /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
none /run/shm tmpfs rw,relatime 0 0
none /run/user tmpfs rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755 0 0

Re: File System Quota

Posted: Mon Dec 14, 2015 10:23 pm
by Felix
After some research I found this, this and this, which made me think it might be a provider issue or OpenVZ configuration, just as skurudo said.

I contacted my provider, they did something and told me that it should be OK now. I noticed in /etc/mtab that now the filesystem simfs is mounted with userquota

Code: Select all

/dev/simfs / simfs rw,relatime,usrquota,grpquota 0 0
mount also shows that FS is mounted with user/group quota

Code: Select all

/vz/private/3105 on / type simfs (rw,relatime,usrquota,grpquota)
But how do I check it is working in Vesta?