*SOLVED* Quota inside vps on outside partition
Hi, I can't figure out why is this happening, i allowed access rw to a partition on the HN for a vps using the devnodes setting but i can't use quotas inside the vps on that partition. My fstab file looks like this: none /dev/pts devpts rw 0 0 LABEL=/home /home ext3 defaults,usrquota,grpquota 1 2 And mtab like this: /dev/simfs / reiserfs rw,usrquota,grpquota 0 0 proc /proc proc rw,nodiratime 0 0 devpts /dev/pts devpts rw 0 0 ext3 /home ext3 rw 0 0 I see that the partition is not mounted according to fstab Does someone else tried this before ? Quotacheck complaints about the mountpoint. Thanks in advance for your reply.
Re: Quota inside vps on outside partition
Hi, to simplify things, specify the device path to the partition, instead of relying on the disk label. ie, replace LABEL=/home with /dev/hdX
It doesn't work that way either The mtab file looks the same.
I think my problem does not concern openvz but can someone please tell me what to read at least so i can make this work on my setup ? I have basic knowledge about implementing quotas and how they work and the internet is full of information about that but not how to implement it in openvz on a external partition outside the vps
Hello, First of all lets start solving your problem step by step Have you managed to mount partion in VE using a record in /etc/fstab? If no, then, please, replace ext3->ext2 in fstab record and try again. Point is that ext3 attempts to start kernel thread for the journal, but it is prohibited in VE, so mount fails. However ext3 is backward compatible with ext2, so you'll be able to mount partion, formated as ext3, as ext2. HTH, vass.
My bad for the lack of details, sorry. First of all my final job is to make a qmail based mail server with system quota implemented for each virtual domain. I managed to mount the external partition using fstab and it works well. All my virtual domains are located on a separate harddrive and the main partition is using the /home mountpoint. I've created the system users but i can't configure the system quotas for them ! In fstab i've specified the usrquota,grpquota flags but they do not work, in the mtab file the partition is mounted without those flags Later edit: Oh, i get what you mean by mounting the ext3 partition as ext2, does that mean that the VE will let me specify system quotas like i can on the simfs, transparently ?
Sorry, I still don't understand your configuration! 1) What do you call "virual domain"? Is it VE? 2) Sorry, I don't get, qmail server resides in VE or on HN? My current comprehension is the following: You have a HN with several VEs, each VE should run qmail. You have several hard disk drives (hdd), each VE corresponds to separate hdd. There are at least two partions on each hdd. One of partions is for VE in fact. Second partion is to be mounted on /home in appropriate VE. Do I understand you right? Thanks!
Let's clarify this One HN, ~40 VE's, 2 HDD's. One harddrive contains the VE's with all the configuration data. All the VE's are the same template based on fedora core 5. ONE VE is the mail server based on qmail. Before i used OpenVZ the second harddrive contained only the /home partition which contained the virtualdomains of all e-mail domains. Much like an apache virtualhost in a shared environment. After i migrated to OpenVZ the /home partition on the second hardrive should become the /home partition on the qmail VE. I managed to accomplish the mounting of that external partition in the qmail VE but i can't get quotas to work. I used the term virtualdomains to the data stored on the harddrive for every e-mail domain hosted on my server. I hope you got my configuration right
OK, now I undestand everything you need! I will try to reproduce this configuration tommorow (it's too late here already ) and give you an answer.
Hello, Really sorry for slow answer: usual problems with time! For simplicity I didn't use /etc/fstab and did everything by hand: [HN]# vzctl start 112 [HN]# vzctl set 112 --devnodes "sda1:rwq sda:rwq" --save # q - permits quota in VE [root@dhcp0-53 ~]# cat /proc/vz/devperms Version: 2.7 0 b 016 *:* 0 c 006 *:* 112 b 016 8:1 # <<< quota is permited 112 b 016 8:0 [HN]# vzctl enter 112 [VE]# mount -t ext2 -o usrquota,grpquota /dev/sda1 /mnt/ [VE]# quotacheck /dev/sda1 [VE]# quotaon /dev/sda1 [VE]# quota -v Disk quotas for user root (uid 0): Filesystem blocks quota limit grace files quota limit grace /dev/sda1 81220 0 0 84 0 0 HTH, vass
Sorry, but i didn't manage to activate the quotas on that external partition I was caught with something else at work and today i've tested your instructions. 1. fstab does not work, same as before. I enable quotas in fstab but my partition is listed in mtab without the usrquota,grpquota options. If i mount manually it accepts those parameters and quotacheck works fine. 2. When i issue the quotaon command i receive a segmentation fault message. I got it. While i was writing this message. The quotaon is useless. All i had to do was to quotacheck the partition. After that edquota reported quotas for the /dev/sdb1 (that's my partition) filesystem also ! The only "hack" which i don't like is I had to mount the partition in rc.local file not via fstab. NOW IT WORKS! Thanks Vass for your asisstance !