OpenVZ Forum


Home » International » Russian » квоты (юзер/группа) на раздел внутри vps
квоты (юзер/группа) на раздел внутри vps [message #37239] Fri, 28 August 2009 03:10 Go to next message
vukor is currently offline  vukor
Messages: 12
Registered: August 2008
Junior Member
Приветствую.

В VPS прокинут раздел (описание в конфиге):
/etc/vz/110.conf
ONBOOT="yes"

# UBC parameters (in form of barrier:limit)
KMEMSIZE="2147483647:2147483647"
LOCKEDPAGES="2147483647:2147483647"
PRIVVMPAGES="2147483647:2147483647"
SHMPAGES="2147483647:2147483647"
NUMPROC="2147483647:2147483647"
PHYSPAGES="0:2147483647"
VMGUARPAGES="33792:2147483647"
OOMGUARPAGES="26112:2147483647"
NUMTCPSOCK="2147483647:2147483647"
NUMFLOCK="2147483647:2147483647"
NUMPTY="16:16"
NUMSIGINFO="2147483647:2147483647"
TCPSNDBUF="2147483647:2147483647"
TCPRCVBUF="2147483647:2147483647"
OTHERSOCKBUF="2147483647:2147483647"
DGRAMRCVBUF="2147483647:2147483647"
NUMOTHERSOCK="2147483647:2147483647"
DCACHESIZE="2147483647:2147483647"
NUMFILE="2147483647:2147483647"
AVNUMPROC="2147483647:2147483647"
NUMIPTENT="2147483647:2147483647"

# Disk quota parameters (in form of softlimit:hardlimit)
DISK_QUOTA=yes
DISKSPACE="10485760:10485760"
DISKINODES="200000:220000"
QUOTATIME="0"

# CPU fair sheduler parameter
CPUUNITS="1000"


VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
OSTEMPLATE="centos-5-i386-default-5.3-20090509"
ORIGIN_SAMPLE="vps.basic"
HOSTNAME="xxxxxxx"
IP_ADDRESS="xxxxxxx"

IPTABLES="ip_tables iptable_filter iptable_mangle ipt_limit ipt_multiport ipt_REJECT ip_conntrack ipt_conntrack ipt_state "
DEVNODES="sdb3:rw "
QUOTAUGIDLIMIT="100"


Требуется внутри VPS на разделе /dev/sdb3 настроить квоты для юзеров.
/etc/fstab:
/dev/sdb3       /mnt/disk2T     ext3    auto,rw,noatime,noexec,usrquota 0 0


делаю внутри VPS:
# quotacheck -vu /mnt/disk2T
# quotaon -u /mnt/disk2T/
quotaon: using /mnt/disk2T/aquota.user on /dev/sdb3 [/mnt/disk2T]: Отказано в доступе
# quota akm
Disk quotas for user akm (uid 500):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
     /dev/simfs   42192*     10      10            4912       0       0


Как видно, на корне квоты работают.
Проблема - внутри VPS на разделе /mnt/disk2T квоты не работают.
Т.е. файлы с владельцем akm существуют на разделе, но
# edquota akm
Disk quotas for user akm (uid 500):
  Filesystem                   blocks       soft       hard     inodes     soft     hard
  /dev/simfs                    42192         10         10       4912        0        0
  /dev/sdb3                         0         10         10          0        0        0


p.s.
Пока вижу одно решение - в физ. хосте продублировать юзеров, смонтировать раздел, настроить квоты и при помощи
mount -o bind
смонтировать раздел в VPS.
Re: квоты (юзер/группа) на раздел внутри vps [message #37240 is a reply to message #37239] Fri, 28 August 2009 03:21 Go to previous messageGo to next message
vukor is currently offline  vukor
Messages: 12
Registered: August 2008
Junior Member
vukor wrote on Thu, 27 August 2009 23:10
Приветствую.

В VPS прокинут раздел (описание в конфиге):
/etc/vz/110.conf
ONBOOT="yes"

# UBC parameters (in form of barrier:limit)
KMEMSIZE="2147483647:2147483647"
LOCKEDPAGES="2147483647:2147483647"
PRIVVMPAGES="2147483647:2147483647"
SHMPAGES="2147483647:2147483647"
NUMPROC="2147483647:2147483647"
PHYSPAGES="0:2147483647"
VMGUARPAGES="33792:2147483647"
OOMGUARPAGES="26112:2147483647"
NUMTCPSOCK="2147483647:2147483647"
NUMFLOCK="2147483647:2147483647"
NUMPTY="16:16"
NUMSIGINFO="2147483647:2147483647"
TCPSNDBUF="2147483647:2147483647"
TCPRCVBUF="2147483647:2147483647"
OTHERSOCKBUF="2147483647:2147483647"
DGRAMRCVBUF="2147483647:2147483647"
NUMOTHERSOCK="2147483647:2147483647"
DCACHESIZE="2147483647:2147483647"
NUMFILE="2147483647:2147483647"
AVNUMPROC="2147483647:2147483647"
NUMIPTENT="2147483647:2147483647"

# Disk quota parameters (in form of softlimit:hardlimit)
DISK_QUOTA=yes
DISKSPACE="10485760:10485760"
DISKINODES="200000:220000"
QUOTATIME="0"

# CPU fair sheduler parameter
CPUUNITS="1000"


VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
OSTEMPLATE="centos-5-i386-default-5.3-20090509"
ORIGIN_SAMPLE="vps.basic"
HOSTNAME="xxxxxxx"
IP_ADDRESS="xxxxxxx"

IPTABLES="ip_tables iptable_filter iptable_mangle ipt_limit ipt_multiport ipt_REJECT ip_conntrack ipt_conntrack ipt_state "
DEVNODES="sdb3:rw "
QUOTAUGIDLIMIT="100"


Требуется внутри VPS на разделе /dev/sdb3 настроить квоты для юзеров.
/etc/fstab:
/dev/sdb3       /mnt/disk2T     ext3    auto,rw,noatime,noexec,usrquota 0 0


делаю внутри VPS:
# quotacheck -vu /mnt/disk2T
# quotaon -u /mnt/disk2T/
quotaon: using /mnt/disk2T/aquota.user on /dev/sdb3 [/mnt/disk2T]: Отказано в доступе
# quota akm
Disk quotas for user akm (uid 500):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
     /dev/simfs   42192*     10      10            4912       0       0


Как видно, на корне квоты работают.
Проблема - внутри VPS на разделе /mnt/disk2T квоты не работают.
Т.е. файлы с владельцем akm существуют на разделе, но
# edquota akm
Disk quotas for user akm (uid 500):
  Filesystem                   blocks       soft       hard     inodes     soft     hard
  /dev/simfs                    42192         10         10       4912        0        0
  /dev/sdb3                         0         10         10          0        0        0


p.s.
Пока вижу одно решение - в физ. хосте продублировать юзеров, смонтировать раздел, настроить квоты и при помощи
mount -o bind
смонтировать раздел в VPS.



# repquota -a
*** Report for user quotas on device /dev/simfs
Block grace time: 00:00; Inode grace time: 00:00
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      -- 1004264       0       0          35183     0     0
ftp       --      48       0       0              5     0     0
vcsa      --       8       0       0              1     0     0
smmsp     --      24       0       0              5     0     0
apache    -- 1600020       0       0          28153     0     0
rpc       --       0       0       0              1     0     0
rpm       --   14484       0       0             16     0     0
named     --      12       0       0              3     0     0
avahi     --       4       0       0              1     0     0
akm       +-   42192      10      10   none    4912     0     0
#26       --  661772       0       0            776     0     0
#502      --      16       0       0              6     0     0
#503      --       0       0       0              1     0     0
#1000     --    1256       0       0            159     0     0
#1001     --     628       0       0             69     0     0
#1003     --      28       0       0              7     0     0


*** Report for user quotas on device /dev/sdb3
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      --  200368       0       0             36     0     0
apache    -- 944303272       0       0         202099     0     0


Вижу что для root и apache квоты считаются, но для akm - нет.
# ls -l /mnt/disk2T/ftp/akm/
итого 10472
-rw-r--r-- 1 akm apache    5773 Авг 28 09:19 ArcSupport.Rus.txt
-rw-r--r-- 1 akm apache    5846 Авг 28 09:19 ArcSupport.txt
-rw-r--r-- 1 akm apache    5219 Авг 28 09:19 BugReport.Rus.txt
-rw-r--r-- 1 akm apache    5043 Авг 28 09:19 BugReport.txt
-rw-r--r-- 1 akm akm    9392288 Авг 28 08:12 ChuzzleSetup.exe
-rw-r--r-- 1 akm apache     254 Авг 28 09:19 ClearPluginsCache.bat
-rw-r--r-- 1 akm apache     261 Авг 28 09:19 Contacts.txt
-rw-r--r-- 1 akm apache    1536 Авг 28 09:19 Descript.ion
-rw-r--r-- 1 akm apache  126969 Авг 28 09:19 FarEng.hlf
-rw-r--r-- 1 akm apache   27175 Авг 28 09:19 FarEng.lng
-rw-r--r-- 1 akm apache  840192 Авг 28 09:19 Far.exe
-rw-r--r-- 1 akm apache    7922 Авг 28 09:19 FarFAQ.txt
-rw-r--r-- 1 akm apache    4710 Авг 28 09:19 Far.ico
-rw-r--r-- 1 akm apache  134864 Авг 28 09:19 FarRus.hlf
-rw-r--r-- 1 akm apache   29793 Авг 28 09:19 FarRus.lng
-rw-r--r-- 1 akm apache   10030 Авг 28 09:19 Far_Site.txt
-rw-r--r-- 1 akm apache     368 Авг 28 09:19 File_id.diz
-rw-r--r-- 1 akm apache    3025 Авг 28 09:19 License.txt
-rw-r--r-- 1 akm apache    3302 Авг 28 09:19 License.xUSSR.txt
-rw-r--r-- 1 akm apache    8767 Авг 28 09:19 Macros.Rus.txt
-rw-r--r-- 1 akm apache    8987 Авг 28 09:19 Macros.txt
drwxr-xr-x 3 akm akm       4096 Авг 28 08:10 Plants vs. Zombies [RG - ????mans]
drwxr-xr-x 2 akm apache    4096 Авг 28 09:12 popcap-action
-rw-r--r-- 1 akm apache    2153 Авг 28 09:19 README.TXT
-rw-r--r-- 1 akm apache    2921 Авг 28 09:19 REGISTER.FRM
-rw-r--r-- 1 akm apache    2747 Авг 28 09:19 REGISTER.TXT
Re: квоты (юзер/группа) на раздел внутри vps [message #37295 is a reply to message #37240] Tue, 01 September 2009 17:04 Go to previous messageGo to next message
cyrill is currently offline  cyrill
Messages: 4
Registered: November 2008
Junior Member
Попробуй добавить "q" постфикс. Т.е.
DEVNODES="sdb3:rwq "
Re: квоты (юзер/группа) на раздел внутри vps [message #37301 is a reply to message #37295] Wed, 02 September 2009 02:49 Go to previous messageGo to next message
vukor is currently offline  vukor
Messages: 12
Registered: August 2008
Junior Member
cyrill wrote on Tue, 01 September 2009 13:04
Попробуй добавить "q" постфикс. Т.е.
DEVNODES="sdb3:rwq "




А я уже совсем отчаялся. Добавил ключ - помогло !!! Спасибо тебе большое.
Re: квоты (юзер/группа) на раздел внутри vps [message #37302 is a reply to message #37301] Wed, 02 September 2009 02:54 Go to previous message
vukor is currently offline  vukor
Messages: 12
Registered: August 2008
Junior Member
Тема закрыта.
Previous Topic: openvz в новых дистрибутивах
Next Topic: старый баг в новом ядре?
Goto Forum:
  


Current Time: Tue May 07 16:46:00 GMT 2024

Total time taken to generate the page: 0.01456 seconds