OpenVZ Forum


Home » General » Support » *SOLVED* Quota inside vps on outside partition
*SOLVED* Quota inside vps on outside partition [message #7253] Mon, 09 October 2006 08:08 Go to next message
n00b_admin is currently offline  n00b_admin
Messages: 77
Registered: July 2006
Location: Romania
Member
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 Sad

Does someone else tried this before ?

Quotacheck complaints about the mountpoint.

Thanks in advance for your reply.

[Updated on: Tue, 24 October 2006 12:27]

Report message to a moderator

Re: Quota inside vps on outside partition [message #7254 is a reply to message #7253] Mon, 09 October 2006 09:13 Go to previous messageGo to next message
HaroldB is currently offline  HaroldB
Messages: 61
Registered: June 2006
Member
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

Re: Quota inside vps on outside partition [message #7268 is a reply to message #7254] Mon, 09 October 2006 13:11 Go to previous messageGo to next message
n00b_admin is currently offline  n00b_admin
Messages: 77
Registered: July 2006
Location: Romania
Member
It doesn't work that way either Sad

The mtab file looks the same.
Re: Quota inside vps on outside partition [message #7615 is a reply to message #7253] Thu, 19 October 2006 08:01 Go to previous messageGo to next message
n00b_admin is currently offline  n00b_admin
Messages: 77
Registered: July 2006
Location: Romania
Member
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 Sad
Re: Quota inside vps on outside partition [message #7638 is a reply to message #7615] Thu, 19 October 2006 11:27 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

First of all lets start solving your problem step by step Smile

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.
Re: Quota inside vps on outside partition [message #7642 is a reply to message #7253] Thu, 19 October 2006 12:01 Go to previous messageGo to next message
n00b_admin is currently offline  n00b_admin
Messages: 77
Registered: July 2006
Location: Romania
Member
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 Sad

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 ?

[Updated on: Thu, 19 October 2006 12:04]

Report message to a moderator

Re: Quota inside vps on outside partition [message #7644 is a reply to message #7642] Thu, 19 October 2006 12:16 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Sorry, I still don't understand your configuration! Rolling Eyes

1) What do you call "virual domain"? Is it VE? Smile
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!
Re: Quota inside vps on outside partition [message #7659 is a reply to message #7253] Thu, 19 October 2006 14:37 Go to previous messageGo to next message
n00b_admin is currently offline  n00b_admin
Messages: 77
Registered: July 2006
Location: Romania
Member
Let's clarify this Smile

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 Smile
Re: Quota inside vps on outside partition [message #7663 is a reply to message #7659] Thu, 19 October 2006 15:33 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
OK, now I undestand everything you need! Smile
I will try to reproduce this configuration tommorow (it's too late here already Rolling Eyes ) and give you an answer.
Re: Quota inside vps on outside partition [message #7689 is a reply to message #7659] Fri, 20 October 2006 13:10 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,


Really sorry for slow answer: usual problems with time! Smile

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


[Updated on: Fri, 20 October 2006 13:12]

Report message to a moderator

*SOLVED* Quota inside vps on outside partition [message #7758 is a reply to message #7253] Tue, 24 October 2006 12:21 Go to previous message
n00b_admin is currently offline  n00b_admin
Messages: 77
Registered: July 2006
Location: Romania
Member
Sorry, but i didn't manage to activate the quotas on that external partition Sad

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 !

[Updated on: Tue, 24 October 2006 12:26]

Report message to a moderator

Previous Topic: RHEL/dkms
Next Topic: FC6 VPS
Goto Forum:
  


Current Time: Wed Nov 13 01:31:24 GMT 2024

Total time taken to generate the page: 0.03231 seconds